EasyManua.ls Logo

Atmel AVR

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
Loading...
64. IN - Load an I/O Location to Register
64.1. Description
Loads data from the I/O Space (Ports, Timers, Configuration Registers, etc.) into register Rd in the
Register File.
Operation:
(i) Rd ← I/O(A)
Syntax: Operands: Program Counter:
(i) IN Rd,A 0 ≤ d ≤ 31, 0 ≤ A ≤ 63 PC ← PC + 1
16-bit Opcode:
1011 0AAd dddd AAAA
64.2. Status Register (SREG) and Boolean Formula
I T H S V N Z C
Example:
in r25,$16 ; 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)
Cycles 1
Atmel AVR Instruction Set Manual [OTHER]
Atmel-0856L-AVR-Instruction-Set-Manual_Other-11/2016
100

Table of Contents

Related product manuals