• Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Need help with LCD module with 12C serial interface and SDA & SDL

Thread starter #1
Hello Friends,

I need help to understand the working of LCD 12C serial interface with SDA & SDL.

I am using 16x2 LCD module with 12c serial interface. (https://robu.in/product/iici2c-seri...EYpNE_atkqyVaujsRlmZWvRu76glFLacaAtClEALw_wcB)

My current code for use with out 12c interface.

Code:
'PIC 18f2520
Define CONFIG1L = 0x00
Define CONFIG1H = 0x02
Define CONFIG2L = 0x19
Define CONFIG2H = 0x00
Define CONFIG3L = 0x00
Define CONFIG3H = 0x81
Define CONFIG4L = 0x80
Define CONFIG4H = 0x00
Define CONFIG5L = 0x0f
Define CONFIG5H = 0xc0
Define CONFIG6L = 0x0f
Define CONFIG6H = 0xe0
Define CONFIG7L = 0x0f
Define CONFIG7H = 0x40

Define CLOCK_FREQUENCY = 20
AllDigital

Define SIMULATION_WAITMS_VALUE = 1  'FOR SIMULATION

Define LCD_BITS = 4
Define LCD_DREG = PORTB
Define LCD_DBIT = 0
Define LCD_RSREG = PORTA
Define LCD_RSBIT = 2
Define LCD_RWREG = 0
Define LCD_RWBIT = 0
Define LCD_EREG = PORTA
Define LCD_EBIT = 4
Define LCD_READ_BUSY_FLAG = 0

Lcdinit

loop:
Lcdcmdout LcdClear
Lcdout "WELCOME"
Lcdcmdout LcdLine2Home
Lcdout "WORLD"
WaitMs 1000
Goto loop
Above code works perfectly, how do i do the same using 12C serial interface.

Any help shall be highly appreciated.

Thanx in advance.
Mastero
 

Ian Rogers

User Extraordinaire
Forum Supporter
Most Helpful Member
#3
Some of us can't get on all day long!!!

I have I2C drivers for LCD... If you had searched on this site you would have found several threads regarding this same topic.

First!!!! The serial chip on the backpack is the PCF 8574T... Download the datasheet and start there....

In this thread you will find the schematic.... I have written a basic driver, but C conversion will be very easy..
https://www.electro-tech-online.com/threads/oshon-software-i2c-lcd-coding.153472/#post-1323453
 

Latest threads

EE World Online Articles

Loading

 
Top