EasyManuals Logo

Atmel AVR User Manual

Atmel AVR
191 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #179 background imageLoading...
Page #179 background image
121. STS – Store Direct to Data Space
121.1. Description
Stores one byte from a Register to the data space. For parts with SRAM, the data space consists of the
Register File, I/O memory, and internal SRAM (and external SRAM if applicable). For parts without
SRAM, the data space consists of the Register File only. The EEPROM has a separate address space.
A 16-bit address must be supplied. Memory access is limited to the current data segment of 64KB. The
STS instruction uses the RAMPD Register to access memory above 64KB. To access another data
segment in devices with more than 64KB data space, the RAMPD in register in the I/O area has to be
changed.
This instruction is not available in all devices. Refer to the device specific instruction set summary.
Operation:
(i) (k) ← Rr
Syntax: Operands: Program Counter:
(i) STS k,Rr 0 ≤ r ≤ 31, 0 ≤ k ≤ 65535 PC ← PC + 2
32-bit Opcode:
1001 001d dddd 0000
kkkk kkkk kkkk kkkk
121.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
Example:
lds r2,$FF00 ; Load r2 with the contents of data space location $FF00
add r2,r1 ; add r1 to r2
sts $FF00,r2 ; Write back
Words 2 (4 bytes)
Cycles 2
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
179

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR and is the answer not in the manual?

Atmel AVR Specifications

General IconGeneral
Architecture8-bit RISC
SRAMUp to 16 KB
Clock SpeedUp to 20 MHz
Operating Voltage1.8V to 5.5V
ADC10-bit ADC
Communication InterfacesSPI, I2C, USB
PackagesDIP, SOIC, QFN
Special FeaturesWatchdog Timer
Flash Memory1KB to 256KB
EEPROM64B to 4KB

Related product manuals