Page 1 of 1

I2C Display - any tips or tricks to get going ?

Posted: Mon Oct 13, 2014 12:28 pm
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

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

Posted: Mon Oct 13, 2014 9:34 pm
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

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

Posted: Mon Oct 13, 2014 10:07 pm
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

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

Posted: Sun Nov 02, 2014 4:27 am
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?