Visio AVR v2
Visio AVR v2
ST - LD ( )
STACK
POP R2
MOV R16,R20
MOVW R17:R16,R21:R20
PUSH R4
MOV R0,R20
MOVW ...
R0
SRAM
:
R16-R25,
R26:R27 X
R28:R29 Y
R30:R31 Z
LPM //
LDI R20,$F5
PROGRAM
MEMORY
LPM R20,Z
LPM R20,Z+
IMMEDIATE
(NUMBER)
OUT PORTB,R21
OUT DDRB,R3
IN R2,PINA
I/O REGISTERS
DDRA/B/C/D
SP
etc
MOV Rb,Rn
MOVW Rb+1:Rb,Rn+1:Rn
POP Rb
PUSH Rb
LPM
LPM Rb,Z
LPM Rb,Z+
OUT PORTA/B/C/D,Rb
OUT DDRA/B/C/D,Rb
IN Rb,PINA/B/C/D
LD Rb,X/Y/Z
LD Rb,X/Y/Z+
LD Rb,-X/Y/Z
LD Rb,Y/Z+#number
Any Rb, any pointer ; Copy data from pointed by pointer address to Rb
Any Rb, any pointer ; Copy data from pointed by pointer address to Rb, increase pointer after
Any Rb, any pointer ; Copy data from pointed by pointer address to Rb, decrease pointer before
Any Rb, pointers Y and Z ; Copy data from pointed by (pointer + #number) address to Rb ; pointer
doesnt change
ST X/Y/Z,Rb
ST X/Y/Z+,Rb
ST -X/Y/Z,Rb
ST Y/Z+#number,Rb
Any Rb, any pointer ; Copy data from Rb to pointed by pointer address
Any Rb, any pointer ; Copy data from Rb to pointed by pointer address, increase pointer after
Any Rb, any pointer ; Copy data from Rb to pointed by pointer address, decrease pointer before
Any Rb, pointers Y and Z ; Copy data from Rb to (pointed by pointer address + #number), pointer
doesnt change
LDS Rb,#number
LDI Rb,#number
Registers
R0
R1
LPM
MUL
...
I/O
0
R16
...
...
CBI $12,3
SBI $02,1
SBIC $10,4
SBIS $1A,2
31
R23
R24
...
SUBI R20,$3F
SBCI R17,$2A
ANDI R24,$FE
ORI R18,$01
CPI R22,$2C
LDI R20,$2A
SBR R28,$FE
CBR R30,$10
SER R31
MULS R21,R17
MULSU R23,R20
FMUL R21,R22
FMULS R21,R22
FMULSU R21,R22
R25
R26
X
R27
63
ADIW Zh:Zl,$01
SBIW R25:R24,$02
R28
R29
R30
R31
SUBI Rb,#number
SBCI Rb,#number
ANDI Rb,#number
ORI Rb,#number
CPI Rb,#number
LDI Rb,#number
SBR Rb,#number
CBR Rb,#number
SER Rb
MULS Rb,Rn
MULSU Rb,Rn
FMUL Rb,Rn
FMULS Rb,Rn
FMULSU Rb,Rn
ADIW Rb+1:Rb,#number
SBIW Rb+1:Rb,#number
CBI #num1,#num2
SBI #num1,#num2
#num1 0-31, #num2 is 8-bit ; Set bits of #num1 I/O according to #num2;
SBIC #num1,#num2
SBIS #num1,#num2
#num1 0-31, #num2 is 8-bit ; Skips a command if #num1 I/O bits (according to #num2) are cleared
#num1 0-31, #num2 is 8-bit ; Skips a command if #num1 I/O bits (according to #num2) are set
Jump Conditions
SREG
I
BRHC
BRHS
BRIE
BRTS
Condition
BRGE
BRLT
BRTC
BRTS
Rd > Rs
BRVC
BRNE
BREQ
Signed
no:
yes:
BREQ no
BRGE yes
jump out
Unsigned
no:
yes:
BREQ no
BRSH yes
jump out
Rd >= Rs
BRGE yes
BRSH yes
or
BRCC yes
Rd == Rs
BREQ yes
BREQ yes
Rd != Rs
BRNE yes
BRNE yes
BRLT yes
BREQ yes
jump out
Rd <= Rs
yes:
Rd <Rs
BRLO yes
BREQ yes
jump out
yes:
BRLT yes
BRLO yes
or
BRCS yes