Physical picture of digital tube:
No matter how many digital tubes are connected together, the display principle of the digital tube is the same, which is to light up the internal light-emitting diodes. Let's explain how a digital tube lights up. The internal circuit of the digital tube is shown in the figure below. As can be seen from the right figure, a digital tube has 10 pins. It takes 7 small segments to display an 8, and there is also a decimal point, so there are a total of 8 small light-emitting diodes inside, and finally there is a common terminal. In order to unify the packaging, manufacturers package 10 pins for single-digit digital tubes, of which the 3rd and 8th pins are connected together. Their common terminals can be divided into common anode and common cathode. The middle figure is the internal schematic diagram of the common anode, and the right figure is the internal schematic diagram of the common cathode.
The figure above shows the pin arrangement and internal structure of two commonly used digital tubes. As we all know, lighting up a light-emitting diode means giving it a sufficiently large forward voltage drop. So lighting up a digital tube is actually giving it a forward voltage drop for the corresponding light-emitting diode inside it. As shown in the left figure above (a, b, c, d, e, f, g, DP eight segments in total), if you want to display "1", you need to light up the two segments of LED b and c; if you want to display "A", you need to light up the six segments of LED a, b, c, e, f, g; we also know that since the LED is loaded with a forward voltage drop, the voltage at both ends of it must be high or low: if the end with a high voltage of the eight-segment LED is the common end, we call it a common anode digital tube (as shown in the figure above); if the end with a low voltage of the eight-segment LED is the common end, it is called a common cathode digital tube (the right figure above). Therefore, to light up a common anode digital tube, you need to give a higher level at the common end than at the non-common end; conversely, to light up a common cathode digital tube, you need to give a higher level at the non-common end.
For common cathode digital, the cathodes of the 8 LEDs are all connected together inside the digital tube, so it is called "common cathode", and their anodes are independent. Usually, the cathodes are grounded when designing the circuit. When we add a high level to any anode of the digital tube, the corresponding LED lights up. If you want to display an 8 and light up the decimal point in the lower right corner, you can send a high level to all 8 anodes. If you want it to display a 0, then we can send a high level to all the pins except the two "g, dp" with a low level, so that it will display the word 0. If you want it to display a number, send a high level to the corresponding LED. Therefore, when displaying numbers, the first thing we do is to encode the ten numbers from 0 to 9, and when you want it to light up a certain number, just send this code to its anode.
All anodes of the 8 LEDs inside the common anode digital tube are connected together. When the circuit is connected, the common terminal is connected to a high level, so the LED diode we want to light up needs to send a low level to the cathode. At this time, the code of the displayed number is opposite to the common anode code. When the LED inside the digital tube is lit, it also requires a current of more than 5mA, and the current should not be too large, otherwise the LED will burn out. Since the I/O port of the microcontroller cannot send such a large current, a driving circuit needs to be added when the digital tube is connected to the microcontroller. The pull-up resistor method or a special digital tube driver chip can be used. The 74HC573 latch is used on this experimental board. It has a large output current and a simple circuit interface, which can be used for reference.
Common anode digital tubes are more commonly used. Why? This is because the non-common end of the digital tube is often connected to the IO of the IC chip, and the driving ability of the IC chip is often relatively small. If a common cathode digital tube is used, its driving end is at the non-common end, and it may be limited by the insufficient output current of the IC chip and display dim (such as 51 single-chip microcomputer), and an external pull-up resistor or triode is required to increase the driving ability. Therefore, the advantage of using a common anode digital tube is that the work of driving the digital tube is handed over to the common end (usually connected to the driving power supply), and increasing the power of the driving power supply is naturally much simpler than increasing the driving current of the IC chip IO port. On the other hand, this can also reduce the burden on the MCU.
When multiple digits are in one, their internal common ends are independent, while the segment lines responsible for displaying certain numbers are all connected together. The independent common end can control which digital tube in the multi-digit device lights up, while the segment lines connected together can control what number the digital tube lights up. Usually we call the common end a "bit select line" and the segment lines connected together a "segment select line". With these two lines, any digital tube can be controlled to display any number through a single-chip microcomputer and an external drive circuit.
Generally, a single-digit digital tube has 10 pins, a two-digit digital tube also has 10 pins, and a four-digit digital tube has 12 pins. You can look up relevant information about the specific pins and segment and bit numbers. The easiest way is to measure with a digital multimeter. If you don’t have a digital multimeter, you can also use a 5V DC power supply connected in series with a 1k resistor and then measure. Record the measurement results and draw the pin numbers through statistics.
Digital tube static display
When multiple digital tubes are applied to a system, their "bit select" can be controlled independently, while the "segment select" is connected together. We can control which digital tubes light up through the bit select signal. At the same time, the numbers displayed on all the digital tubes selected by the bit select are always the same. Because their segment select is connected together, the segment select signals sent to all digital tubes are the same, so the numbers they display must be the same. This display method of digital tubes is called static display.
As can be seen from the circuit diagram, this development board uses a common anode digital tube, and a 470R current-limiting resistor is added to each digital tube end.
The connection diagram of the single-chip static digital tube display experiment is as follows:
The sample program is as follows:
#include "reg52.h"
typedef unsigned char u8;
typedef unsigned int u16;
u8 code smgduan[16]= {0x3f, 0x06, 0x5b, 0x4f,
0x66, 0x6d, 0x7d, 0x07,
0x7f, 0x6f, 0x77, 0x7c,
0x39, 0x5e, 0x79, 0x71}; // 0~f 16 numbers
u8 k = 0;
void delay1s(u8 x) //delay function
{
u16 i=0;
u16 j=0;
for(;i < x*14665; i++)
for(;j < 10000; j++)
;
}
void main()
{
P0 = ~smgduan[0]; //display 0
while(1)
{
for(;k < 16; k++)
{
P0 = ~smgduan[k]; //Display 16 numbers from 0 to f
delay1s(1); //delay
}
k = 0;
}
}
Previous article:51 single chip microcomputer - digital tube driver
Next article:51 single chip microcomputer dynamic digital tube display
- Popular Resources
- Popular amplifiers
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- LED chemical incompatibility test to see which chemicals LEDs can be used with
- Application of ARM9 hardware coprocessor on WinCE embedded motherboard
- What are the key points for selecting rotor flowmeter?
- LM317 high power charger circuit
- A brief analysis of Embest's application and development of embedded medical devices
- Single-phase RC protection circuit
- stm32 PVD programmable voltage monitor
- Introduction and measurement of edge trigger and level trigger of 51 single chip microcomputer
- Improved design of Linux system software shell protection technology
- What to do if the ABB robot protection device stops
- 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
- XL6019 output is not normal, please have a look
- Baidu really only cares about money but not shame
- 51 series connected to sht 30, can't read data just after power on
- x-nucleo-iks01a3 related information
- 【Home Electronic Guard】Work Submission
- Machine Vision Inspection
- Research on JPEG2000 Core Algorithm and Its DSP Implementation
- Why are relays still used to drive automotive motors?
- [AIoT Smart Smoke Detection System] Product Design Background
- Simulation research on high frequency antenna protection design