WorksheetsMicrocontroller 8051
Total questions: 52
Worksheet time: 43mins
Full form of DJNZ ?
Decrease Just Number Zero
Decrement Jump Not equal to Zero
Data Jump New address if Zero
Delete and Jump to Number Zero
full form of DJNZ ?
Decrease Just Number Zero
Decrement Jump Not equal to Zero
Data Jump New address if Zero
Delete and Jump to Number Zero
After execution of following instructions what will be content of Accumulator ? And also tell which flag will set?
MOV A,#08H
MOV B,#09H
ADD A,B
12H, CY
11H, CY
11H , AC
12H, AC
How to select register register bank 2 ?
SETB RS1 , SETB RS0
CLR RS1 , SETB RS0
SETB RS1 , CLR RS0
CLR RS1 , CLR RS0
Number of binary 1's in accumulator is odd then parity bit of PSW will be __________
SET
RESET
-
NONE OF THIS
Which register bank will select after
CLR PSW.4
SETB PSW.3
3
2
1
0
Special function Register (SFR) address of B register is ______________________
A0 H
B0 H
E0 H
F0 H
Find content of Accumulator ?
MOV A , #4EH
CPL A
A = ?
22H
B1H
21H
24H
Find CY = ?
MOV A , # 09H
RRC A
0
1
NONE OF THIS
how many I/O port lines are there?
4
8
16
32
which port(s) is/are used as address lines when accessing external memory
Port 0
Port 2
Port 0 & port 2
Port 1 & Port 3
MOV A , # 59H
INC A
A = ?
5AH
60H
6FH
0FH
The timers of the 8051 are
4 bit
8 bit
16 bit
32 bit
The TMOD register is a(n)
4 Bit register
8 bit register
16 bit register
The registers of Timer 1 are accessed as
TL0 & TL1
TH0 & TH1
TL0 & TH0
TL1 & TH1
Which of the following are 8 bit registers?
PSW
DPTR
ACCUMULATOR (A reg)
Program Counter
How many interrupt sources available in 8051?
4
5
10
15
pin number of RESET pin
40
9
20
21
Bit addressable location available in RAM
8 bytes
16 bytes
32 bytes
128 bytes
Initial Address of stack memory
05H
06H
07H
08H
MOV A,#32H is an example of __________ addressing mode
Indirect
Direct
Register
Immediate
after MUL AB , lower byte and higher byte result stored in following respectively
B reg, Acc
Acc, B reg
B reg
Acc
timer pins T0 & T1 are connected to which pin respectively?
10 (P3.0) & 11 (P3.1)
12 (P3.2) & 13 (P3.3)
14 (P3.4) & 15 (P3.5)
16 (P3.6) & 17 (P3.7)
Choose the devices that are using a microcontroller
fridge
microwave
washing machine
sand clock
CJNE stands for
Comment & Jump if Number Enable
Compare & Jump if Not Equal
Carry bit Just if Number Equal
What is the maximum value of the 8-bit register?
255
256
128
512
Which instruction is used to clear the accumulator?
CLR A
CLR B
MOV A, #00H
SUB A, A
MOV A, #56H
MOV R1, #50H
MOV 50H, # 45H
XCHD A, @R1
What is the result at A, R1?
56H, 45H
45H, 50H
50H, 56H
45H, 56H
Which of the following instruction is used to set bit port directly?
SET P1.0
MOV P1.0, bit
SETB P1.0
JB P1.0, bit
SP of 8051 is of ___ wide and it is loaded with the default value of ___ after reset.
2 byte, 08H
8 bit, 07H
1 byte, 09H
8 bit, 06H
Find the number of times the following loop will be executed
MOV R6,#200
BACK:MOV R5,#100
HERE:DJNZ R5, HERE
DJNZ R6,BACK
END
100
200
20000
2000
Do the two instructions mean the same?
1) BACK: DEC R0
JZ BACK
2) BACK: DJNZ RO, BACK
yes
no
cant be determined
yes and the second one is preferred
9. Which of the following comes under the indexed addressing mode?
MOVX A, @DPTR
MOVC @A+DPTR,A
MOV A,R0
MOV @R0,A
What does the symbol '#' represent in the instruction MOV A, #55H ?
a. Direct datatype
b. Indirect datatype
c. Immediate datatype
d. Indexed datatype
2 times memory access required____addressing.
direct
register
indirect
all
ADD C is
zero address instruction
one address instruction
three address instruction
none
MOV R1, R2
Zero Address Instruction
Two address instruction
One address instruction
NONE
STOP is an example of
Zero Address instruction
One address Instruction
two address instructiom
three address instruction
Which addressing mode execute its instructions within CPU without the necessity of reference memory for operands?
Direct Mode
Register Mode
Indirect Mode
ALL
After RETI instruction is executed then the pointer will move to which location in the program?
next interrupt of the interrupt vector table
immediate next instruction where interrupt is occurred
next instruction after the RETI in the memory
none of the mentioned
What is the value of R1 after this code?
MOV R0, #5
MOV R1, #0
BACK:
INC R1
DEC R0
JZ BACK
00H
01H
can't be determined
05H
Which is not an SFR in 8051?
GCON
TCON
PCON
TMOD
MOVA, #0AFH ; i s___ type of Addressing Mode
Immediate
Register
Direct
Register Indirect
Which of the following comes under the indexed addressing mode?
MOVX A, @DPTR
MOVC @A+DPTR,A
MOV A,R0
MOV @R0,A
Consider the following program. Assume that internal memory 30h contains 5h.
org 0h
mov r2,#30h
mov a,@r2
add a,r2
end
Choose the right answer
Syntax Error
Accumulator will contain 35h
Not able to access internal memory
None
What is your name?
Write your complete roll number
Full form of ALE
Add Lock Enable
Address Latch Enable
Adder Lock Enable
None of the above
How are timers used in the 8051 microcontroller for generating delays?
Timers in the 8051 microcontroller are used to generate delays by setting the timer registers with a specific value, starting the timer, and waiting for it to overflow. The timer overflow flag is then checked to determine when the delay has been reached.
Timers in the 8051 microcontroller are used to generate delays by disabling the timer interrupts
Timers in the 8051 microcontroller are used to generate delays by counting the number of instructions executed
Timers in the 8051 microcontroller are used to generate delays by randomly selecting a delay value
How is a no-operation (NOP) instruction executed in the 8051?
It performs an AND operation
It performs an OR operation
It does nothing and increments the PC by 1
It clears the accumulator
Which register holds the lower byte of the program counter in the 8051?
PCL
PCH
PCON
ACC
Which instruction in the 8051 microcontroller is used to read from external RAM addressed by the data pointer (DPTR)?
MOV A, @DPTR
MOVX A, @DPTR
MOVX @DPTR, A
MOV A, DPTR
