Hello experts
8051 Instruction set
5 bit opcode + 3 bit register specification
7 bit opcode + 1 register specification
8 bit opcode
Many ALU can directly access program memory . so they use registers
· Accumulator register
· Rn register (R0 to R7)
· Ram memory
· Program memory
· Instruction decoder
· Program counter
· ALU (arithmetic and Logic unit)
· PSW register
5 bit opcode that allow 32 operations
7 bit opcode that allow 128 operations
8 bit opcode that allow 256 operations
5 bit opcode + 3 bit register specification
Example
MOV A, Rn
11101 n n n
Source Rn registers
Destination Accumulator
Example Mov A,R1
11101 0 0 0 MOV A, R0 Mov the content of R0 into A
11101 0 0 1 MOV A, R1 Mov the content of R1 into A
11101 0 1 0 MOV A, R2 Mov the content of R2 into A
11101 0 1 1 MOV A, R6 Mov the content of R3 into A
11101 1 0 0 MOV A, R6 Mov the content of R4 into A
11101 1 0 1 MOV A, R6 Mov the content of R5 into A
11101 1 0 1 MOV A, R6 Mov the content of R6 into A
7 bit opcode + 1 register specification
MOV @Ri, A
1111011
Source Accumulator
Destination register R0 or R1
11110110 MOV@R0,A
11110111 MOV @R1, A
Example: Mov@R1,A
Mov the content of A to the address in register R1
8 bit opcode
MOV A, direct
11100101 direct
Source address
Destination Accumulator
Example :Mov A, 80h
Mov the data from direct address 80h to register A
5 bit opcode + 3 bit register specification
7 bit opcode + 1 register specification
8 bit opcode
Q I don’t understand whats the use of three different Instruction formmet ?
Q2 first two formmet, I think they don’t use Instruction decoder ,I think they store data direcly to the respective registers . Last formmet , I think it use Instruction decoder ?
Q3 If possble anyone please explain how the diifferent instruction execute in different formmet
8051 Instruction set
5 bit opcode + 3 bit register specification
7 bit opcode + 1 register specification
8 bit opcode
Many ALU can directly access program memory . so they use registers
· Accumulator register
· Rn register (R0 to R7)
· Ram memory
· Program memory
· Instruction decoder
· Program counter
· ALU (arithmetic and Logic unit)
· PSW register
5 bit opcode that allow 32 operations
7 bit opcode that allow 128 operations
8 bit opcode that allow 256 operations
5 bit opcode + 3 bit register specification
Example
MOV A, Rn
11101 n n n
Source Rn registers
Destination Accumulator
Example Mov A,R1
11101 0 0 0 MOV A, R0 Mov the content of R0 into A
11101 0 0 1 MOV A, R1 Mov the content of R1 into A
11101 0 1 0 MOV A, R2 Mov the content of R2 into A
11101 0 1 1 MOV A, R6 Mov the content of R3 into A
11101 1 0 0 MOV A, R6 Mov the content of R4 into A
11101 1 0 1 MOV A, R6 Mov the content of R5 into A
11101 1 0 1 MOV A, R6 Mov the content of R6 into A
7 bit opcode + 1 register specification
MOV @Ri, A
1111011
Source Accumulator
Destination register R0 or R1
11110110 MOV@R0,A
11110111 MOV @R1, A
Example: Mov@R1,A
Mov the content of A to the address in register R1
8 bit opcode
MOV A, direct
11100101 direct
Source address
Destination Accumulator
Example :Mov A, 80h
Mov the data from direct address 80h to register A
5 bit opcode + 3 bit register specification
7 bit opcode + 1 register specification
8 bit opcode
Q I don’t understand whats the use of three different Instruction formmet ?
Q2 first two formmet, I think they don’t use Instruction decoder ,I think they store data direcly to the respective registers . Last formmet , I think it use Instruction decoder ?
Q3 If possble anyone please explain how the diifferent instruction execute in different formmet