Page 1 of 1

PICF452 I2C routine in microchip C

Posted: Thu Dec 18, 2003 6:24 am
by barfly
Hey,

does any of you have a C routine i can start with for displaying some characters on an I2C display (maxtrix orbital 2041)
something like this should do the job i thought,.. but no :-?

any help is appreciated

void main (void)
{

OpenI2C(MASTER, SLEW_ON);
StartI2C();
WriteI2C(0xB8); //B8 = display adress
NotAckI2C();
WriteI2C(0xFE); // command prefix
NotAckI2C();
WriteI2C(0x46); // Turn backlight off
NotAckI2C();
StopI2C();
CloseI2C();

}

Thanks,

K

Posted: Wed Apr 14, 2004 10:29 am
by byrosis
i've been fighting a similar fight a couple of days ago ... the routines in the last posts work but the basic idea is there ...

http://www.lcdforums.com/forums/viewtopic.php?t=1893

please let me know if you have problems with my technique .. and also any suggestions for improvements.