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
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

On start page Creator, "Fond Example Project", there are two projects listed

   

that you can open and examoine.

   

 

   

0 Likes
lock attach
Attachments are accessible only for community members.
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Post not complete, see attached.

   

 

   

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

Thank you for ther reply Dana...but I have only one example and that example really itsn't very clear to me if I can use the I2C-LCD alone with the lcd display or do I have to use one of the I2C modules and wich one! I'm still very new on the PSoC.

   

Thank you Dana and the rest.

   

 

   

Regards

   

Edgardo Ucha

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

The LCD you are using, if I2C, is a slave typically with a controller on it, so you would use

   

I2CM (Master) component in PSOC to complete the other end of the link.

   

 

   

Regards, Dana.

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

OK Dana! Got it! I thought that the I2C-LCD module had a I2C master incorporated.

   

 

   

Thank you very much for the help!

   

 

   

Regards

   

Edgardo Ucha

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

Hi again!

   

Why am I getting this error on #include <device.h> in the "I2C_LCD_Example01"?? I'm asking 'cause I can't find the solution. I have Creator 3.0 sp1 and updated.

   

Thank you!

   

 

   

Edgardo Ucha

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

Hi!

   

Seeing that I had a problem with the example I decided to work with the example " VoltageDisplay_DelSigADC" and change the LCD part and added the I2C module and the I2C_LCD part but I'm getting the following error:

   

pr.M0120:Build error: I2CLCD.h: No such file or directory

   

I can't find out why I'm getting this!!

   

Thanks to all

   

Edgardo Ucha

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

Ups! Forgot to upload bundle!

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

You just got the names wrong: there is no component on your schematic named I2C_LCD, you have got an LCD-module and an I2C-module.

   

In the properties of the LCD you have to set the I2C

   

In your program you must use I2C

   

 

   

Bob

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

Thank you Bob! Now I can compile, even thou I can't see nothing on the i2c-lcd yet.

   

Thanks to all for the help!

   

 

   

Regards

   

Edgardo Ucha

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

Post your actual project as before and we will have a look at.

   

 

   

Bob

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

... and a link to the datasheet of the LCD you use would be helpful, too.

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

Does the I2C set the pull down resistors on chip like the GPIO or do you need to do it physically?

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

Sorry, meant pull up's

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

You need the pullups physically. About 5K is a good approach depending on line length.

   

 

   

Bob

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

Here in the zip file is the design to test I2C-LCD. Within the zip are the datasheets of the I2C methods I'm using. The CLCD-216 and 420.pdf is a 4x20 lcd with backpackand LCD_I2C_Backpack_Datasheet_v01.pdf is a backback used with a Winstar WH1602L1 lcd.

   

I move the contrast pot on both and nothing shows. On the CLCD-216/420 only the cursor shows still. I'm using devkit 001 with psoc 5lp. I tried with power switch 3.3 and 5V with no positve results.

   

Thank you all for the help.

   

Regards

   

Edgardo

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

Looking at these datasheets are you using I2C because of pin limitations ?

   


   

Creator has a "Character LCD" componet that allows you to talk to a 44780 controled

   

LCD directly, using 7 pins, 3 for control, 4 for data. Eg. no need for backpack.....

   


   

Regards, Dana.

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

Are you fixed on using that display? Orient display makes a 4line by 20 display with integrated i2c. Ive used it many times on other processors and it works fine.

   

I am also having trouble getting the I2C Master/ Slave component on the PsOC5 to operate it.

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

I took a quick at your code and you don't have global interrupts enabled and the slave address is set at 0x00. The default address should be 0x3A.

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

Hello Dana! Thank you for the reply.

   

Yes It's a pin problem, due to space on a connector I'm using.

   

And answering SCAS I put address to 0x00 because the datasheet says that is default address is "0", It's OK if anyone changes the code I uploaded, I'm using it to test the I2C-LCD component.

   

Thank you all!

   

Regrads Edgardo

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

Every I2C device has a separate address. On page 3 of your backpack data sheet is the addresses. Default is 0x3A but can be changed with a little work.

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

Hi SCAS!

   

Which of the two are you talking about? CLCD-216 y 420.pdf or LCD_I2C_Backpack_Datasheet_v01.pdf?

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

The back pack. I took a look at the other data sheet and it does have a setting for 0-7.

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

Just a thought, maybe for a latter time, if you are going to

   

produce this as a product, use a PSOC 4 and a little code

   

to do the backpack function. This would fall into a < $ 1

   

part I should think. And coding fairly simple, eg. timing

   

etc. to 44780 is pretty simple.

   


   

Regards, Dana.

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

SCAS I did use 0x3A with the backpack and did not work, Then I tried with the other one (4x20 lcd) and did not work either. I even made a packpack myself with the PCA8574 and did not work, and I do know that PCA8574 circuit works cause I used it many times with my pics projects.

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

Dana the only psoc that I have is what my compny gave me and it's the one that comes with the devkit 001, I would like to know more about psoc 4 but they want a project with psoc 5lp and the files I uploaded was made only to test and see how I2C-LCD component works so I can use it on the original project.

   

 

   

Regrads and thanks to all!

   

 

   

Edgardo

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

Im in the same boat. Cant get it to work either. I was beginning to think I had a bad display but perhaps there is some other problem. According to the documentation, coding shouldn't be any different than a standard character display. But I haven't had much time to work on it. Im not inexperienced with IC2 either.  

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

I still can't make it to work, still working on it. Hope this thing works!

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

And if it doesn'y..welcom back pic!

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

I got mine to work. You need to go to the custom commands and change a few things. The component is set up for a 2 line x 16 display and your display is a 4 line by 20 and some of the commands are specific for the NXP display.

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

Hi SCAS!

   

But I have the other display and doesn't work either, it has an ordinary backpack with a 2x20 lcd display.

   

I was planning to build the one I'm uploadind to see if it works. I once made a mycase about 4x20 lcd and they told me I could use a 4x20 lcd, that was for the character lcd 2.0.

   

The i2c lcd I should use does it have to be NXP specific or can it be any kind with i2c backpack?

   

Can you upload your display datasheet please?

   

Thanks

   

Regards

   

Edgardo

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

Hi again to all!

   

Now I have a backpack made with the PCF8574T and lcd display Winstar WH1602L

   

The PCF8574T has A0,A1 and A2 at high level, according to it's datasheet it's address is 0x20.

   

The code is very simple but don't know why it dosen't work!

   

It should display HOLA on the LCD.

   

I suppose the coding is ok, but I'm not very acquainted with api's and where they go.

   

Thank you in advance! And hope someone can help.

   

Edgardo

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

And this is a photo of the backpack I bought recently

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

Cypress's I2C datasheet states clearly that SCL and SDA pins should be configured as "Open Drain drives Low" and not as bidirectional as you did.

   

What value do the pull-up resistors have?

   

 

   

Bob

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

Ahhhh... and of course you have to enable global interrupts.

   

Isn't there any initialization needed for the backpack?

   

 

   

Bob

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

Hi Bob!

   

The resistors are 4K7 each.

   

I did enable the global interrupt and the output of the I2C Master are Open Drain drives Low now but doesn't work either.

   

I used that backpack before and never had a problem, it's a Remote 8-bit I/O expander for I2C-bus widly used for pic when using a standart lcd with i2c backpack.

   

I'm uploading the PCF8574 datasheet.

   

Thank you Bob

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

The Init is part of the IC2-LCD part. You need to compare your commands with the ones that are in the I2C_Lcd helper.

   

Another issue is that some I2C LCD displays have an issue with the timing between the display itself and the I2C module.

   

Typically a 50 ms delay between initializing the I2c Module and the display will do the trick. Check your documentation. 

   

These usually have a power wire for both the I2C module (usually called logic) and the operating voltage for the LCD itself.

0 Likes
JiGi_284761
Level 4
Level 4
Welcome!

You don't have a position in your code for where to place the string. Also it tends to help if you reduce your bus clock to half or so of master clock.

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

Is the backpack compatible with NXP PCF2119x commands, as per the

   

setting in the LCD component shows ? Searching web no where in

   

backpack docs do I see this called out.

   

 

   

Looks like backpack takes care of the pullups, re below.....

   

 

   

Regards, Dana.

   

 

   

0 Likes