This is a real-time digital clock made with AT89C405l microcontroller. Due to the use of AT89C405l, this digital clock is very low cost and small in size. It can be made into a small module and is very convenient to use.
1. Hardware design
The figure below is the circuit schematic diagram of a digital clock.
The P1 port of the AT89C4051 microcontroller is used to connect the LCD data line (from pin 7 to pin 14 of the LCD). Use a 20×4 LCD character display.
2. LCD custom character method
In the picture on the right, you can see that the numbers are much larger than the normal font size. For this reason, an LCD with CGRAM (CGRAM is the RAM of the font and character generator, the full name is CharacterGeneratorRAM, or CGRAM for short) is used. Users can flexibly customize characters. . To define a character, first get the value of the character and then write it into the CGRAM area. This CGRAM area starts at O×40, with 8 cells per character. The image on the left is an illustration of a custom character. Therefore, we need to obtain the values of all pixels of the character and write these values into CGRAM. Numbers 0 to 9 can be created with the help of custom 8-shaped characters. Note: Only up to 8 custom characters can be created.
3. Programming
The source code for this production is written in C language and compiled with KeilC. You can download the source code of C. After the source code of C is compiled, you can directly download the hex file to your microcontroller.
4. Production
If you cannot buy the microcontroller in the schematic diagram during production, you can also use AT89C51/AT89C52 instead. But you must ensure that the IO port you use and the port connected to the LCD button are the same as the IO port in the C source code or circuit schematic diagram.
The schematic diagram already contains the power supply part principle.
Previous article:Design of access control system based on AT89C2051 microcontroller
Next article:Principle and design of adjustable regulated power supply based on AT89S51 control
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- 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
- How smart stores equipped with multiple sensors make shopping a breeze
- ROHM R Classroom: Power supply design technical information is continuously updated. Click to download
- TPS546D24_C23 dynamic voltage regulation
- Sampling Theorem-------------What is the relationship between the detected signal and the ADC sampling rate?
- Showing off the products + CSR development board 10 years ago, when the Bluetooth market was just beginning to develop!
- LIN communication wake-up question
- An introduction to TI's high-efficiency integrated power supply selection and reference designs
- About the problem of the ambient light sensor of the rsl10-sense-gevk board not working well
- Can someone please help me analyze this transistor circuit? Is this parallel voltage negative feedback or parallel current negative feedback?
- 6410 Bare Metal Program