So im researching how to interface with a EEPROM Chip via I2C with an AVR (Still learning a lot of the interfacing).
Anyways, the AT24C16 for instance (or that family of EEPROM) seem pretty popular. I looked at the datasheet and it mostly made sense besides one part:
So I think my confusion lies in tehe "Addresses" of where to write. Or maybe im confusing device address? If I only had 1 eeprom connected....would it just be zero? Im assuming this is just if you had more than one chip on the i2c line?
Anyways lets pretend I have 1, I would need to do these steps from my understanding (correct me if im wrong):
- Initialize I2C
- Send the Start bit
- Send the device address (Which I guess would be 0x00?, this assumed write in R/W is 0 of course since it's the LSB)
- Wait for the ACK back from the EEPROM (Would this literally just be a 0 coming back or what?)
- Write the word Address (I don't understand how a chip can have 1024 locations for instance if there are 8 bits for a location? the max value for 8 bits is 255?)
- Wait for ACK to see if thats a valid address
- Send my data until i send stop bit (I assume the EEPROM "knows" to move it to the next address after each data byte? or do you have to update the word address each time?)
Thanks! just a bit confused by the inner workings.