I2C Display - any tips or tricks to get going ?

For Flowcode users to discuss projects, flowcharts, and any other issues related to Flowcode 6.

Moderator: Benj

Post Reply
User avatar
John_RSD
Posts: 20
Joined: Sun May 15, 2011 9:23 pm
Location: UK
Has thanked: 3 times
Been thanked: 2 times
Contact:

I2C Display - any tips or tricks to get going ?

Post by John_RSD »

Hi guys

For those that have worked with the I2C display component do you have any advice on getting it running.

I have access to an I2C display anytime, but I have a box of sample ones in nice Blue and would like to get them running and would like to replace the parallel display I have now with I2C to get my IO back :-D.

The data sheet for the display I have is here DATASHEET and that even has example code for it

Do you have to create a custom component for each device ? (likely I guess)

John
Many thanks

John

User avatar
tiny
Posts: 200
Joined: Wed Jul 08, 2009 8:29 am
Has thanked: 51 times
Been thanked: 93 times
Contact:

Re: I2C Display - any tips or tricks to get going ?

Post by tiny »

Hi John,
I use an I2C display 3x12 characters. Below is my routine, summarized in a macro. Maybe it helps you a bit, the address and the commands must be adapted to your display.

Tiny
LCD316_Ctrl.fcfx
(11.01 KiB) Downloaded 245 times

User avatar
John_RSD
Posts: 20
Joined: Sun May 15, 2011 9:23 pm
Location: UK
Has thanked: 3 times
Been thanked: 2 times
Contact:

Re: I2C Display - any tips or tricks to get going ?

Post by John_RSD »

Hi Tiny

I already discovered the documented address was not correct, it is actually 32 not 40 as in the data sheet examples.

With a base address of 32 I can now see characters and see them changing between my specified strings but it does not seem to follow the row command. The characters are also gibberish and the wrong length but as both strings are the same apart from the last character I can see that on the display when it changes, only the last chars displayed change.

So seems row/column is not quite right as well as the character mapping.

Still working on it, never created a custom component before but I guess this is where it is heading.

John
Many thanks

John

GTF
Posts: 170
Joined: Sat Dec 10, 2011 7:21 pm
Location: Canada
Has thanked: 20 times
Been thanked: 52 times
Contact:

Re: I2C Display - any tips or tricks to get going ?

Post by GTF »

If you have updated to 6.1 you will need to download the fixed PIC_CAL_I2C.c file from this thread: http://www.matrixtsl.com/mmforums/viewt ... 54&t=15416

You may want to remove/comment out the 10 msec delays in the I2C Master Stop function in that file if speed is a concern.

You may be able to use the existing LCD I2C component (attached) or edit it for use with your hardware.

What I2C expander is used with that display?
Attachments
LCD I2C.fcfx
(44.24 KiB) Downloaded 204 times

Post Reply