To simulate this device effectively, you must configure the hardware connections and use compatible firmware libraries.
Simulating this hardware layout inside Labcenter Electronics Proteus saves substantial hardware configuration time, protects real hardware components from short circuits, and speeds up firmeware code optimization. This guide outlines everything required to set up, address, code, and troubleshoot the JHD-2X16-I2C display within a Proteus ISIS simulation environment. Technical Specifications: JHD-2X16-I2C
October 26, 2023 Subject: Integration, Configuration, and Simulation of the JHD I2C LCD Module
Comprehensive Guide to Simulating the JHD-2X16-I2C LCD in Proteus
#include <stdint.h> #include <stdbool.h> #include <avr/io.h> #include <avr/interrupt.h> jhd-2x16-i2c proteus
LM016L (This is the standard 16x2 LCD model in Proteus). Pull-up Resistors: RES (Two pieces needed for the I2C bus). Step 2: Wiring the PCF8574 to the LM016L LCD
Search for and add the following parts to your component list:
Instead of occupying up to 8 digital pins on your microcontroller, this module requires only : SDA (Serial Data) SCL (Serial Clock) Finding the Components in Proteus
void lcd_init() // Initialize I2C TWBR = 0x18; // 100 kHz TWSR = 0x00; To simulate this device effectively, you must configure
Microcontroller simulation clock speed mismatch. If your code relies on time delays for the HD44780 execution windows, running the Proteus MCU at 1MHz while your code assumes 16MHz breaks timing constraints.
Right-click the JHD-2x16-I2C in Proteus and edit its properties. Look for I2C Address . Set it to 0x27 (most common). If your code uses 0x3F , change it here.
Ensure the I2C address in the simulation matches the code (default is usually 0x20 in many simulated libraries). 4. Coding and Simulation Steps
The 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. If your code relies on time delays for
: In physical and simulated circuits, it reduces the complexity of wiring, freeing up input/output pins for other components like sensors or motors. Simulation in Proteus
#include <Wire.h> #include <LiquidCrystal_I2C.h>
On standard Arduino boards, SDA is on A4 (or a dedicated pin) and SCL on A5. For other MCUs like PIC or AVR, consult their datasheets for specific pin locations. The key is that no other connections are required for basic display operation.