i2c setup commands

MearCat

Member
I am reading/writing from 2 EEPROMs. I write one EEPROM until it's full, then move to the next EEPROM. But in the middle of a bunch of writes, I do a couple of reads, then contiunue writing.

Does the i2cslave commands have to be run before EVERY writei2c and/or readi2c command, or can I just run the i2cslave command once and then write, write, read, write, write, read, read etc until I want to start using the other EEPROM, at which point I run another i2cslave comamnds to set the new EEPROM address?

-Alan
 

womai

Senior Member
The i2cslave command only needs to be issued whenever you write to a new slave address, i.e. initially once, and then only when you move over to the second EEPROM. As long as you address the same EEPROM (same slave address), you can just do as many i2cread's or i2cwrite's as you like.

Wolfgang
 
Top