Beruflich Dokumente
Kultur Dokumente
2. Serial port vector address is of _______. And causes an interrupt when ________.
a) 0013H, either TI or RI flag is set
b) 0023H, either TI or RI flag is reset
c) 0013H, either TI or RI flag is reset
d) 0023H, either TI or RI flag is set
Answer: D
5. In 8051
a. IT0 is in TCON and defines interrupt type (edge or level triggered)
b. IT0 is in IE and defines interrupt type.
c. IT0 is in TCON and defines the flag for edge triggered interrupt
d. IT0 is in IE and defines flag for edge triggered interrupt
Answer : A
6. On microcontroller reset, interrupt priority and vector addresses are in same order
a. True
b. False
C. Cannot be determined
Answer: A
7. Consider an ISR
0023 CLR TI
0025 MOV SBUF, @R0
0027 RETI
Bytes transmitted by this program if run continuously will be
a. Equal to 2 if R0 has initial value as 2
b. Data stored in R0
c. Data pointed by value stored in in R0
d. No transmission
Answer: C
9. Which register specify the storage / loading of vector address during the interrupt
generation?
a. Stack Pointer
b. Program Counter
c. Data Pointer
d. All of the above
Answer: B
11. What kind of triggering configuration of external interrupt intimate the signal to
stay low until the generation of subsequent interrupt?
a. Edge - Triggering
b. Level Triggering
c. Both a & b
d. None of the above
ANSWER: b
12. Which among the below mentioned reasons is / are responsible for the
generation of Serial Port Interrupt ?
A. Overflow of timer/counter 1
B. High to low transition on pin INT1
C. High to low transition on pin INT0
D. Setting of either TI or RI flag
a. A & B
b. Only B
c. C& D
d. Only D
ANSWER: d
Explanation: the timer is an up-counter and generates an interrupt when the count
has reached FFFFH.
14. The interrupt that has lowest priority amongst the following is
a. TF0
b. RI
c. INT0
d. INT1
Answer: B
15. The interrupts, INT0(active low) and INT1(active low) are processed internally by
flags
a) IE0 and IE1
b) IE0 and IF1
c) IF0 and IE1
d) IF0 and IF1
Answer: a
16. The flags IE0 and IE1, are automatically cleared after the control is transferred to
respective vector, if the interrupt is
a) level-sensitive
b) edge-sensitive
c) in serial port
d) in parallel port
Answer: b
20. All the interrupts at level 1 are polled in the second clock cycle of the
a) forth T state
b) fifth T state
c) third T state
d) none
Answer: b
Explanation: All the interrupts at level 1 are polled or sensed in the second clock
cycle of the fifth T state or 9th clock cycle out of 12 clock cycles. Then all the
interrupts at level 0 are also polled in the same cycle.
21. If two interrupts, of higher priority and lower priority occur simultaneously, then
the service provided is for
a) interrupt of lower priority
b) interrupt of higher priority
c) both the interrupts
d) none of the mentioned
Answer: b
22. When any interrupt is enabled, then where does the pointer moves immediately
after this interrupt has occurred?
a) to the next instruction which is to be executed
b) to the first instruction of ISR
c) to the first location of the memory called the interrupt vector table
d) to the end of the program
Answer: c
Explanation: When any interrupt is enabled, then it goes to the vector table where
the address of the ISR is placed.
23. What are the contents of the IE register, when the interrupt of the memory
location 0x00 is caused?
a) 0xFFH
b) 0x00H
c) 0x10H
d) 0xF0H
Answer: b
Explanation: When interrupt of 0x00 is caused (the reset interrupt) then all the other
interrupts will be disabled or the contents of the IE register becomes null.
25. Why normally LJMP instructions are the topmost lines of the ISR?
a) so as to jump to some other location where there is a wider space of memory
available to write the codes
b) so as to avoid overwriting of other interrupt instructions
c) both of the mentioned
d) none of the mentioned
Answer: c
Explanation: There is a small space of memory present in the vector table between
two different interrupts so in order to avoid overwriting of other interrupts we
normally jump to other locations where a wide range of space is available
27. What is the correct order of priority that is set after a controller gets reset?
a) TxD/RxD > T1 > T0 > EX1 > EX0
b) TxD/RxD < T1 < T0 < EX1 < EX0 c) EX0 > T0 > EX1 > T1 > TxD/RxD
d) EX0 < T0 < EX1 < T1 < TxD/RxD
Answer: c
Explanation: EX0 > T0 > EX1 > T1 > TxD/RxD. This is the correct order of priority that
is set after a controller gets reset.
28. The service to an interrupt will be delayed if it appears during the execution of
a) RETI instruction
b) instruction that writes to IE register
c) instruction that writes to IP register
d) all of the mentioned
Answer: d
Explanation: The service to an interrupt will be delayed if it appears during the
execution of RETI instruction or the instruction that writes to IE/IP registers.
30. While executing main program, if two or more interrupts occur, then the
sequence of appearance of interrupts is called
a) multi-interrupt
b) nested interrupt
c) interrupt within interrupt
d) both b and c
Answer: d
Explanation: If an interrupt occurs while executing a program, and the processor is
executing the interrupt, if one more interrupt occurs again, then it is called nested
interrupt.
32. If any interrupt request given to an input pin cannot be disabled by any means
then the input pin is called
a) maskable interrupt
b) nonmaskable interrupt
c) maskable interrupt and nonmaskable interrupt
d) none
Answer: b
Explanation: A nonmaskable interrupt input pin is one which means that any
interrupt request at NMI (nonmaskable interrupt) input cannot be masked or
disabled by any means. RESET interrupt is an example of non maskable interrupt.
33. Which devices are specifically being used for converting serial to parallel and
from parallel to serial respectively?
a) timers
b) counters
c) shift registers
d) serial communication
Answer: c
Explanation: Some registers like parallel in serial out and serial in parallel out are
used to convert serial data into parallel and vice versa respectively
37. Which of the following is the logic level understood by the micro-
controller/micro-processor?
a) TTL logic level
b) RS232 logic level
c) RS485
d) none of the mentioned
Answer: a
Explanation: TTL logic or the transistor transistor logic level is the logic that is
understood by the micro-controllers/microprocessors
Answer: d
Explanation: UART frequency is the crystal frequency f/12 divided by 32, that comes
out to be f/384.
44. Which pin in the shift register mode (Mode 0) of serial communication allow the
data transmission as well as reception?
a. TXD
b. RXD
c. RB8
d. REN
ANSWER: b. RXD
45. Which factor/s is/are supposed to have the equal values at both phases of
transmission and reception levels with an intimation of error-free serial
communication?
a. Baud Rate
b. Number of data bits & stop bits
c. Status of Parity bits
d. All of the above
ANSWER: d. All of the above
47. If INT1 interrupt is to be configured as edge triggered interrupt, then which of the
following bits should be set
a. TCON.4
b. TCON.3
c. TCON.2
d. TCON.0
Answer: C
Explanation: INT1 interrupt related pin is IT1 in TCON register. It is at position
TCON.2.
49. If IP register is loaded with value 00011010 B, then which interrupt will have
second lowest priority.
a. Serial
b. INT1
c. INT0
d. T0
Answer: C
Explanation: From the data loaded in IP register it can be observed that, high priority
is assigned for T0, T1 and serial interrupts. These 3 will have high priority but
according to their default priority, serial will be lowest in these 3. Hence the priority
table will be as follows
T0 > T1 > Serial > INT0 > INT1
50. A Timer 0 interrupt service routine is currently in execution and an INT0 interrupt
is activated, IP register contains 00 H.
a. Timer 0 interrupt service routine continues to execute
b. Timer 0 ISR is halted and INT0 ISR is served first
c. Program stops both ISRs and returns to main program
d. None of the above
Answer: B
Explanation: Since IP contains 00 H, interrupt priority is as per default state of
microcontroller. INT0 has higher priority than T0 hence INT0 will be executed first
and then T0 will continue from where it was halted.
51. Following features can be attributed to serial communication
a. Slower data transfer
b. Less no of hardware lines required
c. Long distance communication is possible
d. All of the above
Answer: D
52. Which serial communication type is used for character data transfer
a. Synchronous
b. Asynchronous
c. Both
d. None of above
Answer: B
58. ________ is a connection between two terminals such that, data may travel in
both directions, but only one way communication is allowed at a time.
a. Full duplex
b. Simplex
c. Half duplex
d. all of above
Answer: C
59. Which mode of data transfer is used for rate <= 20 k bits / second
a. Synchronous
b. asynchronous
c. bulk
d. byte
Answer: B
Explanation: 20k bps = 20000 bps. With the help of SCON and PCON (SMOD bit)
register 8051 can be programmed up to 19200 bps only.
60. Which timer in which mode is used to generate baud rate for serial data transfer
a. Timer 1 mode 2
b. Timer 0 mode 1
c. Timer 0 mode 2
d. Timer 1 mode 1
Answer: A
61. What value should be loaded in TH1 register to generate a baud rate of 9600 with
default settings.
a. -12
b. -3
c. -6
d. -24
Answer: B
Explanation: In order to answer this or any other related question to value setting for
baud rate, following table should be referred.
Value in TH1 Value in TH1 (Hex) Baud rate for Baud rate for
(decimal) SMOD bit = 0 (from SMOD bit = 1 (from
PCON reg.) PCON reg.)
-3 FD H 9600 19200
-6 FA H 4800 9600
-12 F4 H 2400 4800
-24 E8 H 1200 2400
66. If data is transmitted with 9600 baud, then the transmission rate is
a. 1.04 ms
b. 10.4 ms
c. 0.104 ms
d. 0.0104 ms
Answer: Transmission rate = 1/baud. Hence, 1/9600 = 1.04 * 10-4 = 0.104 ms
67. 9th bit of data is transmitted in mode 2 and 3 of serial communication using
a. TB8 bit of SCON
b. TI bit of SCON
c. SMO bit of SCON
d. SM1 bit of SCON
Answer: A
68. PS bit in ______ register must be set to give the serial data interrupt highest
priority
a. IE
b. SCON
c. IP
d. PCON
Answer: C
69. DB 25 is
a. 25 pin connector
b. 20 pin connector
c. 9 pin connector
d. 22 pin connector
Answer: A