DetermineSize should work for 1 byte and 2 byte addresses
RobTillaart opened this issue · 5 comments
DetermineSize works but not for 1 and 2 bytes addresses in one go.
So the tests should be more explicit testing a given size.
Cause found
Three groups of address scheme
- 24LC512, 24LC256, 24LC128, 24LC64, 24LC32* have a clean 2 byte addressing scheme (*not tested)
- 24LC16, 24LC08, 24LC04 use resp. 3,2,1 bit of the device address byte as memory address
- 24LC02 and 24LC01 use no bit of the device address byte for memory address, but they mask 3 bits in device address as don't care.
Looks like a clean 1 byte address but in fact it is not.
I2C scanner sees in group 2 and 3 eight addresses on which the EEPROM responds.
Technically the 24LC16, 24LC08, 24LC04, 24LC02 and 24LC01 use all a similar addressing scheme.
Need to think about solution..
Currently implementing a new addressing scheme for all 24LCxx EEPROMS of 2K and below.
Did not to break existing code so far.
Testing will be finished later this week as I order some extra EEPROMS to test today.
Thanks Rob... Owen.
@owenduffy
in progress - https://github.com/RobTillaart/I2C_EEPROM/tree/develop
I have to do some tests before merging but it looks quite stable
Fixed in 1.4.0 2d60816