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 #118 background imageLoading...
Page #118 background image
76. LPM – Load Program Memory
76.1. Description
Loads one byte pointed to by the Z-register into the destination register Rd. This instruction features a
100% space effective constant initialization or constant data fetch. The Program memory is organized in
16-bit words while the Z-pointer is a byte address. Thus, the least significant bit of the Z-pointer selects
either low byte (Z
LSB
= 0) or high byte (Z
LSB
= 1). This instruction can address the first 64KB (32K words)
of Program memory. The Z-pointer Register can either be left unchanged by the operation, or it can be
incremented. The incrementation does not apply to the RAMPZ Register.
Devices with Self-Programming capability can use the LPM instruction to read the Fuse and Lock bit
values. Refer to the device documentation for a detailed description.
The LPM instruction is not available in all devices. Refer to the device specific instruction set summary.
The result of these combinations is undefined:
LPM r30, Z+
LPM r31, Z+
Operation: Comment:
(i) R0 ← (Z) Z: Unchanged, R0 implied
destination register
(ii) Rd ← (Z) Z: Unchanged
(iii) Rd ← (Z) Z ← Z + 1 Z: Post incremented
Syntax: Operands: Program Counter:
(i) LPM None, R0 implied PC ← PC + 1
(ii) LPM Rd, Z 0 ≤ d ≤ 31 PC ← PC + 1
(iii) LPM Rd, Z+ 0 ≤ d ≤ 31 PC ← PC + 1
16-bit Opcode:
(i) 1001 0101 1100 1000
(ii) 1001 000d dddd 0100
(iii) 1001 000d dddd 0101
76.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
118

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