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 #108 background imageLoading...
Page #108 background image
(i) 1001 000d dddd 1100
(ii) 1001 000d dddd 1101
(iii) 1001 000d dddd 1110
70.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
– – – – – – – –
Example:
clr r27 ; Clear X high byte
ldi r26,$60 ; Set X low byte to $60
ld r0,X+ ; Load r0 with data space loc. $60(X post inc)
ld r1,X ; Load r1 with data space loc. $61
ldi r26,$63 ; Set X low byte to $63
ld r2,X ; Load r2 with data space loc. $63
ld r3,–X ; Load r3 with data space loc. $62(X pre dec)
Words 1 (2 bytes)
Cycles (i): 1
(2)
(ii): 2
(iii): 3
(2)
Cycles XMEGA (i): 1
(1)
(ii): 1
(1)
(iii): 2
(1)
1. Note:  If the LD instruction is accessing internal SRAM, one extra cycle is inserted.
2. Note:  LD instruction can load data from program memory since the flash is memory mapped.
Loading data from the data memory takes one clock cycle, and loading from the program memory
takes two clock cycles. But if an interrupt occur (before the last clock cycle) no additional clock
cycles are necessary when loading from the program memory. Hence, the instruction takes only
one clock cycle to execute.
LD instruction with pre-decrement can load data from program memory since the flash is memory
mapped. Loading data from the data memory takes two clock cycles, and loading from the program
memory takes three clock cycles. But if an interrupt occur (before the last clock cycle) no additional
clock cycles are necessary when loading from the program memory. Hence, the instruction takes
only one clock cycle to execute.
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
108

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