Common anode and common cathode LED driving method

  

Now let us use the two digital tubes on the experiment board to do a cycle to display the 00~99 number experiment, first to complete the necessary hardware parts,

Digital The tube has the distinction between common yin and common yang. The single-chip microcomputer can be driven, but the driving method is different, and the corresponding 0~9 display codes are just the opposite.

First of all, we will introduce the two-chip driving method of the common digital tube, the circuit is as follows:



Users can see: P2. 6 and P2.7 ports respectively control the power supply of the tens and single digits of the digital tube. When the corresponding port becomes low level, the corresponding triode will be turned on, and +5V will pass the IN4148 diode and drive the triode to the corresponding digital tube. Bit power supply, then as long as the P0 port sends out the digital display code, the digital tube can display the number normally.

Because you want to display two different numbers, you must use the dynamic scanning method to display, that is, the first bit displays 1 millisecond, then the ten digits display 1 millisecond, and the loop continues, so that the scan time is less than 1/50 seconds, because of the visual residual effect of the human eye, see two different numbers stable display.

The following we introduce a single-chip drive method for the common digital tube, the circuit is as follows:




It can be seen that +5V directly supplies power to the 8 segments of the digital tube through the 1K exclusion, and the P2.6 and P2.7 ports respectively control the power supply of the ten and one digits of the digital tube, when the corresponding port becomes low. Normally, the corresponding bit can sink current. The data output from the P0 port of the MCU is equivalent to shorting the number field that the digital tube does not display to the ground, so that the digital tube will display the required number.

Users can see that the hardware of the common Yin digital tube is simpler, so in the mass production, the hardware overhead is small, the PCB area is saved, the welding workload is reduced, and the comprehensive cost is reduced, so the common digital tube is used. Conducive to mass production, the test panels that are now sold are all using the digital cathode tube

Copyright © Windows knowledge All Rights Reserved