Single chip microcomputer controls digital tube display

Publisher:EnchantedMelodyLatest update time:2016-09-23 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
Using a single-chip microcomputer to control the display of 6 common cathode 8-segment digital tubes, two latches can be used to select the position (which digital tube is the position) and the segment (which segment of the digital tube is the number to be displayed). The enable end of the 74HC573 latch is valid at a low level. When LE is high, the output end (output) follows the input end (D); when LE is low, the output end maintains the value when LE is high. The circuit diagram of the single-chip microcomputer controlling the digital tube through the latch is shown in Figure 1:
Single chip microcomputer controls digital tube display - Qing - Qing
illustrate:
1) When the digital tube is a common cathode, when the bit selects Q0~Q5, the response bit is 0 for selected, and 1 for unselected. For example, if the first digital tube P0 is selected = 0xfe;
2) Common cathode digital tube meter (segment selection meter)
  
0x3f , 0x06 , 0x5b , 0x4f , 0x66 , 0x6d , 
   0 1 2 3 4 5 
 0x7d , 0x07 , 0x7f , 0x6f , 0x77 , 0x7c , 
   6 7 8 9 A B 
 0x39 , 0x5e , 0x79 , 0x71 , 0x00 
   C D E F No display
3) Common cathode position selection table
0xfe,0xfd,0xfb,0xf7,0xef,0xdf
 1 2 3 4 5 6 (Choose which one)
3) Generally, the bit selection is performed first, then the lock is stored, and then the segment selection is performed, and the program example is
   sbit dula=P2^7;
   sbit wela=P^8;
while(1)
{
      wela=1;//bit selection
      P0=0xfe; //Select the second digital tube
     wela=0; //bit latch
     dula=1;//segment selection
    P0=0x39; //display 6
     dula=0; //segment latch 
delay (); //Usually write a delay function yourself or use an interrupt timer to delay
}
Reference address:Single chip microcomputer controls digital tube display

Previous article:What is SBUF
Next article:LED flashing program (bit operation)

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号