3.1 LED Light Module
3.1.1 LED Schematic Diagram
Figure 3-1-1 LED lamp schematic diagram
The LED light module is connected to the IO port of the microcontroller through the 74573 latch chip, and shares the IO port with the digital tube.
On the development board, you need to use a cable to connect the J12 pin header to the P0 port.
Figure 3-1-3
3.1.2 74HC573 Latch Introduction
The 74HC573 is a transparent latch with eight outputs and three output states.
Latching is to temporarily store the signal to maintain a certain level state.
Figure 3-1-4
When OE is high, the output is always in high impedance state. At this time, the chip is in an uncontrollable state. In general applications, OE must be connected to a low level.
LE is the output state change enable terminal. When LE is low, the output terminal Q always maintains the last stored signal (input from the D terminal). When LE is high, Q follows the state change of D and latches the state of D. That is to say, when the latch enable terminal LE is high, the latch of these devices is transparent to the data (that is, the output is synchronized). When the latch enable becomes low, the data that meets the setup time and hold time will be latched.
3.1.3 Example Code
When the latch is configured in the pass-through state (LE=1), the implemented flash code is:
#include #include void DelayMs(int ms); int main(void){ while(1) { P0=0x0; DelayMs(500); P0=0xFF; DelayMs(500); }} void DelayMs(int ms){ int i; unsigned char a,b; for(i=0;i for(a=1;a>0;a--); }}
Previous article:51 MCU Development Timer
Next article:51 MCU matrix keyboard scanning and display
- Popular Resources
- Popular amplifiers
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
- Mercury-containing thermometers will be banned from 2026? What do you think is the best alternative?
- Help: AT32F425 pinout information
- China Mobile launches Super SIM card, enabling one card to travel around the world
- Tips for implementing I2C with MSP
- ARM-based support for advanced video graphics capabilities on MCUs
- 12-bit ADC
- [Anxinke UWB indoor positioning module NodeMCU-BU01] No.003-Application program joint debugging
- New Bluetooth TFT color screen capacitive touch electronic bracelet 10 yuan each
- Questions about burning program
- In China's Internet of Things industry chain, which field are the companies you are familiar with in?