8051 Microcontroller
8051 Microcontroller
focuses on Architecture.
1. 8051 series of micro controllers are made by which of the following
companies?
a) Atmel
b) Philips
c) none of the mentioned
d) both of the mentioned
View Answer
Answer: d
Explanation: Atmel series AT89C2051 and Philips family P89C51RD2 are the two most common
micro controllers of 8051 family.
Answer: c
Explanation: When a program wakes up, then 000 is loaded to the program counter register
because at this place the first op code is burnt.
5. When the micro controller executes some arithmetic operations, then the flag
bits of which register are affected?
a) PSW
b) SP
c) DPTR
d) PC
View Answer
6. How is the status of the carry, auxiliary carry and parity flag affected if write
instruction
MOV A,#9C
ADD A,#64H
a) CY=0,AC=0,P=0
b) CY=1,AC=1,P=0
c) CY=0,AC=1,P=0
d) CY=1,AC=1,P=1
View Answer
Answer: b
Explanation: On adding 9C and 64, a carry is generated from D3 and from the D7 bit so CY and AC
are set to 1. In the result, the number of 1s present are even so parity flag is set to zero.
7. How are the bits of the register PSW affected if we select Bank2 of 8051?
a) PSW.5=0 and PSW.4=1
b) PSW.2=0 and PSW.3=1
c) PSW.3=1 and PSW.4=1
d) PSW.3=0 and PSW.4=1
View Answer
Answer: d
Explanation: Bits of PSW register are CY, AC, F0, RS1, RS0, OV, -, P so for selecting bank2 RS1=1
and RS0=0 which are fourth and third bit of the register respectively.
9.On power up, the 8051 uses which RAM locations for register R0- R7
a) 00-2F
b) 00-07
c) 00-7F
d) 00-0F
View Answer
Answer: b
Explanation: On power up register bank 0 is selected which has memory address from 00H-07H.
10. How many bytes of bit addressable memory is present in 8051 based micro
controllers?
a) 8 bytes
b) 32 bytes
c) 16 bytes
d) 128 bytes
View Answer
Answer: c
Explanation: 8051 micro controllers have 16 bytes of bit addressable memory.
flag.
DPTR (Data pointer):: It is 16 bit register consisting of two types DPH and DPL . One with data
pointer high and other data pointer low.
Timer register: Register pairs th0 , tl0, th1, tl1.
Control registers: TCON, TMOD, IE,IP, SCON, PCON contain the control and status for interrupts,
serialy and timer/ counters.
Capture register:: RCAP2H RCAP2L are the capture registers.
2. Draw the pin diagram of 8051 microcontroller.
ans:
4. What are all addressing modes of mcs-51?
Ans: There are five addressing modes in 8051 which are as follows:1. Register Addressing: In this registers r0 to r7 from the selected register bank, accumulator, bregister, carry bit and dptr are used.
2. Direct Addressing: In this, direct address of the operand is specified in the instruction itself.
Direct addressing mode uses the lower 128 bytes of internal RAM and the special function registers.
3. Register-Indirect Addressing:
It uses any one of the registers R0 to R7 from the selected register bank, as pointer to the location in