Shop OBEX P1 Docs P2 Docs Learn Events
Do EE addresses rollover after 2047 ($7FF) on multi-slot Stamps? — Parallax Forums

Do EE addresses rollover after 2047 ($7FF) on multi-slot Stamps?

ZootZoot Posts: 2,227
edited 2007-03-04 22:44 in BASIC Stamp
I have a utility for burning about 8k of data from slots 1-4 to an external EEPROM. My utility works great, but since my code is generally bloated, I revisted the Stamp manual where there is code like the following for handling multi-slot (flat) EE reading/writing:


FOR EEaddr = 0 TO 6000

   STORE EEaddr >> 11 + 1                       'store in slot 1-x
   WRITE EEaddr, $FF

NEXT






In my own bloated utility I did some math to map the EEaddr to 0-2047 for any given slot (regardless of the original value of EEaddr), but in looking at above code, I am presuming that EE addresses for READ and WRITE rollover to 0 from 2047? But I couldn't find explicit mention of this in the Stamp manual under READ, WRITE or STORE.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
When the going gets weird, the weird turn pro. -- HST

Comments

  • Tracy AllenTracy Allen Posts: 6,664
    edited 2007-03-04 22:44
    The READ and WRITE commands ignore the high bits and do their thing using the 11 bits necessary to address locations 0 to 2047. So WRTTE 2048,x has the same effect as WRITE 0,x.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Tracy Allen
    www.emesystems.com
Sign In or Register to comment.