The serial communication port of 80C51 is a powerful communication port, and it is quite easy to use. It is very suitable for display driver circuit. Now we design a 4-bit LED display circuit based on this need by using two serial communication port lines plus two ordinary I/O ports. Of course, as long as two more I/O port lines are added, an 8-bit LED display circuit can be easily realized.
The left picture is the electrical schematic. We still use the C2051 microcontroller, and use the cheap and easily available 74LS164 and 74LS138 as expansion chips. The 74LS164 (detailed technical manual) is an 8-bit serial-input and parallel-output shift register. Its function here is to decode the serial data output by the C2051 serial communication port and output it on its parallel port line, thereby driving the LED digital tube. The 74LS138 is a 3-8 decoder, which decodes the address signal output by the microcontroller and dynamically drives the corresponding LED. However, the current driving capacity of the 74LS138 is relatively small, so we use the final drive transistor 2SA1015 as the address driver. |
Connect the segments of the four LEDs together, and their common ends are time-selected by 74LS138, so that at any time, only one LED is lit, which is the dynamic scanning display mode. Its advantages have been explained in the previous section. Using the serial port for LED communication, the program writing is quite simple. The user only needs to send the data to be displayed directly to the serial port send buffer and wait for the serial interrupt. Take a look at the following program. |
Program List |
Previous article:8051 Interrupt Sources
Next article:MCS-51 Data Transfer Instructions
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
- What is differential gain and differential phase?
- Microstrip Circuits (Tsinghua University)
- Introduction and analysis of namespace logical isolation
- MSP430F5438A clock system
- The chip does not have a DAC peripheral. Can PWM be used to simulate a DAC port?
- C2000 Software Serial Interface (SCI) Implementation Method
- 2020 I would like to say hello to everyone
- Reverse voltage protection circuit for battery charger applications
- [NXP Rapid IoT Review] +IOT First Experience and Web IDE Usage Process
- GD32L233C-START Development Board Evaluation 3: GD32L233C Chip Low Power Performance Test (Continued)