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. Maximum size for both address and data is 16 bit.

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

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