Dear All
I would like to play and learning :how write and read EXTERNAL data from eeprom 24c16 or 24c256 with picaxe code.Please see photo Thank you
I wish to read write only a few byte with 24c16 for easy start but I don't know how writing the code. I have tried this code (don't care over write or other problem just see the code is work or not) but led not blinking ( is mean no data out). . Please help me correct this code and show me how connected in out data to 18m2 .I hope you understand my need your help and will help me.
Sincerely many thank you
lamxe
I would like to play and learning :how write and read EXTERNAL data from eeprom 24c16 or 24c256 with picaxe code.Please see photo Thank you
I wish to read write only a few byte with 24c16 for easy start but I don't know how writing the code. I have tried this code (don't care over write or other problem just see the code is work or not) but led not blinking ( is mean no data out). . Please help me correct this code and show me how connected in out data to 18m2 .I hope you understand my need your help and will help me.
Sincerely many thank you
lamxe
Code:
#PICAXE 18m2
'
Symbol i2cAddr24LC256 = 100000 '
b0 = 0 'Initialise byte variables
b1 = 1
b2 = 2
b3 = 3
'
hi2cSetup i2cMaster, i2cAddr24LC256, i2cFast, i2cWord
Do
hi2cOut 0,(b0, b1, b2, b3) ; (DATA IN) 'Write values to bytes 0-4 of EEPROM . EXTERNAL 1hertz square wave
Pause 50
Inc b0
Inc b1
Inc b2
Inc b3
hi2cIn 0, (b4, b5, b6, b7) ;(DATA OUT)'Read values back from EEPROM .LED blink if right code
Debug
Pause 2000 'Wait 2 seconds
Loop
Attachments
-
78.6 KB Views: 24