This paper proposes a hardware circuit design based on the STC single-chip microcomputer learning platform, which uses a new single-chip microcomputer model STC12C5410AD, and adds some serial interface chips to the learning platform. The interface standards include RS-232, SPI, IIC, 1-wire, etc. The design goals of the learning platform are: ISP programmable, LCD display, calendar clock (IIC interface chip), temperature measurement (1-wire interface chip), FLAH memory (SPI interface chip), button (wax change scan button), voltage measurement (AD conversion).
1 Hardware System Overview
The learning platform is based on STC12C5410AD, and the structure diagram is shown in Figure 1.
1.1 Introduction to STC12C5410AD MCU
The STC12C5410AD microcontroller is an enhanced microcontroller launched by Hongjing Technology after major improvements on the standard 8051 microcontroller core. It is an enhanced 8051 microcontroller with a single clock/machine cycle, an operating voltage of 5.5V to 3.5V, an operating frequency range of 0 to 35MHz, 512 bytes of on-chip data memory, 10K bytes of on-chip Flash program memory, ISP (in-system programmable)/IAP (in-application programmable), can directly download programs through the serial port, EEPROM function, 6 16-bit timers/counters, PWM (4 channels)/PCA (programmable counter array, 4 channels), 8 channels of 10-bit A/D conversion, and SPI synchronous communication port.
2 Hardware System Design
2.1 Crystal oscillator, power supply and reset circuit
Figures 2, 3 and 4 are the reset circuit, power circuit and crystal oscillator circuit respectively. The RST network in the reset circuit is connected to pin 3 of the STC12C5410AD microcontroller, and the circuit is reset when powered on. Since the operating voltage of the STC12C5410AD microcontroller is between 5.5 and 3.5V, a 5V switching power supply is used for the power supply. In order to ensure accurate AD conversion, an LM7805 voltage regulator chip is added.
ISP (In-System Programming) is programmable in the system, which means that the blank devices on the circuit board can be programmed to write the end-user code without the need to erase or reprogram the circuit board. To download the device, the 8051-programmed single-chip machine can also be programmed with ISP. It is more complicated to use a programmer or emulator, but STC12C5410AD supports ISP. As long as the circuit in Figure 5 is added, the program to be debugged can be written to the microcontroller on the circuit board by using the ISP download software on the PC side of the STC microcontroller through the serial port. The network labels RxD and TxD in the figure below are connected to the P3.0 port and P3.1 port of the STC12C5410AD microcontroller respectively.
2.3 Button Circuit
Since the Io port resources are limited and STCl2C5410AD has its own AD conversion, AD conversion is used for key scanning, and the key circuit is shown in Figure 6. The BUTTON network label is connected to the P1.0 AD conversion port of the microcontroller.
2.4 LCD display circuit
The LCD display circuit is shown in Figure 7. Because the Io port of the STC12C5410AD microcontroller is limited, and the 1602 LCD screen requires 8 data ports, a 74HC164 chip is used to convert the serial port input into the parallel port output, and a 74LS273 latch chip is added to prevent unnecessary data from being sent to the 1602 LCD screen during the serial shift-in process, resulting in display errors.
2.5 Calendar clock circuit
The calendar clock circuit is shown in Figure 8. It uses the DS1302 chip launched by Dallas, which is an IIC interface chip. The STC12C5410AD microcontroller does not have an IIC communication port, so two IO ports are used to simulate the IIC interface through software. The two network labels DS1302_SCLK and DS1302_DATA are connected to the P2.2 and P2.3 ports of the STC12C5410AD microcontroller, and a 10K pull-up resistor is added to each of these two u. The RST_DS1302 network label is connected to P0.0 to reset the DS1302 chip.
2.6 Temperature measurement circuit
The temperature measurement circuit is shown in Figure 9. It uses the single-bus digital temperature sensor DS18B20 from Dallas Company. Therefore, it is not necessary to add an analog-to-digital conversion circuit and directly connect its DQ pin to an IO port of the microcontroller.
2.7 FLASH Circuit
The circuit is shown in Figure 10. AT25F512 is a Flash chip with SPI interface. STC12C5410AD has its own SPI communication port. SCK, MISO, MOSI and Ss network labels are connected to P1.7, P1.6, P1.5 and P0.3 of the microcontroller respectively, and a 10K pull-up resistor is added to each.
2.8 DA conversion circuit
The DA conversion circuit is shown in Figure 11, which uses the PWM function of the microcontroller to achieve DA conversion.
3 Conclusion
This paper proposes a design of hardware circuit for a learning platform based on STC12C5410AD microcontroller. Compared with the traditional 8051 microcontroller, the method of designing circuits with STC12C5410AD microcontroller is somewhat different. It does not have the ALE (address latch) pin of 8051, so its PoEl cannot be used as an address data multiplexing port. Most of the hardware circuits of the learning platform use serial port chips, including most mainstream serial port standards. LCD screen is used instead of digital tube for display, FLASH storage chip is added, and PWM function of STC12C5410AD is used to realize DA conversion, making full use of the resources of STC12C5410AD microcontroller. At the same time, the chip has its own watchdog hardware circuit and M function of II subject, which is suitable for use as a learning platform for teaching experiments.
Previous article:Design of Ethernet-CAN conversion circuit based on C8051F040
Next article:Design of a simple music circuit using a buzzer and a single-chip microcomputer
Recommended ReadingLatest update time:2024-11-16 22:40
- Popular Resources
- Popular amplifiers
- Principles and Applications of Single Chip Microcomputers 3rd Edition (Zhang Yigang)
- STC32G Series MCU Technical Reference Manual
- Microcontroller Principles and Application Project Tutorial - Based on STC15W4K32S4 Series Microcontroller
- Lightweight target recognition and tracking model based on YOLOv5
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- 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
- Documentation for adding Bluetooth to MicroPython
- How to convert brd file to ad pcb file
- Class AB amplifier power calculation problem
- GNSS Antenna Design Recommendations
- I am a beginner and I need answers to two questions.
- [Operation Tutorial] Practical operation of ATX-100 series wire harness tester!
- MSP430 low power event driven working mode
- How to achieve communication between heterogeneous processors - Mir takes you to play with the i.MX 8M Plus development board
- How to select switching power supply topology-Video sharing
- 【AT32F421 Review】+ Introduction and Development Environment Construction