Complete Guide to JHD-2X16-I2C Simulation in Proteus JHD-2X16-I2C
is a popular 16x2 character LCD module integrated with an I2C piggyback board (typically based on the PCF8574 chip). Simulating this specific hardware in Proteus allows you to verify your I2C communication and display logic without wiring 16 separate pins to your microcontroller. 1. Essential Components for Proteus Simulation
To simulate a JHD-2X16-I2C setup, you need to gather the following components in your Proteus library: Microcontroller: Arduino Uno Go to product viewer dialog for this item. , or a PIC microcontroller (e.g., PIC16F1503 Go to product viewer dialog for this item. LCD Display: Search for LCD16x2 or LM016L.
I2C Expanders: The JHD-2X16-I2C often requires a PCF8574 I/O expander to bridge the I2C bus to the parallel LCD interface in the simulation environment.
Libraries: For a more realistic look, you can add specialized LCD Libraries for Proteus from The Engineering Projects. 2. Circuit Connection (Pin Mapping)
The primary advantage of the I2C interface is that it only requires 4 pins instead of the standard 12-16. YouTube·void loop Robotech & Automation 17 I2C LCD16x2 with Arduino Simulation on Proteus jhd-2x16-i2c proteus
The simulation requires connecting the PCF8574 outputs to the LCD inputs. The standard "LiquidCrystal_I2C" Arduino library mapping is as follows:
| PCF8574 Pin | Connected To LCD Pin | Function | | :--- | :--- | :--- | | P0 | D4 | Data Bit 4 | | P1 | D5 | Data Bit 5 | | P2 | D6 | Data Bit 6 | | P3 | D7 | Data Bit 7 | | P4 | RS | Register Select | | P5 | RW | Read/Write (Connect to GND usually) | | P6 | EN | Enable | | P7 | Backlight | (Optional in simulation) |
I2C Bus Connections:
LM016L (LCD) and PCF8574 (I2C expander).#include <Wire.h> #include <LiquidCrystal_I2C.h>// Initialize LCD with address 0x27, 16 columns, 2 rows LiquidCrystal_I2C lcd(0x27, 16, 2);
void setup() Wire.begin(); // Initialize I2C bus lcd.init(); // Initialize LCD lcd.backlight(); // Turn on backlight PCF8574 SDA $\rightarrow$ Microcontroller SDA (A4 on Arduino
lcd.setCursor(0, 0); lcd.print("Proteus I2C LCD"); lcd.setCursor(0, 1); lcd.print("Hello World!");
void loop() // Scroll the second line lcd.setCursor(0, 1); lcd.print("Counter: "); lcd.print(millis() / 1000); delay(500);
The JHD-2x16-I2C is a 16x2 character LCD with an onboard I2C (PCF8574) backpack. It significantly reduces the number of MCU pins required from 6 (or more) down to just 2: SDA and SCL.
In Proteus 8 Professional or later, you can simulate this exact model without building physical hardware. Important: In Proteus
| LCD I2C Pin | Arduino Uno Pin | Proteus Net Label | |-------------|----------------|-------------------| | VCC | 5V | VCC | | GND | GND | GND | | SDA | A4 (or SDA) | SDA | | SCL | A5 (or SCL) | SCL |
Important: In Proteus, if using
PCF8574+LM044L, connect PCF8574’s P0–P7 to LM044L’s RS, RW, E, D4–D7 as per standard 4-bit mode. But the prebuiltLCD I2Cmodel simplifies this.
While Proteus is excellent, be aware of these differences when moving to real hardware:
| Feature | Proteus Simulation | Real JHD-2x16-I2C Module | |---------|--------------------|---------------------------| | Timing | Ideal, no delays | Requires precise power-up delays (usually 100-250ms) | | Pull-ups | Sometimes optional | Always required (4.7kΩ) | | Contrast | Adjustable via property | Physical potentiometer on the back | | Backlight | Always simulated | Can be controlled via transistor or jumper | | I2C Speed | Up to 400kHz stable | Real devices may struggle at 400kHz on long wires |
Pro Tip: In your real-world code, always add delay(50) after lcd.init() and before printing the first character.