Shop OBEX P1 Docs P2 Docs Learn Events
VAR memory address — Parallax Forums

VAR memory address

lardomlardom Posts: 1,659
edited 2010-03-22 03:11 in Propeller 1
I recently viewed a thread that discussed writing to eeprom. I'm trying to learn to read a memory map.·My eyes widened·when I read that·a VAR or DAT·memory address in ram and eeprom·is the same. Can anyone tell me how to spot a·variable or a dat file in memory?

Comments

  • StefanL38StefanL38 Posts: 2,292
    edited 2010-03-21 21:08
    Hello lardom,

    for retrieving the adress of variables you can use the "@"-operator and the "@@"-operatir. See Propeller-manual page 173

    best regards

    Stefan
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-21 21:31
    It's not about spotting one, if it is a variable then just update it to eeprom with the i2c.ewr(@variable,variable). I thought the example was self-explanatory. I will check the obex and make sure that the eewr is one of the methods I mentioned. Either way it is about writing a long to EEPROM to update it.

    EDIT: moved edits to new message

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*

    Post Edited (Peter Jakacki) : 3/21/2010 11:04:03 PM GMT
  • Peter JakackiPeter Jakacki Posts: 10,193
    edited 2010-03-21 23:02
    Here are three objects that can be used with the EEPROM.

    Mike Green - Basic_I2C_Driver
    WriteLong(SCL, devSel, addrReg, data)
    This driver has a writewait method rather than polling I2C address ack normally.

    James Burrows - i2cobject
    Add this method
    pub eewr(addr,data)
      writeLocation(deviceadr,addr,data,16,4)
    


    Where deviceadr normally equals $A0.
    This driver does not poll the IC2 address ack to see if it's ready.

    Kye - ROMEngine
    writeLong(EEPROMaddress, value)
    This driver correctly polls the IC2 address ack to see if it's ready and timeouts as well. This is probably the best out of three.


    @Kye, The name is a bit of misnomer as EEPROM is Electrically Erasable, Programmable, and lastly Read Only Memory.
    EEEngine might be more appropriate for a name and removing the repeated min/max/shift operators will improve read speed at least (just saw the "constant" operator)

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    *Peter*

    Post Edited (Peter Jakacki) : 3/22/2010 12:18:42 AM GMT
  • lardomlardom Posts: 1,659
    edited 2010-03-22 03:11
    I hope I'm not losing it but this is·my third attempt to reply to this post. Stefan and Peter...Thanks for your help.
Sign In or Register to comment.