33.3.3.2 STS - Store Data to Data Space Using Direct Addressing

The STS instruction is used to store data that is shifted serially into the PHY layer to the bus matrix address space. The STS instruction is based on direct addressing, where the address is the first set of operands, and data is the second set. The size of the address and data operands are given by the size fields presented in the figure below. The maximum size for both address and data is 16 bits.

STS supports repeated memory access when combined with the REPEAT instruction.

Figure 33-10. STS Instruction Operation
The transfer protocol for an STS instruction is depicted in the figure as well, following this sequence:
  1. The address is sent.
  2. An Acknowledge (ACK) is sent back from the UPDI if the transfer was successful.
  3. The number of bytes as specified in the STS instruction is sent.
  4. A new ACK is received after the data has been successfully transferred.