Professional Documents
Culture Documents
Create and Simulate A Code To Turn On or Off The Six Leds of The Figure 1, One Each Time With The Sequence D1, D2, D3, D4, D5, D6
Create and Simulate A Code To Turn On or Off The Six Leds of The Figure 1, One Each Time With The Sequence D1, D2, D3, D4, D5, D6
Create and simulate a code to turn on or off the six LEDs of the figure 1, one each time with
the sequence D1, D2, D3, D4, D5, D6.
CODE
// Sequence of 5 LEDs turned on or off, one each time. Using pins b0, b1 and b2.
# INCLUDE<18F4550.H> //directives
# FUSES XT, NOWDT, NOPROTECT
# USE DELAY(CLOCK = 4 MHZ)
SIMULATION
In next images, we can see each LED turned on and the others turned off starting from D1 to D6.
The pins used are b0, b1 and b2.