Looking for an I2C interface solution that will work with the HD44780 LCD

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
MiBe_1380881
Level 4
Level 4
10 likes received First like received

I have been working with the PCF8574 chip which is set up to work in a 4 bit mode where P0-P3 from the 8574 chip  are connected to D4-D7 of the LCD and P4-P6  are connected to E, R/W and RS. P7 is connected to the Back Plane. I have been trying to use the I2C_LCD component which has not worked since it appears that the data is being transferred in an 8 bit format rather than upper and lower 4 bit nibbles. Are there any software solutions? I am hoping someone can point me in the right direction.

   

My PC board Layout design would be significantly simpler and I would be able to keep it to a single sided board if I could find an I2C solution rather than having to use the CHAR_LCD component to interface with the LCD.

   

Thanks

0 Likes
15 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Are you mixing up the components? The Character LCD component is using a 4-bit bus (7 signals in total) to interface a hitachi 44780 interface.

   

The component with I2C interface needs an LCD module with an I2C interface and there is no reason why you cannot get that running. You may even drop the component and program the I2C connection yourself. When you provide us with a link to your LCD module's datasheet we probably could help you a bit further.

   

 

   

Bob

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

I am including the image of the I2C interface Circuit that I am trying to use with the HD44780 LCD. I need to be able to generate a I2C serial output that simulates the 7 pin parallel output of the CHAR_LCD. I am assuming  the HD44780 LCD will need to be operating in the 4 bit mode with data sent as upper and lower 4 bit nibbles along with the appropriate E, R/W and RS levels for proper command and data transfer.

   

 

   

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You will need an I2C component configured as slave and a a character LCD component together with some glue software. Doesn't look too complicated.

   

 

   

Bob

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

I am including the Link to the data sheets for the HD44780 LCD and the PCF8574 I2C interface.

   

https://www.parallax.com/sites/default/files/downloads/603-00006-Hitachi-HD44780-Datasheet.pdf

   

http://www.nxp.com/documents/data_sheet/PCF8574_PCF8574A.pdf

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

I am have one of my HD44780 LCD displays hooked up to my bread boarded project using the CHAR_LCD component's  parallel outputs and is working fine. I also have the PCF2119 that came with the CyC8-038 kit hooked up using the I2C_LCD component which is also working as expected. I am looking forward to some help with glue. Are there any Example projects available so I can become more familiar with using the I2C Slave component.

   

Thanks for your help, Mike

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

In Creator, Start page there is an entry named "Examples and Kits" under which you will see a "Find Code Example" item. Use this to select I2C examples.

   

 

   

Bob

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

Last night, I got the SCB_I2c_CommandMaster and Slave project going using the 038 and 042 kits w/o difficulty. I have been studying the code but am not clear on how the cmd variable (which determines which LED will be turned on with the Slave) is declared and assigned a value since this does not appear in any statements of the Slave code or of the Master code  except statements 1062, 1065, 1066 and 1069 of the I2CM_I2C_MASTER.c File where it is declared and a value is assigned.

   

I am afraid I do not have enough in depth understanding of the PSoc 4 code to generate a New Component that would interface the CHAR_LCD component output to generate a serial output that can be converted back to a parallel output using the 8574 to drive the LCD. Hoping the Glue code will not be outside the scope of information provided by example projects  and documentation readily available on your web site.

   

Thanks for your continued help, Mike

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You do not need the 8574 chip, this can do the PSoC itself. You do not need to create a new component on the PSoC4, using the I2C and the Character LCD components directly will be quite enough.

   

I am working now with PSoCs for several years, but I never stuck my nose into one of the generated C-files, there was no need for.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Hi everyone...i am new user here. I worked on I2C using different controllers and as per my experience the component with I2C interface needs an LCD module with an I2C interface and there is no reason why you cannot get that running. You may even drop the component and program the I2C connection yourself. When you provide us with a link to your LCD module's datasheet we probably could help you a bit further.

   

impedance controlled printed circuit boards

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

I will go ahead an use the I2C_LCD interface and locate and I2C LCD controller. I was going to use the CHAR_LCD component but it will not automatically map to any of the pins of the 28 pin CY8C4245 package. Is there another way mapping the pins?

   

Thanks Mike
 

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

I am also new user here as well. I have not had much experience programming the I2C component. The most popular I2C LCD controller that I have found on the internet is the above 8574 I2C adaptor connected to the HD44780 LCD controller for Arduino users. My first choice was to find a way to make this work with the PSoC4. The only other I2C LCD controller that I can find is from DIGIKEY and here are the links to the datasheets. 

   

http://www.newhavendisplay.com/specs/NHD-C0220BiZ-FSW-FBW-3V3M.pdf

   

http://www.newhavendisplay.com/app_notes/ST7036.pdf

   

I am not sure if it will work with the PSoC4 I2C_LCD component. I am going to order the controller and give it a try.

   

The links for the dataheets for the 8574 I2C Adapter and HD44780 LCD controller are in one of the above previous comments.

   

Thanks mike

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Michael, re-reading all your posts about your problem it is not clear for me what you want to perform.

   
        
  • At one end is an LCD module that you want to use. Not yet clear which one, we did not get a link to the datasheet yet.
  •     
  • Why are you using the 8574 chip?
  •     
  • Do you want it to be replaced by PSoC functionality?
  •    
   

Mapping the pins of the Char LCD component to real pins on the PSoC is done in the .cydwr view. Use P2[0..6), works best.

   

Connections to the LCD are listed in datasheet page 14

   

 

   

Bob

0 Likes
MiBe_1380881
Level 4
Level 4
10 likes received First like received

Sorry I have not responded sooner but out of the country. I wanted to use the 8574 chip because  it is available in combination with a 2x16 LCD and the HD44780 controller for $3 on the Internet but for adurino users. And most important for my project you only need a 4 wire connector. I have come up with a software solution. I use the generated Source files from the CharLCDmp component with custom characters and no ASCII to number conversion. I copied these generated files to my Source File folder and Header File folder of my project. I then rewrote the code for the CharLCDmp.c file and CharLCDmp.h file replacing the code for the Control register with that for an IC2 master component. I then rewrote the code For the WriteControl function and the WriteData function. I send over a 4 Bytes to the slave(8574), the first byte with the upper nibble with the E line high and the second byte with the the upper nibble with the E line low. The 3rd byte is sent over with the lower nibble and the E line High and the 4th byte with the the lower nibble and the E line low. The RW line is held low and the RS line is held high for Writing data and held low for Writing control commands. The K line for the Back light is held high. These are the connections of the 8574 chip with the HD44780 controller for which the code was written. The P7-P4 of the 8574 chip  are connected to D7-D4 of the HD44780 controller.  P3 is connected to the Back Light K line, P2 connected to the E line, P1 to te RW line and P0 to the RS line. Included are the CharLCDsp.c and CharLCDsp.h files. A new I2C LCD component would be more straight forward for future projects but have not had the time for taking on a steep learning curve for generating a new component.

   

thanks for every ones help

0 Likes
Anonymous
Not applicable

Being New to group So take this opportunity to say hello to all fellow members . 

   

These days any parallelly interfaced character LCD you get  will have a Hitachi HD44780 chip or a different one compatible with the HD44780. These usually have 14 pins (16 if have backlight)

   

Pcb assembly

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the forum!

   

There is a character LCD component you can use. The interface is 7 wire wide, because it uses only a 4-bit databus. See datasheet.

   

Which development/ Prototyping kit are you using?

   

 

   

Bob

0 Likes