(Reference answers are attached at the end)
1. Multiple Choice Questions (Select one correct answer from the four options for each question and fill in the number of the correct answer in the parentheses.)
1. After the reset of the 8051 microcontroller, the stack pointer SP is initialized to ( ).
A. 0x00 B. 0x07 C. 0x70 D. 0xff
2. The CPU of the 8051 microcontroller mainly consists of ( ).
A. Adder, Controller B. Registers, Decoder
C. Arithmetic Logic Unit, Controller D. Arithmetic Logic Unit, Registers
3. The program counter PC of the microcontroller is used to ( ).
A. Store the current instruction
B. Store the next instruction
C. Store the address of the current instruction
D. Store the address of the next instruction
4. The 8051 microcontroller has 4 8-bit I/O ports, among which the truly bidirectional I/O port is ( ).
A. P0 B. P1 C. P2 D. P35. The correct description about the I/O ports of the 8051 microcontroller is ( )
A. Only P0 has tri-state function
B. P0~P3 are all quasi-bidirectional ports
C. P0~P3 all have secondary functions
D. P0~P3 can all be used as data buses
6. The ALE pin of the 8051 microcontroller is ( )
A. Outputs high level
B. Outputs a rectangular pulse with a frequency of fosc/6
C. Outputs low level
D. Outputs a rectangular pulse with a frequency of fosc/2
7. When the microcontroller accesses external memory or other interface chips, the data line and the lower 8-bit address line are ( ).
A. P0 port B. P1 C. P2 port D. P3 port
8. The internal RAM unit 20H-2FH of the 8051 microcontroller ( )
A. Can only be bit-addressed B. Can only be byte-addressed
C. Can be both bit-addressed and byte-addressed
D. Some parts can only be bit-addressed
9. If the crystal oscillator frequency of the 8051 microcontroller is 6MHz, then one machine cycle equals ( )us.
A. 1/12 B. 1/2 C. 1 D. 2
10. After powering on or resetting the microcontroller, the working register R0 is in ( ).
A. Group 0, 00H unit B. Group 0, 01H unit
C. Group 0, 09H unit D. SFR
11. The XTAL1 and XTAL2 pins of the 8051 microcontroller are ( ) pins.
A. External timer B. External serial port
C. External interrupt D. External crystal oscillator
12. The internal and external ROM of the MSC-51 is addressed the same, if the EA pin is high, the program counter PC of the 8051 is in the ( ) address range.
A. 1000H-FFFFH B. 0000H-FFFFFH
C. 0001H-0FFFH D. 0000H~0FFFH
13. Before the P0 and P1 ports of the microcontroller can be used for input, they must ( )
A. Write 1 to the corresponding pin first B. Write 0 to the corresponding pin first
C. Connect to high level D. Connect to pull-up resistors
14. The program counter PC of the 8051 microcontroller is a 16-bit counter, and its addressing range is ( ).
A. 8K B. 16K C. 32K D. 64K
15. The program of the microcontroller is generally stored in ( ).
A. RAM B. ROM C. SFR D. CPU
2. Short Answer Questions
-
Read the following circuit diagram and program, and annotate positions (1)~(10).
Circuit diagram:

Program

(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
Reference Answers:
1. Multiple Choice Questions
1-5 BCDAA
6-10 BACDA
11-15 DBADB
2. Short Answer Questions
(1) P1 port high four positions 0, pull down 4 rows
(2) Determine if a key is pressed
(3) Delay debounce
(4) Again determine if a key is pressed
(5) If a key is pressed in the first row, set key value to 0
(6) If a key is pressed in the second row, set key value to 1
(7) P1 port low four positions 0, pull down 4 columns
(8) If a key is pressed in the first row, then key value +0
(9) If a key is pressed in the fourth row, then key value +12
(10) Wait for the key to be released