"Propeller Eeprom" works for upper 32kB of 64kB EEPROM chip
Rayman
Posts: 14,849
I needed some memory and didn't have enough room for the FSRW SD card driver...
Anyway, since didn't need a lot of space (32kB) is enough, I tried one of my favorites:
Propeller Eeprom.spin (from the PE Kit Lab)
http://forums.parallax.com/showthread.php?97625-PE-Kit-Lab-Applications--EEPROM-Datalogging-and-I2C&p=678271#post678271
It doesn't say anything about accessing the upper 32kB, but it's working great for me.
One nice thing is that it is tiny and hardly uses any RAM.
I'm just using the FromRam and ToRam functions to read and write from the leftover space in EEPROM.
(just be sure to start at 32768 and not 32000 like I did at first
May use this in the future for field firmware upgrades for a temporary space for the new firmware...
Anyway, since didn't need a lot of space (32kB) is enough, I tried one of my favorites:
Propeller Eeprom.spin (from the PE Kit Lab)
http://forums.parallax.com/showthread.php?97625-PE-Kit-Lab-Applications--EEPROM-Datalogging-and-I2C&p=678271#post678271
It doesn't say anything about accessing the upper 32kB, but it's working great for me.
One nice thing is that it is tiny and hardly uses any RAM.
I'm just using the FromRam and ToRam functions to read and write from the leftover space in EEPROM.
(just be sure to start at 32768 and not 32000 like I did at first
May use this in the future for field firmware upgrades for a temporary space for the new firmware...
Comments
Be aware "Propeller Eeprom" doesn't release the I2C clock line with its I2CStop method. If you're sharing the I2C bus with other devices, you'll want to make the clock line an input prior to calling methods from other I2C objects.
I like to use hexadecimal addresses with EEPROM. I think it's easier to remember $8000 than 32768. With hex the last EEPROM address is $FFFF; an address of $10000 is out of range.
If your checking your addresses to make sure they aren't out of range, make sure and use a long to hold the address instead of a word. A word address will never be larger than $FFFF so your out of range check wont work and you'll end up writing to lower EEPROM instead of high EEPROM. (This caused me much hair-pulling yesterday.)
Yes, exactly... I'm storing some bitmap files there that are about 6 kB each. I'm bringing them into HUB RAM one at a time for display...
The upper memory is basically permanent storage because the Prop Tool leaves it alone.
I always drop a 64K EE into my projects; the cost differential is small and the have 32K of nonvolatile storage is always handy.
But, putting in the bigger chip turns that into a nice little extra...