Operations:

Syntax:

Operation:

Operands:

Program Counter:

Opcode

Comment

Stack

IN Rd,A

Rd = I/O(A)

0 <= d <= 31, 0 <= A <= 63

PC = PC + 1

10110AAdddddAAAA

Description

Loads data from the I/O space into register Rd in the Register File.

Status Register (SREG) and Boolean Formula

I

T

H

S

V

N

Z

C

Example:

      in    r25,0x16  ; Read Port B
      cpi   r25,4     ; Compare read value to constant
      breq  exit      ; Branch if r25=4
      ...
exit: 
      nop             ; Branch destination (do nothing)

Words

1 (2 bytes)

Table Cycles

Name

Cycles

AVRe

1

AVRxm

1

AVRxt

1

AVRrc

1