Shop OBEX P1 Docs P2 Docs Learn Events
How to define DAT section for upper 32k part of 24LC512 EEPROM — Parallax Forums

How to define DAT section for upper 32k part of 24LC512 EEPROM

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

  • Cluso99Cluso99 Posts: 18,069

    @"william chan" said:

    Is it possible to store some strings in the upper half of 24LC512 eeprom using the ORG and DAT commands in Propeller Tool IDE ?

    No. You will need to use I2C routines to read and write to the upper 32KB of the eeprom

  • william chanwilliam chan Posts: 1,326
    edited 2021-11-23 03:52

    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?

  • evanhevanh Posts: 15,187

    From the Spin1 manual:

    ORG only affects symbol references; it does not affect the position of assembly code in the cog itself.

    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.

  • evanhevanh Posts: 15,187

    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.

  • JonnyMacJonnyMac Posts: 8,924
    edited 2021-11-23 16:07

    So if I have a lot of strings in my program, can i design my Propeller 1 board to use two 24LC256 DIP eeproms?

    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.

Sign In or Register to comment.