Traditional Culture Encyclopedia - Photography major - Zero-based popular science STM32L053 single chip microcomputer, and its programming-use uVision5 to make a program to make LED lights on.
Zero-based popular science STM32L053 single chip microcomputer, and its programming-use uVision5 to make a program to make LED lights on.
Idea: Control an LED light, with pull-up mode, pin high light off and pin low light on. This LED uses the same P-port pin, assuming that it is P- 1.0-P- 1 of P-port, and it is painted with * * * pin. In the software, you only need to use the for loop for these lights. Code # contains? Not signed? Charles? PData// records the current status, with the value of 1 indicator light, and takes the inverse//delay when outputting to the P port. This function is imprecise in terms of delay. If accurate delay is needed, the number of invalid cycles after accurate calculation needs to be adjusted according to the assembly statement of this function. Delay (unsigned? int? Ms){ unsigned? Charles? Me; ? while(ms-){ for(I = 0; I'm < 120; t++){? ; } ? }} void? main(){? Not signed? Charles? I = 0; ? PData = 0x00// state of complete extinction? While( 1){// What is the on-off state of the infinite loop? (I = 0; I & ltok;; I++){// The cycle from the lowest bit to the highest bit is not always on? P 1 =~(PData+ ( 1
- Previous article:How to get Easter eggs in Animal Crossing
- Next article:Pigeon photography
- Related articles
- What about Guangzhou 12 ancient ethnic villages?
- What are the powerful media companies?
- Internship report of photography assistant
- What is the difference between stillness and stillness?
- What mountains are there in Nanyang?
- What are the interesting tourist destinations in Anhui?
- What are the specific differences between British style and Italian style men's wear?
- Which handsome man and beautiful woman knows the lyrics of the song "Draw a wedding with white crayons, spend every season, and never be separated"?
- Who is Guo, the jade man in the palace lock?
- How to repair the video of toy camera