4.3 Power-off data storage procedure
This part mainly includes: (1) Read the data stored in 93C46 to the corresponding position every time the machine is turned on. (2) After each cycle scan and function query in the main program, write the current value and stored data into the 93C46 chip. The two parts of the program are as follows:
(1) Program to read data from 93C46
LCALL INSB ; Read the value before the last shutdown
MOV A,#80H
ORL A,#80H
LCALL WRI ;Call write instruction
NOP
NOP
LCALL RDI ; read and write data in 31H
MOV 31H,A
LCALL RDI
MOV 2FH,A ; read and write data in 2FH
SETB P3.2
NOP
MOV R0,#0AH
MOV R1,#4AH
MOV R2,#82H
QUSHU: LCALL CUNTAI ; Restore the data stored in the ten keys 0-9
INC R2
INC R2
DJNZ R0,QUSHU
(2) Write data into 93C46
LCALL INSB ; write enable
MOV A,#30H
LCALL WRI
LCALL INSB ; write operation
MOV A,#40H
ORL A,#40H
LCALL WRI ; call the erase and write instruction
MOV A,31H
LCALL WRI ;Write data into 31H
MOV A,2FH
LCALL WRI ;Write data into 2FH
SETB P3.2
NOP
NOP
CLR P3.2
WAIT1:JNB P2.7,WAIT1
MOV R0,#0AH
MOV R1,#4AH
MOV R2,#42H
XIERU:LCALL BAOHU ;Write the data of radio stations 0-9 into the corresponding storage units
INC R2
INC R2
DJNZ R0,XIERU
LCALL INSB
MOV A,#00H ; write disabled
LCALL WRI
SETB P3.2
4.4 Program operation monitoring part
The watchdog circuit mainly requires the MCU P3.6 to output a pulse every once in a while (less than 10 pulse intervals) to reset the counter CD4017, so that the QA terminal of CD4017 cannot become a high level, indicating that the MCU is working normally. The program is as follows:
WATCHDOG:CLR P3.6 ;复位WATCHDOG
LCALL DELAY10 ;Call delay
SETB P3.6 ; Allow WATCHDOG to start working
LCALL DELAY10
JNB P3.6, WATCHDOG ; Waiting for query
RIGHT
Chapter 5 Test Methods and Data
5.1 Test instruments
Panasonic FM/AM V-P8177A10 signal generator HP54520A, 500M digital storage oscilloscope DF93094-Y2 digital multimeter, DF1647 signal generator.
5.2 Machine performance test
A Maximum undistorted power test, the test block diagram is shown in the figure. The output carrier frequencies of the FM signal source are 88, 96, 102, and 108MHz respectively, and the modulation frequencies are 100Hz, 1KHz, and 1.5KHz. The input level is 2mV. The FM signal is added to the BPF bandpass filter. The receiver is tuned at 88MHz, 96MHz, 102MHz, and 108MHz respectively. Change the volume potentiometer to minimize the voltage waveform distortion at both ends of the load (8 ohms). Note the voltage U0 at both ends of R2, press P=U2/R, and calculate the maximum undistorted power. The data is shown in the following table
B. Sensitivity test: The method is similar to the maximum undistorted power test. Adjust the volume potentiometer to make the receiver output power 100mW, reduce the signal source output amplitude, and make the output waveform just undistorted. At this time, the output voltage of the FM signal source is the sensitivity, and the data is shown in the table below:
C. Image rejection ratio test block diagram is shown as follows:
First measure the signal source output recording sensitivity level, the intermediate frequency output voltage when there is no modulation signal, change the frequency to the mirror frequency corresponding to each frequency point, adjust the output level of the signal generator to increase the intermediate frequency output voltage to the original standard measurement. The ratio of the two FM signal source output voltages before and after is expressed in DB, which is the image suppression ratio.
The data is shown in the following table:
5.3 Functional Testing
① It can realize full frequency range search and select stored radio stations.
②It can realize the search and selection of stored radio stations in a specific range.
③It is possible to call any stored radio station.
④With carrier display function.
Chapter 6 Circuit Fabrication
This design makes the system on three printed boards: key display board, single chip system board and radio board. Each functional board contains the components of each functional block and the corresponding auxiliary devices. The production requirements and rules are based on the following:
Principles of component layout on printed circuit boards
The quality of the layout of components on the printed circuit board directly affects the performance of the entire machine. The basic principles to consider are:
In general, all components should be placed on the side that is basically not welded to facilitate installation, welding, debugging and maintenance.
The components on the radio board should be arranged in circuit order as much as possible, and the circuit should be arranged compactly and densely to shorten the leads. This is especially important for high-frequency circuits.
When arranging the spacing of components, the potential gradient between them should be considered to prevent arcing and sparking. While ensuring performance, the layout of components should be parallel or vertical to achieve neatness and beauty.
A complete circuit should be installed on one circuit board as much as possible. If the circuit is complex or requires shielding, and needs to be divided into several printed circuit boards for installation, each complete circuit with independent functions should be placed on the same board.
Technical requirements for component installation
The distribution of components on the printed board should be as uniform as possible, with consistent density. Oblique, three-dimensional cross and overlapping arrangements are not allowed. The component housing and leads should ensure a safe gap of about 1mm. There should be a reasonable gap of 0.2~0.4mm between the pin diameter of the component and the solder hole diameter of the printed circuit board, which should not be too large.
Principles of printed circuit board wiring
The common ground wire is arranged at the edge of the printed circuit board, and an appropriate distance is left from the ground wire to the edge. Except for one side of the lead wire, the other sides are usually laid with ground wires. The power line and the corresponding filter circuit are arranged close to the ground wire, which can reduce the interference caused by the coupling of the power line and is conducive to grounding. The ground wire of each unit should generally form a loop, but have a common grounding point, so as to avoid inter-level interference caused by ground current. In addition, the ground wire is generally not made into a closed loop, so as not to form a coil that generates electromagnetic interference under the action of the magnetic field.
The main circuits are usually arranged on the printed circuit board in units. Each functional part is as independent as possible, the leads are as short and straight as possible, and the input and output leads are separated and as far away as possible. The control lines of the microcontroller are generally arranged in parallel groups, and are as straight, neat and beautiful as possible.
In places where frequent testing is required, some separate test points should be set up to facilitate debugging and maintenance.
Chapter VII Test Results Analysis and Improvement Measures
Due to limited conditions (lack of instruments such as field strength meters), the test method we used is not very perfect, but the test results reflect the function of the FM radio we designed to a certain extent. The sensitivity of each frequency point is different. We analyzed that it may be due to the different sensitivity of the input bandpass filter to the attenuation of signals of different frequencies. The receiver has a high image suppression ratio. We believe that the bandpass filter at the input end of the antenna plays a big role.
Judging from the functions realized by the devices used in this FM radio, there are still areas that can be improved and perfected, such as the use of LCD display to provide Chinese character information, adding time display, and the use of composite keys for function keys to reduce the number of keys. From the perspective of power supply for the entire machine and ease of carrying, the entire machine should use a lower power supply.
In general, the receiving performance of this design has met the requirements, some have far exceeded the requirements of the topic, and the control function is basically complete.
Conclusion
Through the graduation project of this subject, I have basically mastered the working principle and application of phase-locked frequency synthesis technology, understood the working principle of radio and the measurement and debugging methods of high-frequency circuits, mastered the simple control of equipment using single-chip microcomputer system, and understood the ideas and methods of programming related single-chip microcomputer programs. Due to the time constraints and insufficient experimental conditions, this design needs to be further improved. Through this graduation project, I feel that I have exercised my abilities, learned knowledge, and benefited a lot.
Here, I would like to express my sincere gratitude to Teacher Li Jie for his careful guidance and thoughtful answers, which enabled me to successfully complete this design.
Previous article:Design of ultrasonic distance measurement based on 51 single chip microcomputer (with temperature compensation)
Next article:★★51 MCU 8*8 dot matrix airplane shooting snake game★★
Recommended ReadingLatest update time:2024-11-15 19:31
- Popular Resources
- Popular amplifiers
- Wireless Sensor Network Technology and Applications (Edited by Mou Si, Yin Hong, and Su Xing)
- Modern Electronic Technology Training Course (Edited by Yao Youfeng)
- Modern arc welding power supply and its control
- Small AC Servo Motor Control Circuit Design (by Masaru Ishijima; translated by Xue Liang and Zhu Jianjun, by Masaru Ishijima, Xue Liang, and Zhu Jianjun)
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
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- Sandia Labs develops battery failure early warning technology to detect battery failures faster
- How to generate a trapezoidal waveform using TINA-TI?
- C language uses binary tree to parse polynomials and evaluate
- Vcom of a fully differential amplifier
- Free evaluation - Topmicro intelligent display module (4) displays Chinese characters
- Women's football wins!!!
- nand flash interface switch
- Please tell me about the LCD controller of RL78
- Generation of IP cores in FPGA
- [National Technology N32G430] 4. Make a simple and easy-to-use multi-task scheduling system
- [Anxinke UWB indoor positioning module NodeMCU-BU01] 02. AT command distance measurement