PDA

View Full Version : I2CREAD with EEPROMs



BigWumpus
- 19th June 2005, 16:14
Hello,

I've tried to use I2CREAD and -WRITE for communication between PICs. After several problems, I wrote the hole handling in assembler (slave) oder PBP (master). I works (but there is 1 problem with the CKL-bit in the Microchip-Dokumentation !!!!!)

Now, I want to "speak" to an 24FC512...
I2CWRITE is easy... submitting the adress and afterwards all the little bytes...

But, using I2CREAD... Is it true, the adress is transmitted by an I2C-"write" without data and afterwords the data is read by I2C-"read"-commands ? That clears some problems in my PIC-2-PIC-communication.

In order to wait for the end of a write-cycle of the EEPROM, I use an short I2CWRITE-command (Label: I2CWRITE SCL,SDA,Adr,[],Label) without data in order to get the errorcondition (No-ACK) to cycle until the write-cycle is done. Is that right ?