HI there-
In the data sheet for the PIC18F452, it lists pin C3 as SCL for the serial clock in/out for i2c mode, it also lists pin C4 as i2c Data I/O.
Do I have to use these pins for i2C communications? I have inherited a board that uses pins E1 and E2, both listed among other things, as digital IO.
Is there a way I can make this work?
The chip that I will be talking to is 24LC256/ 512.
Thanks!
N_N
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
Posted: Sat Mar 29, 2008 2:39 pm
Just specify PIN_E1 and PIN_E2 in the #use i2c() statement.
The compiler will create software i2c code for those pins.
It will work perfectly well.
Make sure your board has pull-up resistors on SDA and SCL.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum