IOT Multiple Choice Questions on “Microcontroller (8051- Pin, Registers, Timers)”.
1. Number of pins in 8051 microcontroller with ________ package.
a) 40 pin with LLC
b) 60 Pin with QFP
c) 40 pin with DIP
d) 60 pin with QFP
Answer: c
Clarification: The 8051 family members have different packages, such as DIP(Dual In Line), QFP(Quad Flap Package), LLC(Leadless Chip Carrier) they all have 40 pins that are dedicated to different functions. Especially 8051 have a Dual in Line package.
2. Does an 8051 microcontroller need external oscillator to run?
a) True
b) False
Answer: a
Clarification: The 8051 has an on chip oscillator but requires an external oscillator clock to run it. Most often a quartz crystal oscillator is connected to inputs XTAL1 and XTAL2.
3. We use any other frequency source other than crystal oscillator.
a) True
b) False
Answer: a
Clarification: A frequency source other than crustal oscillator is used. It can be a TTL oscillator, it should be connected to XTAL1 and XTAL2 id left unconnected.
4. Reset work is __________
a) To make program counter zero but values in registers values are made as zero
b) Program counter is not zero but values in registers values are made as
Zero
c) Program counter not zero but values in registers values remain same
d) To make program counter zero but values in registers values remain same
Answer: d
Clarification: It is an input pin and active high. When we apply a high pulse it terminates all activities and it cost all the values in the register to be zero. It will also set program counter to zero.
5. What is the minimum no of cycles required for reset operation?
a) 3 cycle
b) 2 cycles
c) 1 cycles
d) 4 cycles
Answer: c
Clarification: When power is turned on, the circuit holds the RST pin high for an amount of time that depends on the capacitor value and the rate at which it changes. To ensure a valid reset the RST pin must be held high long enough to allow the oscillator to start up plus two machine cycles.
6. PSEN stands for ________
a) Program Select Enable
b) Peripheral Store Enable
c) Program Store Enable
d) Peripheral Select Enable
Answer: c
Clarification: This is an output pin. In an 8031-based system in which an external ROM holds the program code, this pin is connected to the OE pin of the ROM.
7. Find the machine cycle for AT89C51 if XTAL = 11.0592MHz.
a) 90.42us
b) 361.68us
c) 1.085us
d) 150.145us
Answer: b
Clarification: Machine cycle = No.of cycles/frequency
Time = 1/frequency
Time(ns) = 1/11.0592MHz
= 90.42ns
Machine cycles = 12*90.42
= 1.085us.
8. What is the operation for mode 0?
a) 13-bit timer mode, 8-bit timer/counter THx and TLx as 5-bit prescalar
b) 16-bit timer mode, 16-bit timer/counter THx and TLx are cascaded, no prescalar
c) 8-bit auto reload mode, 8-bit auto reload time/counter; THx holds a value which is to be reloaded into TLx each time it overflows
d) Spilt timer mode
Answer: a
Clarification: Mode 0 is exactly same like mode 1 except that it is a 13-bit timer instead of 16-bit. The 13-bit counter can hold values between 0000 to 1FFH in Th-Tl.
9. What is the operation for mode 1?
a) 13-bit timer mode, 8-bit timer/counter THx and TLx as 5-bit prescalar
b) 16-bit timer mode, 16-bit timer/counter THx and TLx are cascaded, no prescalar
c) 8-bit auto reload mode, 8-bit auto reload time/counter; THx holds a value which is to be reloaded into TLx each time it overflows
d) Spilt timer mode
Answer: b
Clarification: It is a 16-bit timer; therefore it allows value from 0000 to FFFFH to br loaded into the timer’s register TL and TH. After TH and TL are loaded with a 16-bit initial value, the timer must be started.
10. Which is the operation for mode 2?
a) 13-bit timer mode, 8-bit timer/counter THx and TLx as 5-bit prescalar
b) 16-bit timer mode, 16-bit timer/counter THx and TLx are cascaded, no prescalar
c) 8-bit auto reload mode, 8-bit auto reload time/counter; THx holds a value which is to be reloaded into TLx each time it overflows
d) Spilt timer mode
Answer: c
Clarification: It is an 8 bit timer that allows only values of 00 to FFH to be loaded into the timer’s register TH. After TH is loaded with 8 bit value, 8051 gives a copy of it to TL.
11. Which is the operation for mode 3?
a) 13-bit timer mode, 8-bit timer/counter THx and TLx as 5-bit prescalar
b) 16-bit timer mode, 16-bit timer/counter THx and TLx are cascaded, no prescalar
c) 8-bit auto reload mode, 8-bit auto reload time/counter; THx holds a value which is to be reloaded into TLx each time it overflows
d) Spilt timer mode
Answer: d
Clarification: Mode 3 is also known as a split timer mode. Timer 0 and 1 may be programmed to be in mode 0, 1 and 2 independently of similar mode for other time.
12. Function of IE1 in TCON register?
a) External interrupt 1 Edge flag. Not related to timer operations
b) External interrupt 1 Edge flag. Not related to timer operations
c) External interrupt 0 single type control bit
d) External interrupt 1 to be triggered by a falling edge signal
Answer: a
Clarification: TCON register has 8 bits. 3rd bit has an IE1 register. This is an external interrupt.
13. 8051 controller contains how many registers?
a) 5
b) 3
c) 1
d) 2
Answer: d
Clarification: 8051 microcontroller has 2 types of registers. They are Special Function Registers and the other is General purpose register. Each of having 128KB of memory. And GPR is a Byte addressable register and SFR is a Bit addressable register.
14. General purpose memory is called as ________
a) ROM memory
b) RAM memory
c) SRAM memory
d) EPROM memory
Answer: b
Clarification: The general purpose memory is called as the RAM memory of the 8051 microcontroller, which is divided into 3 areas such as banks, bit-addressable area, and scratch-pad area.
15. Which timer register has both timers in it?
a) TMOD
b) TCON
c) Both TMOD and TCON
d) Neither TMOD nor TCON
Answer: a
Clarification: In the TMOD register, lower 4 bits are set for timer0 and the upper 4 bits are set aside for timer1. In each case, the lower 2 bits are used to set the timer mode and upper 2 bits to specify the operation.