STS - Store Data to Data Space Using Direct Addressing

The STS instruction is used to store data that are shifted serially into the PHY layer shift register to the system bus address space. The STS instruction is based on direct addressing, and the address must be given as an operand to the instruction for the data transfer to start. The address is the first set of operands, and data are the second set. The size of the address and data operands is given by the size fields presented in Figure 1. The maximum size for both address and data is 32 bits.

The 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 Figure 1, 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 have been successfully transferred.