starting with I2C read/write devices addressing
I'm just starting a project involving the use of an external EEPROM. I think about to use a 24LC64 (that's is what I could find in my drawer...).
After ten years playing with PICs, I've still never used external mem chips before neither experimented I2C :o
As a first step, on my breadboard, I put up a 16F690, a DS1307 (RTC) and the 24LC64.
Just for the exercise, my program will read the RTC and store (kind of time stamp) it in the external memory.
Before doing that, I found TimC's I2C device scanner just to make sure my devices "respond" correctly.
The I2C scanner "sees" both devices (DS1207 + 24LC64) but here starts my interrogation: for each device, I get two "addresses". For the 24LC64 I get $A0 and $A1 and for the DS1307 I get $D0 and $D1.
What does this mean?
Re: starting with I2C read/write devices addressing
Bit 0 is RW bit, and PBP set it automatically.
Your device address is $A0 and $D0.
For RTC address variable MUST be byte, for your EEPROM address MUST be word. This is because PBP will send 8 or 16 address bits depending on what type variable is used, as far as I know. And RTC expect 8bit address, EEPROM 16bit.
64K eeprom is not 64KB it is 64Kbit, which is 8192 bytes.
starting with I2C read/write devices addressing
This answer is loud and clear :cool:
I'll give it a try now.
Thanks a lot, pedja089.
Re: starting with I2C read/write devices addressing