Traditional Culture Encyclopedia - Photography major - Visual photographic lamp

Visual photographic lamp

Idea: Control an LED light, with pull-up mode, pin high light off and pin low light on. This LED uses all the pins of the same P-port, assuming that it is P- 1.0-P- 1.0 of the P-port, with a total of pins. In the software, you only need to use the for loop for these lights. Code # contains? Not signed? Charles? PData? //Record the current status, with the value of 1 indicator light, and take 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){? Not signed? Charles? Me; while(ms-){ for(I = 0; I'm < 120; t++){; }}} void? main(){ unsigned? Charles? I = 0; PData = 0x00//All-out state while( 1){// infinite loop on-off state for? (I = 0; I & ltok;; I++){// Cycle from the lowest bit to the highest bit, not always on. P =~(PData+ (a