beautypg.com

I/o direct, Relative program addressing, rjmp and rcall, Constant addressing using the lpm instruction – Rainbow Electronics ATtiny28L User Manual

Page 9: Attiny28l/v

background image

9

ATtiny28L/V

1062E–10/01

I/O Direct

Figure 10. I/O Direct Addressing

Operand address is contained in six bits of the instruction word. n is the destination or
source register address.

Relative Program Addressing,
RJMP and RCALL

Figure 11. Relative Program Memory Addressing

Program execution continues at address PC + k + 1. The relative address k is -2048 to
2047.

Constant Addressing Using
the LPM Instruction

Figure 12. Code Memory Constant Addressing

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

15

0

PC

15

0

12 11

OP

k

PROGRAM MEMORY

$000

$3FF

+1

$3FF

15

1 0

Z-REGISTER

PROGRAM MEMORY

$000