View Full Version : NS_eeprom_drv_011 and 24FC1025

04-27-2008, 09:17 PM
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[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[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[c]:=$00

· 'read back array
· eeprom.read(@imgt, $00, 512)
· repeat until eeprom.IsDone

· repeat c from 0 to 511
·· debug.bin(imgt[c],8)

well...the output shows like this one

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?

Mike Green
04-27-2008, 09:52 PM
The 24FC1025 has a 128 byte page buffer while the AT24C1024 has a 256 byte page buffer and the original NS_eeprom_drv_010 driver is written for a 256 page buffer. As you write the 2nd page of 128 bytes, you'll overwrite the 1st 128 bytes which is what gets written to the EEPROM. Try writing only 128 bytes at a time and pausing 5ms after each write.

04-27-2008, 10:22 PM
Hi Mike...of course you were right http://forums.parallax.com/images/smilies/smilewinkgrin.gif

I have replaced

··················· test··· param_eeprom_address,#$FF· wz··········· 'test if crossing a 256-byte page boundary··


··················· 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