4 uses C2051 microcontroller, and uses cheap and easy-to-get 74LS164 and 74LS138 as expansion chips. 74LS164 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.
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 74LS138 is relatively small. For this reason, the circuit uses the final driving transistor 2SA1015 as the address driver.
The segments of the four LEDs are connected together, and their common ends are time-sharingly selected by 74LS138. In this way, at any time, only one LED is lit, which is a dynamic scanning display mode. 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:The principle design of leakage detection instrument using NEC single chip microcomputer
Next article:Using PWM to implement voice function for HCS12 MCU
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
- Leading domestic analog chip manufacturers are recruiting - a great opportunity to reach the pinnacle of life Location: Shanghai
- Op amp output calculation
- Upload two photosensitive detection circuits. The target detects different voltages according to different light exposure. Which one is correct?
- MSP430F149, HC_SR04 distance measurement
- SIMterix-Simplis~8~
- Reasons for failure of running the official routine USBFS-USB_Host-MSC_Host on GD32F105
- Importance of testing mobile phone lithium batteries, screens, and cameras from the perspective of mobile phone configuration
- Learn about the MSP430F5438A interrupt system
- Ask about EG8010 comparator positive feedback
- Topology Selection of Bidirectional DCDC Converter