I2C-LCD Component

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

cross mob
EdUc_284901
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

Hi all!

   

I would like to know HOW do I use the I2C-LCD component. I put on the schematic an ADC Delta-Sigma, with pot and the I2C-LCD but it doesn't work!

   

Do I have to add the I2C component too?? I'm planning to use the I2C-LCD component in future project and I did the ADC-POT-I2C-LCD to get acquainted with the I2C-LCD.

   

If anyone can tell me how it goes I'll appreciate it a lot.

   

 

   

Thanks in advance to everyone!

   

Edgardo Ucha

0 Likes
56 Replies
JiGi_284761
Level 4
Level 4
Welcome!

You have the command to set the data size set to 4 bit. It needs to be 8 bits to work on I2C. It is set to 0x24. It should be 0x38

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

This is the backpack I'm using

0 Likes
EdUc_284901
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted
0 Likes
lock attach
Attachments are accessible only for community members.
EdUc_284901
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted
0 Likes
lock attach
Attachments are accessible only for community members.
EdUc_284901
Level 4
Level 4
50 replies posted 25 replies posted 10 replies posted

This one is corrected and added delay.

   

There i posted the backpack circuit (PCF8574) And the datasheet is uploaded too.

   

Can someone make a SIMPLE example like the one I'm trying to do that does work so I can see the whole thing? Why do I have to enable global interrupts and the datasheet doesn't say nothing?

   

Thank you all for the help!!

   

Edgardo

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

What you listed was a bus expander. It is a IC that is usually on a Backpack. The problem most probably isn't with the backpack. It just passes on the codes to the LCD display. The problem is with the LCD not getting the proper codes for Init.

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Then you need 4.7K pullups on SDA and SCL pins. Unless the backpack

   

controller has internal optional pins. Best way to confirm is thru vendors

   

datasheet or using scope look at pins to see if they ever achieve logic

   

CMOS high levels for the Vddio you are using.

   

 

   

Regards, Dana.

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

You need global interrupts because the data transfer is interrupt driven. Turn on the global interrupts after you initialize the IC2 Master.

   

 

   

You will never learn anything if you have others do it for you. But you sure learn a heck of a lot when you are trying to figure something out. 🙂

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

Thanks All!!

   

 

   

SCAS The pullup R's are on the backpack and they are all hi, according to the pcf datasheet it's 0x20.By the way, I'm still very new on psoc and more on ansi C. I always did motorola, now freescale, assembler coding. An to tell the truth secong time I use I2C. I just want to know how i2c works, i need to finish my job with this psoc 5, if it doesn't work, i'll use the classic form.

   

DANA: It's like the schematic I uploaded. It does have the pullups.

   

 

   

Thanks you all for the help, I'll be fighting it this weekend!

   

Regards Edgardo

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

I2C is easy to use

   

Like I say your problem is not the bus. It is the configuration of the LCD itself in the IC2-LCD Component/hardware.

   

I2C manuals

   

http://www.nxp.com/documents/application_note/AN10216.pdf

   

      http://www.nxp.com/documents/other/UM10204_v5.pdf

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

Thank yo SCAS!! Going to see the links!!

   

happy weekend to you and all!!!

   

Regards Edgardo

0 Likes
Anonymous
Not applicable

Please, can you upload your code if it works?

   

thaks

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

How did it work out?

   

If you don't have any test equipment you can use a multimeter and check the buss directly. If the SCL or SDA voltage to ground is either 5volt or close to zero there is a problem. It should be somewhere around midrange. Use this and  link some LED's to the Write error codes and I2C_CSR register and you can have some idea what is happening. 

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

I found the problem with that backpack. The manual is wrong. The correct addressee are from 0x20-0x27 not 0x00-0x07 like that manual says. This is the same backpack that Adafruit sells too.

0 Likes
Anonymous
Not applicable

 Hello,

   

 

   

I am trying to use this exact same set-up - the same display with the PSoC 4, using the I2C-LCD component - and getting no where.  I can get the display to work with the Arduino ... so I know it works.

   

Did anyone every this this working with the I2C-LCD component?  Can someone post what the final resolution was?

   

Thanks!

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

Since I2C is comparably easy (just two (2) lines, pullups already on pioneer) most errors and misunderstandings result from bad addressing.

   

The PSoC I2C component uses a 7-bit addressing scheme, internally appending the read/write bit at the end, so getting an 8-bit address. This might be different from other implementations and I would focus on that at first.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Consider posting your project for forum to take a look at -

   

 

   

    

   

          

   

“File”                                                             Creator

   

“Create Workspace Bundle”

   

 

   

Regards, Dana.

0 Likes