I2CIN I2COUT & array
Tumbler
Posts: 323
FOR i = 0 TO 10 add = (i * 16) DEBUG CR,DEC3 add," :" FOR j = 0 TO 15 add = (i * 16)+j I2CIN SDA, $A1,add.HIGHBYTE\add.LOWBYTE, [noparse][[/noparse]arr] DEBUG DEC3 arr,"," 'PAUSE 20 NEXT NEXT
This code reads a block eeprom data. But is it possible to read an array(16bytes) so i can read this block with only 1 for-next?
Comments
Thank you Mike
clears a part of an eeprom memor. However, When i make a dump:
I have searched here on this forum, the BS manual·and the datasheet (24lc128) but couldn't find anything about this problem.
Since i have no 4k7 resistors, i have used 10k resistors. Maybe this is the prob?
regards
I have to test it this evening, when i'm at home. But i don't think that's the problem. I'm sure all addresses·are filled with 255 (dec)·
Huh Mike, did you delete your last post here?
You can I2COUT bytes from an array --
I2COUT SDA, $A0, 0, [noparse][[/noparse]STR memloc\16]· ' 00·= start_addr for 0-15
and you can I2CIN bytes to an array --
I2CIN SDA, $A0, 16, [noparse][[/noparse]STR memloc\16]··'·16·= start_addr for 16-31
and all without a FOR...NEXT, when you do an STR the Stamp takes over and handles the rest.
PJ Allen: i'm using bytes. (array)