Application of LED digital display function

Publisher:chinalisaLatest update time:2018-03-06 Source: eefocusKeywords:LED Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

  The following is a C program example of countdown and countdown to illustrate the application of the LED digital display function display(x).

  (1) Hardware circuit
  
  Use the PIC16F84A 4-digit LED digital display circuit to make a 2-digit digital tube (the other two digits are not used) 99-0 countdown and countdown display. The countdown is in seconds and the countdown is in minutes. As long as there is a display function display(), the format of the counting and timing program is the same.

  (2) The C source program listing for 99~0 (in minutes) is as follows. The program name is pic13.c.


  Note: a For the above C source program, you only need to change the unsigned integer variable d (unsignedint d) in the display function display(x) from 5700 to 95 to turn it into a countdown program from 99 to 0 in seconds, because the value of d determines the time of the unit digit displayed by the digital tube (it is unique).

  b. If you want to use the above program and have strict requirements on the accuracy of timing (minutes or seconds), you can fine-tune the integer variable d value (57000) based on the standard clock to achieve high-precision minute or second timing.

  c. All the C source programs of the above PIC microcontrollers are executable and can be used by beginners without any worries.


Keywords:LED Reference address:Application of LED digital display function

Previous article:DS1302 device interface code on PIC microcontroller
Next article:PIC microcontroller pin interrupt program design skills

Recommended ReadingLatest update time:2024-11-16 17:44

LED packaging technology has made great progress, and the top ten trends are reviewed one by one
Last month, Shenzhen Jingtai Optoelectronics Co., Ltd. successfully held the "Driving Efficient Light" product promotion conference in Guangzhou. At the conference, Jingtai Optoelectronics fully demonstrated the LED packaging cutting-edge technology and the latest device products in the three major fields of LED light
[Analog Electronics]
LED packaging technology has made great progress, and the top ten trends are reviewed one by one
Driving six LEDs via two PIC pins
  This design idea shows a new method to drive six LEDs using only two MCU I/O lines. This method is especially suitable for any chip with limited pins. This method uses two I/O lines and a pair of complementary bipolar transistors. More than one LED can be lit by multiplexing.        Figure 1: The PIC10F200 is sele
[Power Management]
Driving six LEDs via two PIC pins
Hyundai Motors applies for new patent to make gear shift indicator LED
Hyundai Motor Company recently applied for a new patent to make the shift indicator LED to simplify the steering assembly process and save costs. The application of this technology may bring about a major change in the mode of technology introduction in the automotive market. It is reported that this pat
[Automotive Electronics]
Hyundai Motors applies for new patent to make gear shift indicator LED
Application of LED dot matrix digital mixed display in sports stadiums
1 Introduction When a major competition is held, the stadium needs to display various game information to the audience in a timely manner so that the audience can have a clear understanding of the game. In the early days, stadiums generally used light bulbs to make display screens to display information, bu
[Security Electronics]
Application of LED dot matrix digital mixed display in sports stadiums
The relationship between high-power LED lighting design and PPTC
The biggest design challenges currently faced by developers of high-power LED lighting solutions are heat dissipation design and overheat protection. They must overcome the problem that LED light sources are highly sensitive to heat, because excessive heat or improper application will greatly reduce th
[Power Management]
BOE Technology's Black Technology for Improving Micro-LED Display Devices Exposed
In the field of display technology, although LCD liquid crystals occupy most of the market, the OLED and Micro-LED technologies that have emerged in recent years have gradually entered the public eye with their unique advantages. As a well-known company in the domestic display field, BOE has already laid out this new
[Mobile phone portable]
BOE Technology's Black Technology for Improving Micro-LED Display Devices Exposed
How a Buck Regulator Becomes a Smart Dimmable LED Driver (Part 3)
This method does not require the SS or TRK pins. The FB pin is still regulated to 600 mV (but the voltage at RSENSE is regulated to FBREF(NEW)). This means that the other functions of the chip (including soft-start, tracking, and power good indication) will still operate normally.   The disadvantage of this approach
[Analog Electronics]
How a Buck Regulator Becomes a Smart Dimmable LED Driver (Part 3)
Analysis and Countermeasures of LED Junction Temperature Causes
1. What is the junction temperature of LED ? The basic structure of LED is a P-N junction of a semiconductor . Experiments show that when current flows through an LED element , the temperature of the P-N junction will rise. Strictly speaking, the temperature of the P-N junction area
[Power Management]
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号