Analysis of the effect of 8 segments of single-chip digital tube

The 8 segments of the digital tube, we directly control it as 8 LED small lights, that is a total of 8 LED small lights a, b, c, d, e, f, g, dp. We can see from Figure 5-3 that if the two LED small lights b and c, that is, the b and c segments of the digital tube, and all the other segments are off, the digital tube can be displayed. A number of 1, then this time the value of P0 is actually 0b11111001, hexadecimal is 0xF9. Then we write a program to go in and see the effect of the digital tube display.

#include

Sbit ADDR0 = P1^0;

Sbit ADDR1 = P1^1;

Sbit ADDR2 = P1^2;

Sbit ADDR3 = P1^3;

Sbit ENLED = P1^4;

Void main(){

ENLED = 0; //Enable U3, select digital tube DS1

ADDR3 = 1;

ADDR2 = 0;

ADDR1 = 0;

ADDR0 = 0;

P0 = 0xF9; //Light up digital segments b and c

While (1);

}

#include

Sbit ADDR0 = P1^0;

Sbit ADDR1 = P1^1;

Sbit ADDR2 = P1^2;

Sbit ADDR3 = P1^3;

Sbit ENLED = P1^4;

Void main(){

ENLED = 0; //Enable U3, select digital tube DS1

ADDR3 = 1;

ADDR2 = 0;

ADDR1 = 0;

ADDR0 = 0;

P0 = 0xF9; //Light up digital segments b and c

While (1);

} Everyone compiles this program and downloads it to the MCU. You can see that the result of the program running is a number 1 on the rightmost digital tube.

In the same way, we can display other numeric characters on the digital tube, and the numeric characters displayed by the digital tube correspond to the assignment of P0. We call it the truth table of the digital tube. Let's take a look at the digital tube truth table of our circuit diagram. Note that the numbers shown in this truth table do not have a decimal point, as shown in Table 5-7.

Table 5-7 Digital Tube Truth Table

You can change the value of P0 in the above program using the digital tube display number 1 program to the value in Table 5-7 truth table to see the effect of the displayed number.

Breeze Pro Vape 2000Puffs

It all begins with the Breeze Pro's new elegant design. Premium materials encompassed by a beautifully designed shell helps this Disposable Vape really stand out. Inside, you'll find a powerful 1,000mAh battery capable of 2,000 puffs, 6mL of 5% salt nicotine vape juice, and a new and enhanced mesh coil design. It's this detailed engineering which has propelled Breeze Smoke as one of the best disposable vape manufacturers on the market. Once again with the Breeze Pro, they've hit a home run.

Breeze pro vape 2000Puffs.Breeze Pro.Breeze vape,Breeze Pro disposable vape ,Breeze vape pen

Shenzhen Ousida Technology Co., Ltd , https://www.osdvape.com