Page 1 of 1

Setup for I2C Communicating Using PIC18F4550 to the LCD2041?

Posted: Mon Feb 26, 2007 12:27 am
by haru676
I was wondering how to hardwire and LCD2041 to the PIC18F4550 to communicate using I2C. I know the pins 1(VDD) and 4(GROUND) will go on the breadboard to VDD and Ground. And the pins 2(SCL) and 3(SDA) will go into the PIC's SDA and SCL lines. I also know that i will be using RA3 and RA4 as my inputs. But i dont know what to do next? Do i need 220 omhs and 10K pullup resistors to connect to SDA and SCL lines? What else do i need to do so that when i program my pic with the I2C commands, it will communicate successfully with the display? I am not sure how to setup rest of the circuit to communicate successfully using I2C with the PIC18F4550(Master) to the LCD2041-WB(Slave). I would really appreciate if someone could help me with this issue.

Posted: Mon Feb 26, 2007 12:22 pm
by Raquel
Hello haru676,

Thanks for your post.

For I2C, you have got most of the connections right:
VCC - +5V
SCL - PIC's SCL (with pull up's from 2K to 10K)
SDA - PIC's SDA (wiht pull up's from 2K to 10K)
GND - ground

All you need to do then is to follow the data sheet for the PIC18F4550. Here are a couple posts that might help you:
http://lcdforums.com/forums/viewtopic.p ... 1e1e#17470
http://lcdforums.com/forums/viewtopic.p ... 1e1e#16607

I recommend that before you change to I2C mode, play with the module in RS232 mode using uProject (you can get it here).

Best Regards,