Skip to content

Instantly share code, notes, and snippets.

@andyleap
Last active May 17, 2016 23:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andyleap/428e7f58ebdd45264bdb41ca01acb564 to your computer and use it in GitHub Desktop.
Save andyleap/428e7f58ebdd45264bdb41ca01acb564 to your computer and use it in GitHub Desktop.

EEPROM

Device Description

An EEPROM that can be built into various devices to store supplementary data. Holds 8 words, that can only be read or written a single word at a time.

Interrupt Commands

All interrupt commands are done with A set to 0xFFF0, sent to the same device as the EEPROM is attached to. Register B is used to select the command, and X and Y are used for address and data.

  • 0x0001: READ
    • Reads word from address X and stores it in register Y.
  • 0x0002: WRITE
    • Writes word from register Y to address X. Note that writing to the EEPROM can only clear bits, not set them, so you may need to clear the EEPROM to write new values.
  • 0x0003: CLEAR
    • Clears all words to 0xFFFF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment