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
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.
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
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- 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
- Controlling Hardware with Python - Low Voltage Startup and Reliability Testing
- HDB3 Codec Design Based on FPGA.pdf
- Data sharing on the transmission power of 2.4G wireless RF chip CC2530
- A talented person actually analyzed power MOS like this, it is very rare information!
- MicroPython has made several adjustments to USB functions
- Commonly used algorithms for drones - Kalman filter (IV)
- Why does Apple use UWB technology? Learn more about UWB here
- About the use of memory AT45DB041
- Be the first to experience the Mir MYS-8MMX embedded single board computer for free!
- The waveform of the zero line at the input end of the three-phase uncontrolled rectifier to the negative pole of the output voltage