I2C DISPLAY PROBS

An area to discuss 8-bit PIC specific problems and examples

Moderator: Benj

Post Reply
siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

I2C DISPLAY PROBS

Post by siliconchip »

hi all I'm planning on using a 4x20 display in a future project, and thought that by using an I2C module plugged into the back of the display I could keep lcd wiring down to a minimum, I've done a test flowchart and it works in flowcode but when I use hardware the display stays blank, ive no idea how I2C works and maybe a bit naive on just plugging bits together , I'm not sure if I've got something wrong in software or I need a special lcd etc, any help would be appreciated

cheers in advance
bob
Attachments
4 x 20 display probs.fcfx
(8.9 KiB) Downloaded 85 times

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

morning all
ive been playing around with my program and in the lcd _I2C properties I changed the channel from software to channel 1 and when compiling I get the error messages
209.#error this chip does not have master I2C capability or flowcode does not currently support it
103.#error this chip does not have master I2C capability or flowcode does not currently support it

but if I compile using channel - software it goes through ok, I also changed the address from 32 to 27 which I found for the I2C adapter I have plugged into my lcd on a data sheet but makes no difference the lcd just lights up, do I need to add the I2C component from the tools or comms selection if so do I need master or slave and how would this be set up, or is it that I'm using the wrong chip and how would I find out what pic would be compatible to use with flowcode ?? lots of questions I know but I'm totally in the dark and cant seem to find any thing on this site or on line to help :oops:
bob

jgu1
Posts: 1203
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: I2C DISPLAY PROBS

Post by jgu1 »

Hi Bob!

I have one arduino and a display with I2C ready. Preveiusly I had No problem with this. I Will make a test with your program later today, and you hear.

Br Jorgen.

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

hi jorgen i would appreciate that thank you

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

hi,
spent the morning researching the I2C system on the net and from what I understand I have a substantial piece of code missing to get the display working ie I need to initialise ,start and send slave address and data etc but I'm unsure how I would need to send a string message as data etc any help please

bob

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

hi all
thanks to an article in programming tips and tricks by jay dee from 2016 I found the info I needed regards the I2C controller I have, I needed to set the address in the lcd to match the address in the i2c master I also needed to add and initialise and as jay dee said flowcode does the rest works spot on in hardware plus ive learnt the basics of I2C which cant be bad :D

bob

jgu1
Posts: 1203
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: I2C DISPLAY PROBS

Post by jgu1 »

Hi Bob!

I test your program in FC7.3.05 the latest update, your are right it doesn´t work now. I try to change the chip to an arduino, but it will not compile.
If I remove the display from panel, it will compile ok, so there are a bug with these I2C display.

I started my other PC, with FC7 ver. 7.2 Not updated yet. In this version, your program work fine, no problem, the I2C display work fine. ????
Then I started FC6, and there everything also is ok.

Conclution, after update to 7.3.05, the I2c display is not working. :( Hopefully MM team fix this ASAP.

Happy newyear.

Jorgen
Attachments
I2c.PNG
(34.98 KiB) Downloaded 3709 times

mnf
Valued Contributor
Valued Contributor
Posts: 853
Joined: Wed May 31, 2017 11:57 am
Contact:

Re: I2C DISPLAY PROBS

Post by mnf »

Hi,

It depends on what i2c port expander is used in the display. I have a 'cheap' Chinese display and it seems to use the PCF8574 port expander to connect i2c to the LCD display's inputs.

I started thinking about creating a component to support this - but it lead me down some twisty passages on the way - see my post about Port Expander MCP230xx in the user components section...

Have a look on your i2c 'backpack' and see what chip it uses..

Martin

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

hi martin
I looked at the ic on my i2c backpack and its the same jay dee describes in his write up he also tells you the addresses between 2 different versions with this back pack I followed his write up and my 4x20 works perfectly now

bob

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

hi Jorgen
I got my display to work in the end my issue seemed to be a little more code needed and getting the addresses right I also needed to add the master I2C component, but my seems to be ok now

bob

mnf
Valued Contributor
Valued Contributor
Posts: 853
Joined: Wed May 31, 2017 11:57 am
Contact:

Re: I2C DISPLAY PROBS

Post by mnf »

Cool.

Would you be able to post the code?

jgu1
Posts: 1203
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: I2C DISPLAY PROBS

Post by jgu1 »

Hi BOB!

Ok Bob, it is nessesary to add I2c component. In ver. 7.2 you could only add the I2c display to the panel without anything else, and it work.

Strange. Are you running FC7.3.05??? Because after my updating I am not able to use I2c display at all. As mnf said, please would you attack your new program?

And Please, Would you try to compile my testprogram. I think, if you have ver. 7.2 it is ok but if you have ver. 7.3 it not working. And other also, please, to confirm my mistake :wink:

Br jorgen
Attachments
I2C Display Test..fcfx
(7.73 KiB) Downloaded 42 times

siliconchip
Posts: 264
Joined: Wed Jan 05, 2011 11:24 am
Contact:

Re: I2C DISPLAY PROBS

Post by siliconchip »

hi jorgen and martin
ive added my simple program that got the lcd working, also Jorgen im on version 7.2 for some reason I'm having trouble installing the 7.3 update, Jorgen I have tried compiling your program and it comes back as success hope this helps you both

bob
Attachments
4 x 20 display probs.fcfx
(10.53 KiB) Downloaded 42 times

jgu1
Posts: 1203
Joined: Tue Oct 06, 2009 9:39 am
Contact:

Re: I2C DISPLAY PROBS

Post by jgu1 »

Hi Bob!

Thank´s for testing. As I mentioned, the display worked in ver. 2 but not in ver. 3

I have reported a bug, hopefully MM will take a look.

Thanks.

Br. Jorgen.

User avatar
Benj
Matrix Staff
Posts: 14929
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Contact:

Re: I2C DISPLAY PROBS

Post by Benj »

Hello,

Sorry for this, the problem has come about from adding remappable I2C functionality to the I2C components as used on some of the newer PIC devices.

I have now fixed the component and posted the updated component here.
viewtopic.php?f=64&t=19665&p=85810#p85810

Post Reply