-1

I am working on a university project in which i need to interface pic18f4550 with i2c EEPROM.

I implemented the following circuit using proteus simulator. The following in my connections

enter image description here

when I implemented the interfacing on real, I faced a problem when the PIC reads from the eeprom. it is suspended and so I was not able to see if the reading operation was performed correctly.

What could be the problem?

Developer
  • 1,803
  • 2
  • 15
  • 26
  • I recommend editing your question to clarify what your actual problem is, past 'it doesn't work'. Your hardware looks correct, but what does 'it is suspended' mean? – Adam Casey Apr 11 '12 at 15:19

1 Answers1

0

You do need to make sure you are following the I2C protocol for reading an EEPROM, and that is best served with a state machine on a PIC.

Try sequencing through the following actions, making sure your flags are set correctly:

  1. Start condition
  2. Write to the EEPROM with the address to which you want to read.
  3. Repeated Start condition.
  4. Read from the EEPROM as many bytes as required (keep in mind that the EEPROM is paged, and you will roll over if you go past a page boundary.)
  5. Stop condition
Adam Casey
  • 949
  • 2
  • 8
  • 24