Do you have a question about the Atmel AVR and is the answer not in the manual?
Architecture | 8-bit RISC |
---|---|
SRAM | Up to 16 KB |
Clock Speed | Up to 20 MHz |
Operating Voltage | 1.8V to 5.5V |
ADC | 10-bit ADC |
Communication Interfaces | SPI, I2C, USB |
Packages | DIP, SOIC, QFN |
Special Features | Watchdog Timer |
Flash Memory | 1KB to 256KB |
EEPROM | 64B to 4KB |
Defines the bits and their meaning within the AVR Status Register (SREG).
Lists and describes common registers and operand notations used in AVR instructions.
Registers extending address space for indirect addressing beyond 64KB.
Register extending address space for direct addressing beyond 64KB.
Register extending address space for indirect jumps/calls beyond 64K words.
Defines the stack for return addresses and pushed registers, including the Stack Pointer (SP).
Explains symbols used to denote flag status (affected, cleared, set, not affected).
Describes addressing data directly using a single register (Rd) as the operand.
Describes addressing data using two registers (Rd and Rr) as operands.
Describes accessing I/O registers using a direct address from the instruction.
Describes accessing data memory using a direct 16-bit address.
Describes accessing data using an address formed by a register and a displacement.
Describes accessing data using the contents of an address register (X, Y, or Z).
Describes accessing data after decrementing the address register.
Describes accessing data after incrementing the address register.
Describes accessing constants from program memory using LPM, ELPM, and SPM.
Describes accessing program memory constants with post-incremented Z register.
Describes accessing program memory using a direct address for jumps and calls.
Describes accessing program memory using the Z register for jumps and calls.
Describes accessing program memory using PC-relative addressing for jumps and calls.
Summarizes conditional branch instructions based on status register flags.
Shows the Boolean logic for each conditional branch test.
Lists the mnemonics for conditional branch instructions.
Lists the complementary Boolean logic for conditional branches.
Lists the mnemonics for complementary conditional branches.
Provides notes on signed/unsigned comparisons for branches.
Lists different AVR CPU versions and their key features/differences.
Summarizes arithmetic and logic instructions with mnemonics, flags, and clock cycles.
Summarizes branch instructions with mnemonics, flags, and clock cycles.
Summarizes data transfer instructions with mnemonics, flags, and clock cycles.
Summarizes bit manipulation and testing instructions.
Summarizes microcontroller control instructions like NOP, SLEEP, WDR, BREAK.
Adds two registers and the C flag, storing the result in Rd.
Details how ADC affects SREG flags and provides Boolean formulas.
Adds two registers, storing the result in Rd, without affecting the C flag.
Details how ADD affects SREG flags and provides Boolean formulas.
Performs logical AND between Rd and Rr, storing the result in Rd.
Details how AND affects SREG flags and provides Boolean formulas.
Performs logical AND between Rd and an immediate value, storing the result in Rd.
Details how ANDI affects SREG flags and provides Boolean formulas.
Shifts bits right in Rd, preserving the sign bit.
Details how ASR affects SREG flags and provides Boolean formulas.
Branches if a specified bit in SREG is cleared.
Details how BRBC affects SREG flags (none affected).
Branches if the Zero flag (Z) is set (result of comparison was equal).
Details how BREQ affects SREG flags (none affected).
Branches if unsigned comparison result is lower (Carry flag set).
Details how BRLO affects SREG flags (none affected).
Branches if signed comparison result is less than (N XOR V is set).
Details how BRLT affects SREG flags (none affected).
Calls a subroutine at any address in program memory, saving return address.
Details how CALL affects SREG flags (none affected).
Clears the Carry flag (C) in SREG.
Details how CLC affects SREG flags (only C flag).
Clears all bits in a register by XORing it with itself.
Details how CLR affects SREG flags (Z is set, others unaffected).
Compares two registers (Rd and Rr) without changing their values.
Details how CP affects SREG flags and provides Boolean formulas.
Compares a register (Rd) with an immediate value.
Details how CPI affects SREG flags and provides Boolean formulas.
Subtracts 1 from a register (Rd).
Details how DEC affects SREG flags and provides Boolean formulas.
Performs logical XOR between Rd and Rr, storing the result in Rd.
Details how EOR affects SREG flags and provides Boolean formulas.
Loads data from an I/O location into a register.
Details how IN affects SREG flags (none affected).
Adds 1 to a register (Rd).
Details how INC affects SREG flags and provides Boolean formulas.
Loads byte indirectly from data space using X pointer.
Details how LD affects SREG flags (none affected).
Loads byte indirectly from data space using Y pointer.
Details how LD (LDD) affects SREG flags (none affected).
Loads byte indirectly from data space using Z pointer.
Details how LD (LDD) affects SREG flags (none affected).
Loads an 8-bit constant into a register (16-31).
Details how LDI affects SREG flags (none affected).
Loads a byte from program memory using Z pointer.
Details how LPM affects SREG flags (none affected).
Shifts bits left in Rd, clearing bit 0 and loading bit 7 into C flag.
Details how LSL affects SREG flags and provides Boolean formulas.
Shifts bits right in Rd, clearing bit 7 and loading bit 0 into C flag.
Details how LSR affects SREG flags and provides Boolean formulas.
Copies the content of one register (Rr) to another (Rd).
Details how MOV affects SREG flags (none affected).
Performs 8-bit x 8-bit unsigned multiplication, result in R1:R0.
Details how MUL affects SREG flags and provides Boolean formulas.
Performs 8-bit x 8-bit signed multiplication, result in R1:R0.
Details how MULS affects SREG flags and provides Boolean formulas.
Replaces register Rd with its two's complement.
Details how NEG affects SREG flags and provides Boolean formulas.
Performs logical OR between Rd and Rr, storing the result in Rd.
Details how OR affects SREG flags and provides Boolean formulas.
Stores data from a register (Rr) to an I/O location.
Details how OUT affects SREG flags (none affected).
Loads a register (Rd) from the stack, incrementing the Stack Pointer.
Details how POP affects SREG flags (none affected).
Stores a register (Rr) onto the stack, decrementing the Stack Pointer.
Details how PUSH affects SREG flags (none affected).
Calls a subroutine at a relative address within PC range.
Details how RCALL affects SREG flags (none affected).
Returns from a subroutine by loading address from stack.
Details how RET affects SREG flags (none affected).
Returns from an interrupt routine, setting the Global Interrupt flag.
Details how RETI affects SREG flags (I flag set).
Jumps to a relative address within PC range.
Details how RJMP affects SREG flags (none affected).
Rotates bits left in Rd, with carry shifting into bit 0 and bit 7 into C flag.
Details how ROL affects SREG flags and provides Boolean formulas.
Subtracts two registers and the C flag, storing the result in Rd.
Details how SBC affects SREG flags and provides Boolean formulas.
Subtracts an immediate value and the C flag from a register.
Details how SBCI affects SREG flags and provides Boolean formulas.
Sets a specified bit in an I/O register.
Details how SBI affects SREG flags (none affected).
Skips next instruction if a bit in an I/O register is cleared.
Details how SBIC affects SREG flags (none affected).
Skips next instruction if a bit in an I/O register is set.
Details how SBIS affects SREG flags (none affected).
Subtracts an immediate value from a register pair.
Details how SBIW affects SREG flags and provides Boolean formulas.
Sets specified bits in register Rd using a mask.
Details how SBR affects SREG flags and provides Boolean formulas.
Skips next instruction if a bit in a register is cleared.
Details how SBRC affects SREG flags (none affected).
Skips next instruction if a bit in a register is set.
Details how SBRS affects SREG flags (none affected).
Sets the Carry flag (C) in SREG.
Details how SEC affects SREG flags (only C flag).
Sets the Half Carry flag (H) in SREG.
Details how SEH affects SREG flags (only H flag).
Sets the Global Interrupt flag (I) in SREG, enabling interrupts.
Details how SEI affects SREG flags (only I flag).
Sets the Negative flag (N) in SREG.
Details how SEN affects SREG flags (only N flag).
Sets the Signed flag (S) in SREG.
Details how SES affects SREG flags (only S flag).
Sets the T flag in SREG.
Details how SET affects SREG flags (only T flag).
Sets the Overflow flag (V) in SREG.
Details how SEV affects SREG flags (only V flag).
Sets the Zero flag (Z) in SREG.
Details how SEZ affects SREG flags (only Z flag).
Stores byte indirectly to data space using X pointer.
Details how ST affects SREG flags (none affected).
Stores byte indirectly to data space using Y pointer.
Details how ST (STD) affects SREG flags (none affected).
Stores byte indirectly to data space using Z pointer.
Details how ST (STD) affects SREG flags (none affected).
Subtracts two registers, storing the result in Rd, without affecting C flag.
Details how SUB affects SREG flags and provides Boolean formulas.
Subtracts an immediate value from a register, storing the result in Rd.
Details how SUBI affects SREG flags and provides Boolean formulas.
Swaps the high and low nibbles within a register.
Details how SWAP affects SREG flags (none affected).
Tests if a register is zero or negative via a logical AND with itself.
Details how TST affects SREG flags and provides Boolean formulas.
Complete document review and new template.
Note added to RETI section.
Corrections to Conditional Branch Summary and Description sections.
Updates to Instruction Set Summary and clock cycle counts.
Updates to Instruction Set Summary and compatibility sections.