Operations:

Syntax:

Operation:

Operands:

Program Counter:

Opcode

Comment

Stack

LDI Rd,K

Rd = K

16 <= d <= 31, 0 <= K <= 255

PC = PC + 1

1110KKKKddddKKKK

Description

Loads an 8-bit constant directly to register 16 to 31.

Status Register (SREG) and Boolean Formula

I

T

H

S

V

N

Z

C

Example:

      clr   r31       ; Clear Z high byte
      ldi   r30,0xF0  ; Set Z low byte to 0xF0
      lpm             ; Load constant from Program
                      ; memory pointed to by Z

Words

1 (2 bytes)

Table Cycles

Name

Cycles

AVRe

1

AVRxm

1

AVRxt

1

AVRrc

1