Sign In
Upload
Manuals
Brands
Atmel Manuals
Microcontrollers
AVR
Atmel AVR Manuals
Manuals and User Guides for Atmel AVR. We have
1
Atmel AVR manual available for free PDF download: Manual
Atmel AVR Manual (191 pages)
Brand:
Atmel
| Category:
Microcontrollers
| Size: 2.53 MB
Table of Contents
Instruction Set Nomenclature
1
Table of Contents
2
1 I/O Registers
13
RAMPX, RAMPY, and RAMPZ
13
Rampd
13
Eind
13
Stack
13
Flags
13
2 The Program and Data Addressing Modes
14
Register Direct, Single Register Rd
14
Register Direct - Two Registers, Rd and Rr
15
I/O Direct
15
Data Direct
16
Data Indirect with Displacement
16
Data Indirect
17
Data Indirect with Pre-Decrement
17
Data Indirect with Post-Increment
18
Program Memory Constant Addressing Using the LPM, ELPM, and SPM Instructions
18
Program Memory with Post-Increment Using the LPM Z+ and ELPM Z+ Instruction
19
Direct Program Addressing, JMP and CALL
19
Indirect Program Addressing, IJMP and ICALL
20
Relative Program Addressing, RJMP and RCALL
20
3 Conditional Branch Summary
21
4 Instruction Set Summary
22
5 ADC - Add with Carry
30
Description
30
Status Register (SREG) and Boolean Formula
30
6 ADD - Add Without Carry
32
Description
32
Status Register (SREG) and Boolean Formula
32
7 ADIW - Add Immediate to Word
33
Description
33
Status Register (SREG) and Boolean Formula
33
8 AND - Logical and
35
Description
35
Status Register (SREG) and Boolean Formula
35
9 ANDI - Logical and with Immediate
36
Description
36
Status Register (SREG) and Boolean Formula
36
10 ASR - Arithmetic Shift Right
37
Description
37
Status Register (SREG) and Boolean Formula
37
11 BCLR - Bit Clear in SREG
38
Description
38
Status Register (SREG) and Boolean Formula
38
12 BLD - Bit Load from the T Flag in SREG to a Bit in Register
39
Description
39
Status Register (SREG) and Boolean Formula
39
13 BRBC - Branch if Bit in SREG Is Cleared
40
Description
40
Status Register (SREG) and Boolean Formula
40
14 BRBS - Branch if Bit in SREG Is Set
41
Description
41
Status Register (SREG) and Boolean Formula
41
15 BRCC - Branch if Carry Cleared
42
Description
42
Status Register (SREG) and Boolean Formula
42
16 BRCS - Branch if Carry Set
43
Description
43
Status Register (SREG) and Boolean Formula
43
17 BREAK - Break
44
Description
44
Status Register (SREG) and Boolean Formula
44
18 BREQ - Branch if Equal
45
Description
45
Status Register (SREG) and Boolean Formula
45
19 BRGE - Branch if Greater or Equal (Signed)
46
Description
46
Status Register (SREG) and Boolean Formula
46
20 BRHC - Branch if Half Carry Flag Is Cleared
47
Description
47
Status Register (SREG) and Boolean Formula
47
21 BRHS - Branch if Half Carry Flag Is Set
48
Description
48
Status Register (SREG) and Boolean Formula
48
22 BRID - Branch if Global Interrupt Is Disabled
49
Description
49
Status Register (SREG) and Boolean Formula
49
23 BRIE - Branch if Global Interrupt Is Enabled
50
Description
50
Status Register (SREG) and Boolean Formula
50
24 BRLO - Branch if Lower (Unsigned)
51
Description
51
Status Register (SREG) and Boolean Formula
51
25 BRLT - Branch if Less than (Signed)
52
Description
52
Status Register (SREG) and Boolean Formula
52
26 BRMI - Branch if Minus
53
Description
53
Status Register (SREG) and Boolean Formula
53
27 BRNE - Branch if Not Equal
54
Description
54
Status Register (SREG) and Boolean Formula
54
28 BRPL - Branch if Plus
55
Description
55
Status Register (SREG) and Boolean Formula
55
29 BRSH - Branch if same or Higher (Unsigned)
56
Description
56
Status Register (SREG) and Boolean Formula
56
30 BRTC - Branch if the T Flag Is Cleared
57
Description
57
Status Register (SREG) and Boolean Formula
57
31 BRTS - Branch if the T Flag Is Set
58
Description
58
Status Register (SREG) and Boolean Formula
58
32 BRVC - Branch if Overflow Cleared
59
Description
59
Status Register (SREG) and Boolean Formula
59
33 BRVS - Branch if Overflow Set
60
Description
60
Status Register (SREG) and Boolean Formula
60
34 BSET - Bit Set in SREG
61
Description
61
Status Register (SREG) and Boolean Formula
61
35 BST - Bit Store from Bit in Register to T Flag in SREG
62
Description
62
Status Register (SREG) and Boolean Formula
62
36 CALL - Long Call to a Subroutine
63
Description
63
Status Register (SREG) and Boolean Formula
63
37 CBI - Clear Bit in I/O Register
65
Description
65
Status Register (SREG) and Boolean Formula
65
38 CBR - Clear Bits in Register
66
Description
66
Status Register (SREG) and Boolean Formula
66
39 CLC - Clear Carry Flag
67
Description
67
Status Register (SREG) and Boolean Formula
67
40 CLH - Clear Half Carry Flag
68
Description
68
Status Register (SREG) and Boolean Formula
68
151 CLI - Clear Global Interrupt Flag
69
Description
69
Status Register (SREG) and Boolean Formula
69
42 CLN - Clear Negative Flag
70
Description
70
Status Register (SREG) and Boolean Formula
70
43 CLR - Clear Register
71
Description
71
Status Register (SREG) and Boolean Formula
71
44 CLS - Clear Signed Flag
72
Description
72
Status Register (SREG) and Boolean Formula
72
45 CLT - Clear T Flag
73
Description
73
Status Register (SREG) and Boolean Formula
73
155 CLV - Clear Overflow Flag
74
Description
74
Status Register (SREG) and Boolean Formula
74
47 CLZ - Clear Zero Flag
75
Description
75
Status Register (SREG) and Boolean Formula
75
48 COM - One's Complement
76
Description
76
Status Register (SREG) and Boolean Formula
76
49 CP - Compare
77
Description
77
Status Register (SREG) and Boolean Formula
77
50 CPC - Compare with Carry
79
Description
79
Status Register (SREG) and Boolean Formula
79
51 CPI - Compare with Immediate
81
Description
81
Status Register (SREG) and Boolean Formula
81
52 CPSE - Compare Skip if Equal
83
Description
83
Status Register (SREG) and Boolean Formula
83
53 DEC - Decrement
84
Description
84
Status Register and Boolean Formula
84
54 DES - Data Encryption Standard
86
Description
86
55 EICALL - Extended Indirect Call to Subroutine
87
Description
87
Status Register (SREG) and Boolean Formula
87
56 EIJMP - Extended Indirect Jump
88
Description
88
Status Register (SREG) and Boolean Formula
88
57 ELPM - Extended Load Program Memory
89
Description
89
Status Register (SREG) and Boolean Formula
90
58 EOR - Exclusive or
91
Description
91
Status Register (SREG) and Boolean Formula
91
59 FMUL - Fractional Multiply Unsigned
92
Description
92
Status Register (SREG) and Boolean Formula
92
60 FMULS - Fractional Multiply Signed
94
Description
94
Status Register (SREG) and Boolean Formula
94
61 FMULSU - Fractional Multiply Signed with Unsigned
96
Description
96
Status Register (SREG) and Boolean Formula
96
62 ICALL - Indirect Call to Subroutine
98
Description
98
Status Register (SREG) and Boolean Formula
98
63 IJMP - Indirect Jump
99
Description
99
Status Register (SREG) and Boolean Formula
99
64 IN - Load an I/O Location to Register
100
Description
100
Status Register (SREG) and Boolean Formula
100
65 INC - Increment
101
Description
101
Status Register and Boolean Formula
101
66 JMP - Jump
103
Description
103
Status Register (SREG) and Boolean Formula
103
67 LAC - Load and Clear
104
Description
104
Status Register (SREG) and Boolean Formula
104
68 LAS - Load and Set
105
Description
105
Status Register (SREG) and Boolean Formula
105
69 LAT - Load and Toggle
106
Description
106
Status Register (SREG) and Boolean Formula
106
70 LD - Load Indirect from Data Space to Register Using Index X
107
Description
107
Status Register (SREG) and Boolean Formula
108
71 LD (LDD) - Load Indirect from Data Space to Register Using Index y
109
Description
109
Status Register (SREG) and Boolean Formula
110
72 LD (LDD) - Load Indirect from Data Space to Register Using Index Z
112
Description
112
Status Register (SREG) and Boolean Formula
113
73 LDI - Load Immediate
115
Description
115
Status Register (SREG) and Boolean Formula
115
74 LDS - Load Direct from Data Space
116
Description
116
Status Register (SREG) and Boolean Formula
116
75 LDS (16-Bit) - Load Direct from Data Space
117
Description
117
Status Register (SREG) and Boolean Formula
117
76 LPM - Load Program Memory
118
Description
118
Status Register (SREG) and Boolean Formula
118
77 LSL - Logical Shift Left
120
Description
120
Status Register (SREG) and Boolean Formula
120
78 LSR - Logical Shift Right
122
Description
122
Status Register (SREG) and Boolean Formula
122
79 MOV - Copy Register
123
Description
123
Status Register (SREG) and Boolean Formula
123
80 MOVW - Copy Register Word
124
Description
124
Status Register (SREG) and Boolean Formula
124
81 MUL - Multiply Unsigned
125
Description
125
Status Register (SREG) and Boolean Formula
125
82 MULS - Multiply Signed
126
Description
126
Status Register (SREG) and Boolean Formula
126
83 MULSU - Multiply Signed with Unsigned
127
Description
127
Status Register (SREG) and Boolean Formula
127
84 NEG - Two's Complement
129
Description
129
Status Register (SREG) and Boolean Formula
129
85 NOP - no Operation
131
Description
131
Status Register (SREG) and Boolean Formula
131
86 OR - Logical or
132
Description
132
Status Register (SREG) and Boolean Formula
132
87 ORI - Logical or with Immediate
133
Description
133
Status Register (SREG) and Boolean Formula
133
88 OUT - Store Register to I/O Location
134
Description
134
Status Register (SREG) and Boolean Formula
134
89 POP - Pop Register from Stack
135
Description
135
Status Register (SREG) and Boolean Formula
135
90 PUSH - Push Register on Stack
136
Description
136
Status Register (SREG) and Boolean Formula
136
91 RCALL - Relative Call to Subroutine
137
Description
137
Status Register (SREG) and Boolean Formula
137
92 RET - Return from Subroutine
139
Description
139
Status Register (SREG) and Boolean Formula
139
93 RETI - Return from Interrupt
140
Description
140
Status Register (SREG) and Boolean Formula
140
94 RJMP - Relative Jump
142
Description
142
Status Register (SREG) and Boolean Formula
142
95 ROL - Rotate Left Trough Carry
143
Description
143
Status Register (SREG) and Boolean Formula
143
96 ROR - Rotate Right through Carry
145
Description
145
Status Register (SREG) and Boolean Formula
145
97 SBC - Subtract with Carry
147
Description
147
Status Register (SREG) and Boolean Formula
147
98 SBCI - Subtract Immediate with Carry SBI - Set Bit in I/O Register
149
Description
149
Status Register (SREG) and Boolean Formula
149
99 SBI - Set Bit in I/O Register
151
Description
151
Status Register (SREG) and Boolean Formula
151
100 SBIC - Skip if Bit in I/O Register Is Cleared
152
Description
152
Status Register (SREG) and Boolean Formula
152
101 SBIS - Skip if Bit in I/O Register Is Set
153
Description
153
Status Register (SREG) and Boolean Formula
153
102 SBIW - Subtract Immediate from Word
154
Description
154
Status Register (SREG) and Boolean Formula
154
103 SBR - Set Bits in Register
156
Description
156
Status Register (SREG) and Boolean Formula
156
104 SBRC - Skip if Bit in Register Is Cleared
157
Description
157
Status Register (SREG) and Boolean Formula
157
105 SBRS - Skip if Bit in Register Is Set
158
Description
158
Status Register (SREG) and Boolean Formula
158
106 SEC - Set Carry Flag
159
Description
159
Status Register (SREG) and Boolean Formula
159
107 SEH - Set Half Carry Flag
160
Description
160
Status Register (SREG) and Boolean Formula
160
108 SEI - Set Global Interrupt Flag
161
Description
161
Status Register (SREG) and Boolean Formula
161
109 SEN - Set Negative Flag
162
Description
162
Status Register (SREG) and Boolean Formula
162
110 SER - Set All Bits in Register
163
Description
163
Status Register (SREG) and Boolean Formula
163
111 SES - Set Signed Flag
164
Description
164
Status Register (SREG) and Boolean Formula
164
112 SET - Set T Flag
165
Description
165
Status Register (SREG) and Boolean Formula
165
113 SEV - Set Overflow Flag
166
Description
166
Status Register (SREG) and Boolean Formula
166
114 SEZ - Set Zero Flag
167
Description
167
Status Register (SREG) and Boolean Formula
167
115 Sleep
168
Description
168
Status Register (SREG) and Boolean Formula
168
116 SPM - Store Program Memory
169
Description
169
Status Register (SREG) and Boolean Formula
169
117 SPM #2 - Store Program Memory
171
Description
171
Status Register (SREG) and Boolean Formula
171
118 ST - Store Indirect from Register to Data Space Using Index X
173
Description
173
Status Register (SREG) and Boolean Formula
174
119 ST (STD) - Store Indirect from Register to Data Space Using Index y
175
Description
175
Status Register (SREG) and Boolean Formula
176
120 ST (STD) - Store Indirect from Register to Data Space Using Index Z
177
Description
177
Status Register (SREG) and Boolean Formula
178
121 STS - Store Direct to Data Space
179
Description
179
Status Register (SREG) and Boolean Formula
179
122 STS (16-Bit) - Store Direct to Data Space
180
Description
180
Status Register (SREG) and Boolean Formula
180
123 SUB - Subtract Without Carry
181
Description
181
Status Register and Boolean Formula
181
124 SUBI - Subtract Immediate
183
Description
183
Status Register and Boolean Formula
183
125 SWAP - Swap Nibbles
185
Description
185
Status Register (SREG) and Boolean Formula
185
126 TST - Test for Zero or Minus
186
Description
186
Status Register (SREG) and Boolean Formula
186
127 WDR - Watchdog Reset
187
Description
187
Status Register (SREG) and Boolean Formula
187
128 XCH - Exchange
188
Description
188
Status Register (SREG) and Boolean Formula
188
129 Datasheet Revision History
189
Rev.0856L - 11/2016
189
Rev.0856K - 04/2016
189
Rev.0856J - 07/2014
189
Rev.0856I - 07/2010
189
Rev.0856H - 04/2009
189
Rev.0856G - 07/2008
190
Rev.0856F - 05/2008
190
Advertisement
Advertisement
Related Products
Atmel AVR8015
Atmel AVR32918
Atmel AVR042
Atmel AVR1019
Atmel AVR262
Atmel AVR2131
Atmel AVR1612
Atmel AVR365
Atmel AVR1605
Atmel AVR2052
Atmel Categories
Microcontrollers
Motherboard
Computer Hardware
Controller
Accessories
More Atmel Manuals
Login
Sign In
OR
Sign in with Facebook
Sign in with Google
Upload manual
Upload from disk
Upload from URL