Design based on AT89C4051 digital clock

Publisher:心有归属Latest update time:2023-03-27 Source: elecfansKeywords:AT89C4051 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

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.


Keywords:AT89C4051 Reference address:Design based on AT89C4051 digital clock

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

Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号