0% found this document useful (0 votes)
200 views

Flowchart Running Led (Manual) Start

The document contains flowchart diagrams for running LEDs, a traffic light, and a traffic light with a push button. The running LED flowchart turns on LEDs sequentially with delays. The traffic light flowchart cycles through red, yellow, and green lights with delays. The traffic light with push button flowchart allows overriding the cycle to turn all lights on when a button is pressed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
200 views

Flowchart Running Led (Manual) Start

The document contains flowchart diagrams for running LEDs, a traffic light, and a traffic light with a push button. The running LED flowchart turns on LEDs sequentially with delays. The traffic light flowchart cycles through red, yellow, and green lights with delays. The traffic light with push button flowchart allows overriding the cycle to turn all lights on when a button is pressed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

FLOWCHART RUNNING LED [MANUAL]

START

PORT B = OUTPUT
PORT B = OFF
FINISH
WHILE

PORT B = LED 1

PORT B = LED 8

DELAY

DELAY

PORT B = LED 2

PORT B = LED 7

DELAY

DELAY

PORT B = LED 3

PORT B = LED 6

DELAY

DELAY

PORT B = LED 4

PORT B = LED 5

DELAY

DELAY

FLOWCHART TRAFFIC LIGHT


START

PORT A = OUTPUT
PORT A = OFF
PORT B = OUTPUT
PORT B = OFF
PORT D = OUTPUT
PORT D = OFF

FINISH

WHILE

M1,H2,M3,M4=ON

M1,M2,M3,H4=ON

DELAY

DELAY

K2=ON; DELAY

K4=ON; DELAY

M1,H2,K2=OFF

H4,M2,K4=OFF

H1,M2,M3,M4=ON

M1,M2,H3,M4=ON

DELAY

DELAY

K1=ON; DELAY

K3=ON; DELAY

H1,M3,K1=OFF

H3,M4,K3=OFF

TRAFFIC LIGHT PUSH BUTTON


START

PORT A = INPUT
PORT A = OFF
PORT B = OUTPUT
PORT B = OFF
PORT D = OUTPUT
PORT D = OFF

PIN A.0 = 0

WHILE

PIN A.1 = 0

PIN A.0!=0
|| PINA.1!=0

DO

DO

{K1,K2,K3,K4,H1,H2,H3,H4 = OFF

M1,H2,M3,M4=ON

{M1,M2,M3,M4,H1,H2,H3,H4 = OFF

M1,M2,M3,M4 = ON}

DELAY

K1,K2,K3,K4 = ON}

WHILE (PIN A.0 = 0)

K2=ON; DELAY

WHILE (PIN A.0 = 0)

M1,H2,K2=OFF
1

1
H1,M2,M3,M4=ON
DELAY
K1=ON; DELAY
H1,M3,K1=OFF

M1,M2,H3,M4=ON

M1,M2,M3,H4=ON

DELAY

DELAY

K3=ON; DELAY

K4=ON; DELAY

H3,M4,K3=OFF

H4,M2,K4=OFF

FLOWCHART RUNNING LED


START

DATA = 0x01

PORT B = OUTPUT
PORT B = OFF

WHILE

PORT B = ~ DATA
DELAY
DATA=DATA<<1

DATA = 0x00

DATA = 0x01

FINISH

FLOWCHART LED VOLUME


START

DATA = 0x01

PORT A = INPUT
PORT A = OFF
PORT B = OUTPUT
PORT B = OFF

WHILE
1

PIN A.0 = 0
&&
DATA!=0x00

DATA=0x01
DELAY
PORT B = ~ DATA

PIN A.0 = 0 &&


DATA!=0x00 &&
DATA!=0xFF

DATA=DATA<<1
DATA=DATA|0x01
DELAY

PIN A.1 = 0
&&
DATA!=0x00

DATA=DATA>>1
DELAY
PORT B = ~ DATA

PORT B = ~ DATA

1
1

You might also like