The LED dot matrix display introduced in this article can be used to display parameters such as safety days, time, temperature, etc. The program of this article is written using the real-time operating system RTOS. It is introduced as follows.
1. Hardware composition and working principle
(1) CPU control board: The principle is shown in Figure 1. ATmega16 is the core. A 4-16 decoder CD4514 is added to drive ULN2003 to complete the row scanning of the LED. The real-time clock is composed of DS1302 and a 3.6V rechargeable battery. The clock can still work when the power is off. J3 is the ISP program download interface, J4 is the program debugging interface, and J8 is the external adjustment button. The parameters can be adjusted manually without a remote control. J5 is an integrated infrared receiver. ATmega16 has a hardware ISP interface that can directly drive the serial shift chip 74HC595.
(2) LED display board: The principle is shown in Figure 2. It is composed of 16 8x8 LED dot matrices and can display 4 Chinese characters at the same time. 8 74HC595s complete the column drive of the display screen. The two circuit boards are connected by a 40-core flat cable. A display buffer area is opened in the internal RAM of the CPU. The CPU control board reads the Chinese character dot matrix code inside the flash and writes it to the display buffer area. Then read the first line of data in the video memory, drive the 74HC595 through the ISP interface, convert the serial data to parallel, and then connect the corresponding line. After displaying for 1ms, take the next line of data and display it for 1ms until the 16th line, completing a scan. Then shift the data in the video memory to the left by one position and scan it again. In this way, all the Chinese characters are moved into the video memory and displayed in turn, thus realizing the shift of Chinese characters from right to left. After all the Chinese characters are moved, the registers of time, temperature and safety days are refreshed once.
2. Basic structure of the program
First, divide the tasks according to their functional independence. They are divided into five tasks: time reading and writing, temperature acquisition, LED scanning and display, date and day adjustment, and adjusted parameter flashing. Secondly, determine the priority of the task. Time reading and writing, temperature acquisition are 8 levels, date and day adjustment and adjusted parameter flashing are 5 levels, and LED scanning and display are 3 levels. The priority of the task can also be changed dynamically during program operation. The main program is as follows:
The RTOS timing operating system is used in the programming. The main difference between this program and the general foreground and background programs is that each task (i.e., subroutine) works in an infinite loop. The user only needs to do some initialization work for the task. As for when to run what task, this tedious matter can be left to the system to do, so as to maximize the utilization of the CPU.
3. Usage
The remote control used is a finished TV remote control. Press the power button, and it will display "adjust year ××××" and the adjusted digit will flash. Press the volume "+" to increase the corresponding digit, and after adding to 9, it will return to 0. Press the channel "+" to change the adjusted digit.
At the same time, the corresponding bit flashes.
Press the power button again, and the screen will display “Adjust month ××”, “Adjust day ××”, “Week ××”, “Adjust time ××”, “Adjust minute ××”, and “Adjust day ××××” in sequence, ending.
Previous article:LED display chromaticity processing technology
Next article:High-efficiency 120 white LED driving technology based on SC442 design
Recommended ReadingLatest update time:2024-11-16 15:24
- Popular Resources
- Popular amplifiers
- MathWorks and NXP Collaborate to Launch Model-Based Design Toolbox for Battery Management Systems
- STMicroelectronics' advanced galvanically isolated gate driver STGAP3S provides flexible protection for IGBTs and SiC MOSFETs
- New diaphragm-free solid-state lithium battery technology is launched: the distance between the positive and negative electrodes is less than 0.000001 meters
- [“Source” Observe the Autumn Series] Application and testing of the next generation of semiconductor gallium oxide device photodetectors
- 采用自主设计封装,绝缘电阻显著提高!ROHM开发出更高电压xEV系统的SiC肖特基势垒二极管
- Will GaN replace SiC? PI's disruptive 1700V InnoMux2 is here to demonstrate
- From Isolation to the Third and a Half Generation: Understanding Naxinwei's Gate Driver IC in One Article
- The appeal of 48 V technology: importance, benefits and key factors in system-level applications
- Important breakthrough in recycling of used lithium-ion batteries
- 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
- [NXP Rapid IoT Review] Week 2: Get familiar with the online GUI Rapid IoT Studio
- National College Student Electronic Design Competition Quadcopter UAV Data Album
- Today at 10:00 AM, there will be a prize live broadcast: [ADI will meet you for TOF (Time Of Flight) technology introduction and product applications]
- Second-order filter, how to ensure that the data does not overflow when performing fixed-point operations?
- GD32E231 DIY Competition (7) - Human infrared sensor module and music IC driver completed
- About the problem of data transmission between AD7768 evaluation board and sdp-h1 board
- Free e-book download | "ADI System Solutions Selection Volume 6"
- Hello everyone
- CC2541 Mini Development Kit and CC2540 by Original You
- 51 MCU ds18b20 simulation + detailed comment code