NS_eeprom_drv_011 and 24FC1025
nicolad76
Posts: 164
Hi,
I have found above driver (designed for AT24C1024) and I adapted it for 24FC1025. It seems working fine..only thing I did was to proprly change the device_address·to properly address my chip.
I have run the below test
imgtc is defined as byte imgt[noparse][[/noparse]512]
· 'start eeprom driver
· eeprom.start(8, 9, 0)
· debug.start(31,30)
·
· ' put some data in array
· repeat c from 0 to 511
·· imgt[noparse][[/noparse]c]:=c // 255
· 'write·to EEPROM
· eeprom.write(@imgt, $00, 512)
· repeat until eeprom.IsDone
· 'clean up array
· repeat c from 0 to 511
·· imgt[noparse][[/noparse]c]:=$00
· 'read back array
· eeprom.read(@imgt, $00, 512)
· repeat until eeprom.IsDone
· repeat c from 0 to 511
·· debug.bin(imgt[noparse][[/noparse]c],8)
well...the output shows like this one
·[noparse][[/noparse]10000001]
·[noparse][[/noparse]10000010]
·[noparse][[/noparse]10000011]
·[noparse][[/noparse]10000100]
·[noparse][[/noparse]10000101]
·[noparse][[/noparse]10000110]
·[noparse][[/noparse]10000111]
·[noparse][[/noparse]10001000]
·[noparse][[/noparse]10001001]
·[noparse][[/noparse]10001010]
·[noparse][[/noparse]10001011]
it seems taking the first bit as sign??? which means it takes 7 bit data...
am I doing anything wrong here or I should work on the driver?
I have found above driver (designed for AT24C1024) and I adapted it for 24FC1025. It seems working fine..only thing I did was to proprly change the device_address·to properly address my chip.
I have run the below test
imgtc is defined as byte imgt[noparse][[/noparse]512]
· 'start eeprom driver
· eeprom.start(8, 9, 0)
· debug.start(31,30)
·
· ' put some data in array
· repeat c from 0 to 511
·· imgt[noparse][[/noparse]c]:=c // 255
· 'write·to EEPROM
· eeprom.write(@imgt, $00, 512)
· repeat until eeprom.IsDone
· 'clean up array
· repeat c from 0 to 511
·· imgt[noparse][[/noparse]c]:=$00
· 'read back array
· eeprom.read(@imgt, $00, 512)
· repeat until eeprom.IsDone
· repeat c from 0 to 511
·· debug.bin(imgt[noparse][[/noparse]c],8)
well...the output shows like this one
·[noparse][[/noparse]10000001]
·[noparse][[/noparse]10000010]
·[noparse][[/noparse]10000011]
·[noparse][[/noparse]10000100]
·[noparse][[/noparse]10000101]
·[noparse][[/noparse]10000110]
·[noparse][[/noparse]10000111]
·[noparse][[/noparse]10001000]
·[noparse][[/noparse]10001001]
·[noparse][[/noparse]10001010]
·[noparse][[/noparse]10001011]
it seems taking the first bit as sign??? which means it takes 7 bit data...
am I doing anything wrong here or I should work on the driver?
Comments
I have replaced
··················· test··· param_eeprom_address,#$FF· wz··········· 'test if crossing a 256-byte page boundary··
with
··················· test··· param_eeprom_address,#$7F· wz··········· 'test if crossing a 128-byte page boundary··
and I was able to write 3168 bytes in a single call.
It seems the driver takes care of splitting the array to fit the right size of page and perform multiple calls to write them all....well at the end it worked!!
Thanks Mike