42073B-MCU Wireless-09/14
0x0D (0x2D)
DDRE DDE7 DDE6 DDE5 DDE4 DDE3 DDE2 DDE1 DDE0 238
0x0C (0x2C)
PINE PINE7 PINE6 PINE5 PINE4 PINE3 PINE2 PINE1 PINE0 238
0x0B (0x2B)
PORTD PORTD7 PORTD6 PORTD5 PORTD4 PORTD3 PORTD2 PORTD1 PORTD0 237
0x0A (0x2A)
DDRD DDD7 DDD6 DDD5 DDD4 DDD3 DDD2 DDD1 DDD0 237
0x09 (0x29)
PIND PIND7 PIND6 PIND5 PIND4 PIND3 PIND2 PIND1 PIND0 237
0x08 (0x28)
PORTC PORTC7 PORTC6 PORTC5 PORTC4 PORTC3 PORTC2 PORTC1 PORTC0 31
0x07 (0x27)
DDRC DDC7 DDC6 DDC5 DDC4 DDC3 DDC2 DDC1 DDC0 31
0x06 (0x26)
PINC PINC7 PINC6 PINC5 PINC4 PINC3 PINC2 PINC1 PINC0 31
0x05 (0x25)
PORTB PORTB7 PORTB6 PORTB5 PORTB4 PORTB3 PORTB2 PORTB1 PORTB0 236
0x04 (0x24)
DDRB DDB7 DDB6 DDB5 DDB4 DDB3 DDB2 DDB1 DDB0 236
0x03 (0x23)
PINB PINB7 PINB6 PINB5 PINB4 PINB3 PINB2 PINB1 PINB0 236
0x02 (0x22)
PORTA PORTA7 PORTA6 PORTA5 PORTA4 PORTA3 PORTA2 PORTA1 PORTA0 30
0x01 (0x21)
DDRA DDA7 DDA6 DDA5 DDA4 DDA3 DDA2 DDA1 DDA0 30
0x00 (0x20)
PINA PINA7 PINA6 PINA5 PINA4 PINA3 PINA2 PINA1 PINA0 30
Notes: 1. Reserved registers, bits and I/O memory addresses (marked as Res*) may not be modified.
2. I/O registers within the address range 0x00 - 0x1F are directly bit-accessible using the SBI and CBI instructions. In these registers, the
value of single bits can be checked by using the SBIS and SBIC instructions.
3. Some of the status flags are cleared by writing a logical one to them. Note that the CBI and SBI instructions will operate on all bits in the
I/O register, writing a one back into any flag read as set, thus clearing the flag. The CBI and SBI instructions work with registers 0x00 to
0x1F only.
4. When using the I/O specific commands IN and OUT, the I/O addresses 0x00 – 0x3F must be used. When addressing I/O registers as
data space using LD and ST instructions, 0x20 must be added to these addresses. The device is a complex microcontroller with more
peripheral units than can be supported within the 64 location reserved in Op-code for the IN and OUT instructions. For the Extended I/O
space from 0x60 – 0x1FF in SRAM, only the ST/STS/STD and LD/LDS/LDD instructions can be used.
34 Instruction Set Summary
Depending on the size of the Flash memory the instructions
• EICALL and EIJMP do not exist in devices with 128K/64KByte Flash memory,
• ELPM does not exist in the device with 64Kbyte Flash memory.
34.1 Arithmetic and Logic Instructions
Mnemonics Operands Description Operation Flags #Clocks
ADD Rd, Rr Add two Registers Rd ← Rd + Rr Z,C,N,V,H 1
ADC Rd, Rr Add with Carry two Registers Rd ← Rd + Rr + C Z,C,N,V,H 1
ADIW Rdl,K Add Immediate to Word Rdh:Rdl ← Rdh:Rdl + K Z,C,N,V,S 2
SUB Rd, Rr Subtract two Registers Rd ← Rd - Rr Z,C,N,V,H 1
SUBI Rd, K Subtract Constant from Register Rd ← Rd - K Z,C,N,V,H 1
SBC Rd, Rr Subtract with Carry two Registers Rd ← Rd - Rr - C Z,C,N,V,H 1
SBCI Rd, K Subtract with Carry Constant from Reg. Rd ← Rd - K - C Z,C,N,V,H 1
SBIW Rdl, K Subtract Immediate from Word Rdh:Rdl ← Rdh:Rdl - K Z,C,N,V,S 2
AND Rd, Rr Logical AND Registers Rd ← Rd • Rr Z,N,V 1
ANDI Rd, K Logical AND Register and Constant Rd ← Rd • K Z,N,V 1
OR Rd, Rr Logical OR Registers Rd ← Rd v Rr Z,N,V 1
ORI Rd, K Logical OR Register and Constant Rd ← Rd v K Z,N,V 1
EOR Rd, Rr Exclusive OR Registers Rd ← Rd ⊕ Rr Z,N,V 1
COM Rd One’s Complement Rd ← 0xFF − Rd Z,C,N,V 1
NEG Rd Two’s Complement Rd ← 0x00 − Rd Z,C,N,V,H 1