clock-flowchart.doc

(24 KB) Pobierz



































Port0=7-seg of minutes tens/units













return

If h>23 then h=0 

If m>59 then m=0: h=h+1

If s>59 then s=0: m=m+1

S=s+1

I second interrupt

M=m-1 : if m<0 then m=59

M=m+1: if  m>59 then m=0 

H=h-1: if h<0 then h=0

M + pressed ?

M + pressed ?

H- pressed ?

H=h+1 : if h>23 then h=0

H+ pressed ?

Port2=16/32 (digit s1s2 shown)

Port2=4/8 (digit m1m2 shown)

Port2=1 (digit h1 shown)

Port2=2 (digit h2 shown)

Port0=7-seg of seconds tens/units

Port0=7-seg of hours(units)

Port0=7-seg of hours(tens)

Start 1 sec timer

H=0:m=0:s=0

start

Zgłoś jeśli naruszono regulamin