<IMG SRC="http://www.picbasic.co.uk/forum/attachment.php?attachmentid=1748&stc=1&d=118207160 5">
In your code you should be able to modify bit3 of your control byte OR you could use 2 different constant
Code:
Block0 CON %10100000
Block1 CON %10101000
and later you just need to use the according constant
Code:
I2CREAD SDA,SCL, Block0, Addr,[YourVar] ' read from Block0
I2CREAD SDA,SCL, Block1, Addr,[YourVar] ' read from Block1
<hr>
You could store the address and the Block in the PIC internal EEPROM (if equipped with) when you turn off the PSU. Battery back-up? Nah, i don't think so.
http://www.picbasic.co.uk/forum/show...52&postcount=3
Or it could be possible to detect a Brown-out/Power Down event.
<hr>
There's still the option to scan The Whole EEPROM until you reach a specific value or detect a blank cell ($FF).
But... How long this will need ?
Bookmarks