Quote Originally Posted by ruijc View Post
Hi all,
The reason for this post is that i'm trying to get my 24LC512 eeprom to work with my PIC16F88.
I was successful with this eeprom and a PIC12F675, but for some reason with the 16F88 i cant read nor write anything.
I've search the forum for an answer but nothing worked.
I've read the pic16F88 datasheet over and over and i came up with some doubts.
Please try to answer my questions so i can proceed in finding a solution
According to the pic 16F88's datasheet ( I2C )Pin RB1 is for SDA and pin RB4 is for SCL.
1st question:
Is it mandatory that i use these ports to communicate with the eeprom ?
( this may be a silly question but for 12F675 i can use almost any pin for them ).
In the datasheet i have found that we need to clear SSPEN bit and program the 2 I2C ports as inputs.
2nd question:
For that to happen i need to mess with the SSPSTAT and SSPCON ?
If yes, can you please show me how can these be set ( since i dont understand the meaning of their bits )
thanks
You seem to have a bit of a problem with a little bit of everything, but then, that's why you're here...
PBP's I2C commands pretty much take care of everything for you, no extra work needed, with most chips.
First off, do you have pull up resistors on SDA/SCL like the manual shows?
Second...where's the code?