IOT Questions and Answers – Microcontroller (8051- Pin, Registers, Timers)

This set of IOT Multiple Choice Questions & Answers (MCQs) focuses 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
View Answer

Answer: c
Explanation: The 8051 family members have different packages, such as DIP(Dual In Line Package), 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: a
Explanation: A frequency source other than crystal oscillator is used. It can be a TTL oscillator, it should be connected to XTAL1 and XTAL2 id left unconnected.
advertisement
advertisement

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
View Answer

Answer: d
Explanation: It is an input pin and active high. When we apply a high pulse it terminates all activities and makes the program counter zero but values in register values remain the same.

5. What is the minimum no of cycles required for reset operation?
a) 3 cycle
b) 2 cycles
c) 1 cycles
d) 4 cycles
View Answer

Answer: b
Explanation: 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.
Note: Join free Sanfoundry classes at Telegram or Youtube

6. PSEN stands for ________
a) Program Select Enable
b) Peripheral Store Enable
c) Program Store Enable
d) Peripheral Select Enable
View Answer

Answer: c
Explanation: In a 8051 microcontroller, the PSEN (Program Store Enable) is used when one have to transfer data or program from a PROM/EPROM.

7. Find the machine cycle for AT89C51 if XTAL = 11.0592MHz.
a) 90.42us
b) 361.68us
c) 1.085us
d) 150.145us
View Answer

Answer: b
Explanation: Machine cycle = No.of cycles/frequency
Time = 1/frequency
Time(ns) = 1/11.0592MHz
= 90.42ns
Machine cycles = 12*90.42
= 1.085us.
advertisement

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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: c
Explanation: 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.
advertisement

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
View Answer

Answer: d
Explanation: 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 0 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
View Answer

Answer: a
Explanation: 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
View Answer

Answer: d
Explanation: 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
View Answer

Answer: b
Explanation: 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
View Answer

Answer: a
Explanation: 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.

Sanfoundry Global Education & Learning Series – IOT.

To practice all areas of IOT for Freshers, here is complete set of 1000+ Multiple Choice Questions and Answers.

If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]

advertisement
advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.