This set of 8051 Micro-controller Multiple Choice Questions & Answers (MCQs) focuses on “Keyboard interfacing”.
1. Which of the following steps detects the key in a 4*4 keyboard matrix about the key that is being pressed?
a) masking of bits
b) ensuring that initially, all keys are open
c) checking that whether the key is actually pressed or not
d) all of the mentioned
View Answer
Explanation: For detecting that whether the key is actually pressed or not, firstly this must be ensured that initially all the keys are closed. Then we need to mask the bits individually to detect that which key is pressed. Then we need to check that is the key actually pressed or not, by checking that whether the key pressed for a time more than 20 micro seconds.
2. What is described by this command: CJNE A,#00001111b, ROW1
a) it masks the bit and then jumps to the label where ROW1 is written
b) it makes the value of the accumulator 0FH and then jumps at the address where ROW1 label is written
c) it compares the value of the accumulator with 0FH and jumps to the location where ROW1 label is there if the value becomes equal
d) it compares the value of the accumulator with 0FH and jumps to the location where ROW1 label is there if the value is not equal
View Answer
Explanation: This particular command CJNE A,#00001111b, ROW1 compares the value of the accumulator with OFH and jumps to ROW1 address if the value is not equal.
3. To detect that in which column, the key is placed?
a) we can mask the bits and then check it
b) we can rotate the bits and then check that particular bit which is set or reset(according to the particular condition)
c) none of the mentioned
d) all of the mentioned
View Answer
Explanation: We can mask or we can even rotate the bits to check that particularly in which column is the key placed.
4. In reading the columns of a matrix, if no key is pressed we should get all in binary notation
a) 0
b) 1
c) F
d) 7
View Answer
Explanation: If no key is pressed, then all the keys show 1 as they are all connected to power supply.
5. If we need to operate a key of a keyboard in an interrupt mode, then it will generate what kind of interrupt?
a) ES
b) EX0/EX1
c) T0/T1
d) RESET
View Answer
Explanation: If a key is to operate in an interrupt mode then it will generate an external hardware interrupt.
6. To identify that which key is being pressed, we need to:
a) ground all the pins of the port at a time
b) ground pins of the port one at a time
c) connect all the pins of the port to the main supply at a time
d) none of the mentioned
View Answer
Explanation: To detect that which key is being pressed, we need to ground the pins one by one.
7. Key press detection and Key identification are:
a) the same processes
b) two different works are done in Keyboard Interfacing
c) none of the mentioned
d) any of the mentioned
View Answer
Explanation: They are two different works that are involved in Keyboard Interfacing. One is used for checking that which key is being actually pressed and the other is used to check that is the key actually pressed or not.
Sanfoundry Global Education & Learning Series – Microcontroller.
To practice all areas of Microcontroller, here is complete set of 1000+ Multiple Choice Questions and Answers.
- Check Computer Science Books
- Practice Computer Science MCQs
- Practice Electronics & Communication Engineering MCQs
- Apply for Computer Science Internship
- Check Microcontroller Books