Page 1 of 1

I2C DISPLAY PROBS

Posted: Fri Dec 29, 2017 8:16 pm
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

Re: I2C DISPLAY PROBS

Posted: Sat Dec 30, 2017 11:49 am
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

Re: I2C DISPLAY PROBS

Posted: Sun Dec 31, 2017 9:35 am
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.

Re: I2C DISPLAY PROBS

Posted: Sun Dec 31, 2017 9:42 am
by siliconchip
hi jorgen i would appreciate that thank you

Re: I2C DISPLAY PROBS

Posted: Sun Dec 31, 2017 4:49 pm
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

Re: I2C DISPLAY PROBS

Posted: Sun Dec 31, 2017 7:33 pm
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

Re: I2C DISPLAY PROBS

Posted: Sun Dec 31, 2017 8:44 pm
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

Re: I2C DISPLAY PROBS

Posted: Mon Jan 01, 2018 9:08 am
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

Re: I2C DISPLAY PROBS

Posted: Mon Jan 01, 2018 10:15 am
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

Re: I2C DISPLAY PROBS

Posted: Mon Jan 01, 2018 10:18 am
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

Re: I2C DISPLAY PROBS

Posted: Mon Jan 01, 2018 12:10 pm
by mnf
Cool.

Would you be able to post the code?

Re: I2C DISPLAY PROBS

Posted: Mon Jan 01, 2018 1:57 pm
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

Re: I2C DISPLAY PROBS

Posted: Mon Jan 01, 2018 8:55 pm
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

Re: I2C DISPLAY PROBS

Posted: Tue Jan 02, 2018 8:09 pm
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.

Re: I2C DISPLAY PROBS

Posted: Wed Jan 03, 2018 11:24 am
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