Setup for I2C Communicating Using PIC18F4550 to the LCD2041?

LK/ELK/VK/PK/OK/MX/GLK/EGLK/GVK/GLT Series

Moderators: Henry, Mods

Post Reply
haru676
LCD?
Posts: 2
Joined: Sun Feb 25, 2007 10:35 pm

Setup for I2C Communicating Using PIC18F4550 to the LCD2041?

Post 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.
Raquel
Matrix Orbital
Matrix Orbital
Posts: 834
Joined: Thu Aug 19, 2004 3:37 pm
Location: MO Office

Post 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,
Raquel Malinis
Design and Development
Matrix Orbital
Post Reply