A digital display 051 of the digital microcontroller study notes and buzzer

First, we define digital control pin, open schematics, pin initialization bit option we will look at digital tube. Here Insert Picture Description
Then we turn on the main switch LED 1, turn off the rest of the three digital control, I do not know what it means to see on a blog, here is the link: https: //blog.csdn.net/qq_40831778/article/details/ 102 642 153

Then we let the digital display 0.
Here Insert Picture Description
Now we specifically look at, 0x3f how it was.
Here Insert Picture Description
We see, if you want the digital display numbers 0, lighting must be a, b, c, d, e, f,; g dp, and not on, then we do not represent 0 point, denoted by 1 is lit, it is it's easy to 00,111,111 and lights linked to eight digits, that is, from the right numbers first representative of a small lamp a, in this order and so on, and we use binary representation is not enough, we need to convert binary to hexadecimal , then we open the calculator, the calculator will be transferred to the programmer mode conversion click.
Here Insert Picture Description
According to the search than online, or routine code, my code is simple and practical, so that must be the principle! ! ! !

The way we talk about the buzzer, in fact, its code with small flashing lights almost by the sound of shock audible, giving it a high level for a delay to give a low latency will be placed while (1 ) circulating like.
Here Insert Picture Description
Finally, if I wrote the article really helped us a little favor, please do not hesitate to point a praise, if you want to learn together with my progress, you can focus on me, I QQ: 2992789432.Here Insert Picture Description

Published 45 original articles · won praise 96 · views 10000 +

Guess you like

Origin blog.csdn.net/qq_40831778/article/details/102642655