This SRAM write method can be used if storing a
different device configuration to EEPROM without disrupting the current operational
state of the device is required. This method requires the SRAM/EEPROM map data to be
already generated, which can be done by the TICS Pro software. The SRAM can be
directly written without modifying the active configuration registers through
the following sequence:
- Write the most significant 5
bits of the SRAM address to R169 (MEMADR byte 1) and write the least
significant 8 bits of the SRAM address to R170 (MEMADR byte 0).
- Write the SRAM data byte to
R172 (RAMDAT byte) for the SRAM address specified in the previous step in
the same register transaction.
- Any additional write transfers in same transaction
causes the SRAM address pointer to be auto-incremented and a
subsequent write takes place at the next SRAM address.
- Byte or Block write transfers to R172 can be used
to write the entire SRAM map sequentially from Byte 0 to 508 (509
bytes total).
- Alternatively, write R169 and R170 before each
write to R172 to set the memory address explicitly (that is, bypass
the memory pointer auto-increment) is valid.
- Access to the SRAM terminates at the end of
current write transaction. Note that reading the RAMDAT register
also auto-increments the memory address pointer.