How to define DAT section for upper 32k part of 24LC512 EEPROM
william chan
Posts: 1,326
in Propeller 1
Is it possible to store some strings in the upper half of 24LC512 eeprom using the ORG and DAT commands in Propeller Tool IDE ?
Comments
No. You will need to use I2C routines to read and write to the upper 32KB of the eeprom
So if I have a lot of strings in my program, can i design my Propeller 1 board to use two 24LC256 DIP eeproms ?
Create two spin programs, one with the DAT strings and another one with the actual program.
First download the DAT program into one eeprom, then pull it out and plug it into the second ic socket.
Then plug in the other eeprom into the first ic socket and download the second spin program.
Use the ORG command to set the locations of each string data.
Will this work?
From the Spin1 manual:
And that's cogRAM only, btw. ORG doesn't do references to hubRAM, let alone EEPROM.
And that's cogRAM only, btw. ORG doesn't do references to hubRAM, let alone EEPROM.
That could present a problem of finding the strings in the second eeprom.
Simple answer is, no, those assembler directives don't do what you were thinking of. Their purpose is quite different. You need code to do the copying of data between the Propeller and EEPROM.
You can use a 24LC512 and get 64K in one package. The download process from Propeller Tool will only overwrite the lower 32K, leaving the upper 32K unbotherd.
I use this in a commercial laser-tag controller project. The device has three different programs it runs (precompiled images from its SD card): setup, referee, and player. The configuration values from the setup program are store in the upper part of the EEPROM. This allows the referee or player apps to be loaded into the lower 32K and access those values.
I've attached my 64K EE object for you to play with. It hast functions for writing and reading strings from the EEPROM.