Using the PSoC 5LP with LCD with I2C interface

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

cross mob
lock attach
Attachments are accessible only for community members.
Anonymous
Not applicable

Hi guys! I'm currently working on a project and I need to use a LCD display (the one I got is the 2004a)  that component uses a  expander for I2C-bus (PCF8574T), but I have some problems making it work. I'm using the CY8C588LTI-LP097  PSoC 5LP. My top design includes an I2C and an I2C LCD component  but I doesn't work.  I have tried to use the I2C LCD example but I couldn't make it work. Any kind of help will be much appreciated.

   

PS: I attached the bundle of my project and the datasheets of both the 2004a and the PCF8574T.

   

Thanks!

0 Likes
1 Solution
MiKO_283856
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

It seems your 2004A LCD Display is using a ST706x (google search) on-board controller which is not directly compatible with the I2C_LCD component when used with its default parameters tuned for a NXP-like PCF21119x controller.

   

I guess you have to match the basic commands using option "Custom Format", but I've never used it. See if there's an example project to help you do so.

   

After a search in the Component forum, this post might help :

   

http://www.cypress.com/forum/psoc-community-components/charlcdi2c-component-interface-pcf8574at-hd44...

   

 

   

Michel 

View solution in original post

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

Welcome in the forum!

   

Base PCF8574T address is 0x40 when the A addresses are zero and 0x4E when all A addresses are high.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

I enter the value "0x4e" in the "Default I2C Address", which appears to be the correct value  but I when I enter any command the display goes off. The ClearDisplay function turns off the display and don't clear the display for example, the putc and putstring functions don't work at all. What could be the problem?

0 Likes
MiKO_283856
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

It seems your 2004A LCD Display is using a ST706x (google search) on-board controller which is not directly compatible with the I2C_LCD component when used with its default parameters tuned for a NXP-like PCF21119x controller.

   

I guess you have to match the basic commands using option "Custom Format", but I've never used it. See if there's an example project to help you do so.

   

After a search in the Component forum, this post might help :

   

http://www.cypress.com/forum/psoc-community-components/charlcdi2c-component-interface-pcf8574at-hd44...

   

 

   

Michel 

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

The custom commands of the LCD component do not match the needed commands for the display.

   

For instance: the "Clear screen" sends two bytes (0x00, 0x01) while the LCD only needs one byte.

   

A byte sequence for 8 bit data bus initialization of LCD is required, see LCD datasheet.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

Thanks for the replies! I try to put the command in 8 bit format, but still got some errors. What I'm doing wrong? I attached several images with the errors.

   

Thanks!

   

   

   

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

Duplicate Case Error means you have defined two cases with the same value in the switch statement.  

0 Likes
Anonymous
Not applicable

Yes that's correct! That happens because I changed the command size to 1 and apparently that causes that error (as you can see in the attached image in my previous post). I starting to thing that the I2C LCD component is not design to work with my 2004LCD and  specially the PCF8574.

0 Likes
AnkitaS_51
Employee
Employee
100 likes received 50 likes received 25 likes received

This forum post may be useful see from interaction#31-

   

http://www.cypress.com/forum/psoc-5-device-programming/i2c-lcd-component?page=2