beautypg.com

Data indirect with post- increment, Constant addressing using the lpm instruction, Indirect program addressing, ijmp and icall – Rainbow Electronics ATmega161L User Manual

Page 16: Atmega161(l)

background image

16

ATmega161(L)

1228C–AVR–08/02

Data Indirect with Post-
increment

Figure 16. Data Indirect Addressing with Post-increment

The X-, Y-, or Z-register is incremented after the operation. Operand address is the con-
tents of the X-, Y-, or Z-register prior to incrementing.

Constant Addressing Using
the LPM Instruction

Figure 17. Code Memory Constant Addressing

Constant byte address is specified by the Z-register contents. The 15 MSBs select word
address (0 - 8K), the LSB selects Low byte if cleared (LSB = 0) or High byte if set
(LSB = 1).

Indirect Program Addressing,
IJMP and ICALL

Figure 18. Indirect Program Memory Addressing

Data Space

$0000

$FFFF

X, Y, OR Z - REGISTER

0

15

1

$1FFF

$000

PROGRAM MEMORY

Z-REGISTER

15

1 0

$1FFF

$000

PROGRAM MEMORY

15

0

Z-REGISTER