1. When using 8031 microcontroller, it is necessary to expand the external program memory. In this case, EA should be _________.
2.P0 is usually used as _________.
3. If RS1 and RS0 are set to 10 by the program, the direct address of the working registers R0 to R7 is _________.
4. The return address (or breakpoint) is the contents of the program counter of _________.
5. The central processing unit (CPU) is the core of the microcontroller, and it completes _________.
6. The working process of a single-chip microcomputer is actually _________.
7. The so-called interrupt source is _________.
8. A port (or port) is _________.
9. The transmission signal during asynchronous serial short-range communication is _________.
10. If the data in accumulator A is 01110010B, then P in PSW = _________.
II. Single-choice questions (Select one correct answer from the four alternative answers for each question and fill in the correct answer number in the brackets of the question stem. Each question is worth 1 point, for a total of 10 points)
1.The reset signal of MCS-51 microcontroller is (
A. High level
2. If the MCS-51 microcontroller uses a crystal oscillator frequency of 6MHz, its reset duration should exceed (
A.2μs
3. If PSW.4=0, PSW.3=1, to push the contents of register R0 into the stack, you should use the (
A. PUSH
C. PUSH
4. The read-only memory that can use ultraviolet light to erase the program in ROM is called (
A. Mask ROM
5. To expand a 2764 program memory chip outside the chip, you need to (
A.8B.13C.16D.20
6.Timer/counter working mode 1 is (
A. 8-bit counter structure
C. 13-bit counting structure
7. If the crystal oscillator frequency of the MCS-51 microcontroller is 12MHz, when the timer is used as a counter, its maximum input counting frequency should be (
A.2MHz
8. Given a common cathode LED display, where segment a is the lowest bit of the glyph code, if the number 1 needs to be displayed, its glyph code should be (
A.06H
9. In the following table of data word definitions, (
A.DW "AA"
C.DW "OABC"
10. In the serial port control register SCON, the function of REN is (
A. Receive interrupt request flag
C. Serial port allows receiving bit
3. Short answer questions (4 points for each question, 20 points in total)
1. Briefly describe the stack.
2. Briefly describe the displacement addressing method and give examples.
3. Briefly describe the main contents of interrupt response.
4. Briefly describe the rules for labels in assembly language
5. There are several ways to transmit data converted by A/D converter.
IV. Reading procedures (4 points for each question, 20 points in total)
1. After executing the first instruction in the following program segment, (1) (P1.7) = ____
ANL
ORL
2. After the following program segments are executed, (A) = _________, (B) = _________.
MOV
MOV
DIV
3. After the following program segment is executed, (R0) = _________, (7EH) = _________, (7FH) = _________.
MOV
MOV
MOV
DEC
DEC
DEC
4. Given that (SP) = 09H, (DPTR) = 4567H, after executing the following instructions, (SP) = _________, internal RAM (0AH) = _________, (0BH) = _________
PUSH
PUSH
5. The number annotated in the following program is the number of machine cycles required to execute the instruction. If the crystal oscillator frequency of the microcontroller is 6MHz, how long does it take to execute the following program?
MOV R3,#100;1
LOOP: NOP
NOP
NOP
DJNZ
RET
5. Programming questions (4 points for each question, 20 points in total)
1. Please use bit operation instructions to implement the following logical operations:
P1.5=ACC.2∧P2.7∨ACC.1∧P2.0
2. There are 10 bytes of data in the data table with the first address of the external RAM as TABLE. Please program to set the highest bit of each byte to 1 unconditionally.
3. It is known that the internal RAM
4. It is known that the sum of 8 unsigned numbers is stored in R3R4. Find their average value. The result is still stored in R3R4. Please implement it through programming (R3 is the high byte).
5. Two strings are stored in the internal RAM with the first address of 42H and 52H respectively, and the string length is placed in the 41H unit. Please program to compare the two strings. If they are equal, send the number 00H to the 40H unit, otherwise send 0FFH to the 40H unit.
VI. Comprehensive application questions (10 points for each question, 20 points in total)
1. Use an 8031 microcontroller and one 2716 (2KB) and one 6116 (2KB) to form an expansion system with both program memory and data memory. Please:
(1) Draw a logic circuit diagram
(2) Description of its storage space
2. As shown in the figure, the D/A converter DAC
(1) Draw a single buffer interface circuit
(2) Programming to generate a positive sawtooth wave
Answer
1. Fill in the blanks (1 point for each blank, 10 points in total)
1. Low level
2. The address/data bus of the microcontroller system
3.10H~17H
4. During program interruption or subroutine call
5. Calculation and control functions
6. The process of fetching and executing instructions over and over again
7. Cause of the interrupt (or source that can issue an interrupt request)
8. Registers in the interface circuit that have been addressed and can be read or written
9.TTL level signal
10.0
II. Single-choice questions (1 point for each question, 10 points in total)
1.A
6.D
3. Short answer questions (4 points each, 20 points in total)
1. (1) A RAM area set up to protect the return address (breakpoint) and the context when a program is interrupted or a subroutine is called.
(2) Use MOV SP, #STK instructions to create a stack.
(3) Data is stored according to the "last in, first out" principle.
(4) Use the PUSH and POP instructions to perform stack push and pop operations.
2. (1) Displacement addressing uses DPTR or PC as the base register and accumulator A as the index register, with the 16-bit address in the form of the sum of the two contents as the operand address.
(2) Displacement addressing can only address fixed memory, and there are only three instructions:
MOVC A, @A+DPTR
MOVC A, @A+PC
JMP @A+DPTR
The first two are table lookup instructions, and the last one is an unconditional transfer instruction.
3. The hardware automatically generates a call instruction LCALL to transfer to the interrupt service. The specific operations are:
(1) Push the contents of the program counter PC (breakpoint) onto the stack
(2) Load the interrupt entry address into PC and execute the interrupt service routine
4. (1) The label consists of 1 to 8 characters, and the first character must be a letter.
(2) Symbols defined in assembly language cannot be used.
(3) The label must be followed by a colon:
(4) The same label can only be defined once in a program.
5. (1) Timing transmission mode: After A/D is started, the data can be read after calling the delay program with a delay time greater than the conversion time.
(2) Query method: After the A/D is started, query the EOC (conversion end signal) and read the conversion data once the conversion is completed.
(3) Interrupt mode: Use EOC as the external interrupt request signal. Once the conversion is completed, an interrupt is caused to read the conversion data.
IV. Reading procedures (4 points for each question, 20 points in total)
1. (1) (P1, 7) = 0, (P1.3) = 0, (P1.2) = 0
(2) (P1.5)=1, (P1.4)=1, (P1.3)=1
2. (A) = 0DH (or 13)
(B) = 11H (or 17)
3. (R0)=7EH, (7EH)=FFH, (7FH)=3FH
4. (SP) = 0BH
(0AH) = 67H
(0BH) = 45H
5. One machine cycle is 2μs
The time required to execute the program is T = 2μs*(5×100+3) = 1006μs≈1ms
5. Programming questions (4 points each, 20 points in total)
1. Perform the AND operation first, then the OR operation. The procedure is as follows:
MOV
ANL
MOV
MOV, C, A
ANL
ORL
MOV
RET
2.
MOV
LOOP:
ORL
MOV
1NC
DJNZ
RET
3.
MOV
MOV
LOOP: MOV
MOV
1NC
1NC
DJNZ R2, LOOP
RET
4. Use the shift instruction to perform the division by 8 operation. The procedure is as follows:
MOV
LOOP: CLR
MOV
RRC
MOV
MOV
RRC
MOV
DJNZ R2, LOOP
RET
5. If one byte is different, the entire string is not equal. If all bytes are equal, the two strings are equal.
MOV
MOV
LOOP: MOV
CLR
SUBB A, @R1
JNZ
INC
INC
DJNZ
MOV
RET
LOOP1: MOV
RET
VI. Comprehensive application questions (10 points each, 20 points in total)
1. (1) Logic diagram
(2) Address:
Chip P2.2 P2.1 P2.0 P0.7 …… P0.0 address range
2716 0 0 0 0 … 0 0000H
…
1 1 1 1 … 1 07FFH
6116 0 0 0 0 … 0 0000H
1 1 1 1 … 1 07FFH
2. (1)
(2) Procedure
DASAW: MOV
MOV, A, #0
LOOP:MOVX
1NC
NOP
AJMP
Previous article:C51 MCU serial communication points
Next article:MCS-51 MCU Memory Structure
- Popular Resources
- Popular amplifiers
- Learn ARM development(16)
- Learn ARM development(17)
- Learn ARM development(18)
- Embedded system debugging simulation tool
- A small question that has been bothering me recently has finally been solved~~
- Learn ARM development (1)
- Learn ARM development (2)
- Learn ARM development (4)
- Learn ARM development (6)
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- Analysis of the application of several common contact parts in high-voltage connectors of new energy vehicles
- Wiring harness durability test and contact voltage drop test method
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- From probes to power supplies, Tektronix is leading the way in comprehensive innovation in power electronics testing
- Sn-doped CuO nanostructure-based ethanol gas sensor for real-time drunk driving detection in vehicles
- Design considerations for automotive battery wiring harness
- Do you know all the various motors commonly used in automotive electronics?
- What are the functions of the Internet of Vehicles? What are the uses and benefits of the Internet of Vehicles?
- Power Inverter - A critical safety system for electric vehicles
- Analysis of the information security mechanism of AUTOSAR, the automotive embedded software framework
- I need help from the experts on a question about proteus8
- [Solved] How to start DSP on ARM
- Recruitment position in Xiamen IC design company: MCU product development engineer
- 【Running posture training shoes】No.006-Bluetooth communication program design
- Can STM32 use a timer to control PWM output
- As shown in the figure, the netlist is transferred to the PCB, and these four networks form GND_SIGNAL_20640, which is not connected to GND_SIGNAL.
- mpy implements partial PEP-498 (f-string) support
- IAR_msp430 built-in delay function
- 【LAUNCHXL-CC2650】+Building the development environment
- Collection of popular MCU data downloads