I/O Programming MCQ Questions
I/O Programming MCQs : This section focuses on "I/O Programming" in Embedded Systems. These Multiple Choice Questions (MCQ) should be practiced to improve the Embedded Systems skills required for various interviews (campus interviews, walk-in interviews, company interviews), placements, entrance exams and other competitive examinations.
1. In 8051, I/O operations are done using _______ ports and _____ pins.
A. 2,32
B. 4,32
C. 2,40
D. 4,40
View Answer
Ans : D
Explanation: In 8051, I/O operations are done using four ports and 40 pins
2. The four ports P0, P1, P2, and P3, each use ___________ pins.
A. 2
B. 4
C. 8
D. 16
View Answer
Ans : C
Explanation: The four ports P0, P1, P2, and P3, each use 8 pins, making them 8-bit ports. Upon RESET, all the ports are configured as inputs, ready to be used as input ports.
3. Which port has 8 pins (32 to 39)?
A. Port 0
B. Port 1
C. Port 2
D. Port 3
View Answer
Ans : A
Explanation: Port 0 (Pin No 32 – Pin No 39) : It has 8 pins (32 to 39). It can be used for input or output. Unlike P1, P2, and P3 ports, we normally connect P0 to 10K-ohm pull-up resistors to use it as an input or output port being an open drain.
4. Port 2 is an 8-bit port (pin 1 through 8)?
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : B
Explanation: Port 2 occupies a total of 8 pins (pins 21 through 28)
5. Pin 40 provides supply to the Chip and it is +5 V known as?
A. Vss
B. PSEN
C. Vpp
D. Vcc
View Answer
Ans : D
Explanation: Vcc − Pin 40 provides supply to the Chip and it is +5 V.
6. JB bit, target Instructions used for?
A. jump to target if bit = 0 (jump if no bit)
B. jump to target if bit = 1, clear bit (jump if bit, then clear)
C. jump to target if bit = 1 (jump if bit)
D. None of the above
View Answer
Ans : C
Explanation: JB bit, target : jump to target if bit = 1 (jump if bit)
7. Which Instructions used for complement the bit (bit = NOT bit)?
A. CLR bit
B. CPL bit
C. SETB bit
D. COM bit
View Answer
Ans : B
Explanation: CPL bit : complement the bit (bit = NOT bit)
8. ALE stands for?
A. Address Length Enable
B. Active Latch Enable
C. Address Latch Enable
D. Active Length Enable
View Answer
Ans : C
Explanation: This is an Output Pin and is active high. It is especially used for 8031 IC to connect it to the external memory. It can be used while deciding whether P0 pins will be used as Address bus or Data bus
9. Gnd : Pin 20 provides ground for the Reference
A. TRUE
B. FALSE
C. Can be true or false
D. Can not say
View Answer
Ans : A
Explanation: True, Gnd − Pin 20 provides ground for the Reference
10. Which of the following is also an active low pin and it gets activated after applying a low pulse.
A. RST
B. EA
C. ALE
D. PSEN
View Answer
Ans : D
Explanation: PSEN or Program store Enable (Pin No 29) : This is also an active low pin, i.e., it gets activated after applying a low pulse. It is an output pin and used along with the EA pin in 8031 based (i.e. ROMLESS) Systems to allow storage of program code in external ROM.
Discussion