Design basis of eight-segment LED digital tube display in single chip system

Publisher:SparklingDreamsLatest update time:2017-10-11 Source: eefocus Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

In the single-chip computer system, LED digital tube displays are often used to display various numbers or symbols. Because of its clear display, high brightness, low voltage and long life, it is widely used.

Introduction: Do you still remember the "matchstick game" we played when we were young? Several matchsticks can be combined into various shapes. The LED digital tube display is actually such a thing.

Eight-segment LED digital tube display


Click here to view the image in a new window


The eight-segment LED digital tube display is composed of 8 light-emitting diodes. Among them, 7 long strips of light-emitting diodes are arranged in the shape of "日", and another dot-shaped light-emitting diode is used as a decimal point in the lower right corner of the digital tube display. It can display various numbers and some English letters. There are two different forms of LED digital tube displays: one is that the anodes of the 8 light-emitting diodes are connected together, which is called a common anode LED digital tube display; the other is that the cathodes of the 8 light-emitting diodes are connected together, which is called a common cathode LED digital tube display. As shown in the figure below. The 

names and arrangement positions of the stroke segments of the LED digital tube displays with common cathode and common anode structures are the same. When the diode is turned on, the corresponding stroke segment lights up, and various characters are displayed by the combination of the illuminated stroke segments. The 8 stroke segments hgfedcba correspond to a byte (8 bits) of D7 D6 D5 D4 D3 D2 D1 D0, so the 8-bit binary code can be used to represent the font code of the character to be displayed. For example, for a common cathode LED digital tube display, when the common cathode is grounded (zero level) and the anode hgfedcba segments are 0111011, the digital tube display displays the character "P", that is, for a common cathode LED digital tube display, the glyph code of the character "P" is 73H. If it is a common anode LED digital tube display, the common anode is connected to a high level, and the glyph code for displaying the character "P" should be 10001100 (8CH). It must be noted here that many products, for the convenience of wiring, often do not follow the rules to correspond to the relationship between fields and bits. At this time, the glyph code must be designed according to the wiring. We will give a routine later.



In the single-chip microcomputer application system, there are two common methods for displaying digital tube displays: static display and dynamic scanning display. The so-called static display means that each digital tube display must occupy a separate I/O interface with a latching function for the stroke segment glyph code. In this way, the single-chip microcomputer only needs to send the glyph code to be displayed to the interface circuit, and then it will not care about it until new data is to be displayed, and then send a new glyph code. Therefore, using this method, the CPU overhead in the single-chip microcomputer is small. There are many I/O interface circuits that can provide separate latching. Here, taking the commonly used serial-to-parallel conversion circuit 74LS164 as an example, a commonly used static display circuit is introduced to give everyone a certain understanding of static display. The 

serial port mode of the MCS-51 single-chip microcomputer is replaced by the shift register mode. Six external 74LS164s are used as the static display interface of the 6-bit LED digital tube display. The RXD of 8031 ​​is used as the data output line and the TXD is used as the shift clock pulse. The 74LS164 is a TTL unidirectional 8-bit shift register that can realize serial input and parallel output. Among them, A and B (pins 1 and 2) are serial data input terminals. The two pins input signals according to the logic and operation rules. They can be connected in parallel when there is a common input signal. T (pin 8) is the clock input terminal, which can be connected to the TXD terminal of the serial port. When the rising edge of each clock signal is added to the T terminal, the shift register shifts one bit. After 8 clock pulses, all 8-bit binary numbers are shifted into 74LS164. R (pin 9) is the reset terminal. When R=0, each bit of the shift register is reset to 0. Only when R=1, the clock pulse works. The parallel output terminals of Q1...Q8 (pins 3-6 and 10-13) are connected to the corresponding pins of each segment of hg---a of the LED digital tube display. The following can be introduced about 74LS164: the so-called clock pulse end actually requires high, low, high, low pulses, no matter how the pulse comes from. For example, we use a wire, one end is connected to T, and the other end is held by hand, connected to high level and low level respectively, that is also to give a clock pulse. At the moment when 74LS164 obtains the clock pulse (to be clear, it is at the edge of the pulse), if the data input end (pins 1 and 2) is high level, then there will be a 1 entering the inside of 74LS164, if the data input end is low level, then there will be a 0 entering its inside. After giving 8 pulses, the first data that first enters 74LS164 reaches the highest bit, and then what will happen with the next pulse? With another pulse, the first pulse will be moved out from the highest bit, just like queuing to buy tickets at the station, the railing is so long, in order for one person to enter from the back, one person must walk out from the front.  

After clarifying this, let's look at the circuit. Six 7LS164s are connected end to end, and the clock ends are connected together. In this way, when 8 pulses are input, the data output from the RXD end of the microcontroller enters the first 74LS164, and when the second 8 pulses arrive, this data enters the second 74LS164, and the new data enters the first 74LS164. In this way, when the sixth 8 pulses are completed, the first data sent is sent to the leftmost 164, and the other data appears in the first, second, third, fourth, and fifth 74LS164 in turn. There is a question. When the first pulse arrives, except for the first 74LS164 receiving data, what are the other chips doing? They are also receiving data because their clock ends are connected together, but the data has not been sent to the other chips. What data are they receiving? . . . . . . . . In fact, the so-called data is just a way of saying it. It actually refers to the level. When the first pulse arrives, the first 164 receives data from the microcontroller, and the other chips are also connected to Q8 of the previous chip. Q8 is a wire. In digital circuits, it can only have two states: low level or high level, that is, "0" or "1". So its next 74LS164 is also equivalent to receiving data. It's just that all it receives is 0 or 1. This question is put here to explain. Some friends may disdain it, and some friends may still not understand it. This actually involves the nature of numbers. If you don't understand it, please think carefully, find some numbers of digital circuits, understand the working principle of 164, and then look at this question. Be sure to understand it. If you understand this, your level is higher than that of a beginner, and you can be called a beginner. 


Reference address:Design basis of eight-segment LED digital tube display in single chip system

Previous article:Program to control the digital tube to display 0 and 1 using 89c51 single chip microcomputer
Next article:LED display program design for mcs-51 single chip microcomputer

Recommended ReadingLatest update time:2024-11-16 20:31

SA: Samsung Display still leads the global smartphone display panel market in the first half of 2021
According to the latest report from market research firm Strategy Analytics, the global smartphone display panel market revenue was US$21 billion in the first half of 2021. Among them, Samsung Display ranked first with a revenue share of 48%. As for the reasons for the growth of the smartphone display panel market,
[Mobile phone portable]
SA: Samsung Display still leads the global smartphone display panel market in the first half of 2021
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号