6) Solución:
CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll2x
7) Solución:
waitcnt(clkfreq*5 + cnt)
8) Solución:
outa[5..11]~~
waitcnt(clkfreq*3 + cnt)
outa[5..11] := %1010101
9) Solución:
PUB LightsOn | counter
dira[4..9] := %111111
repeat counter from 4 to 9
outa[counter] := 1
waitcnt(clkfreq + cnt)
repeat
10) Solución:
PUB method
dira[27] := 1
repeat
if ina[0]
outa[27]~~
waitcnt(clkfreq*5 + cnt)
outa[27] ~
11) Solución:
PUB SecondCountdown
dira[9..4]~~
repeat outa[9..4] from 59 to 0
waitcnt(clkfreq + cnt)
12) Solución:
PUB SecondCountdown
dira[9..4]~~
repeat
repeat outa[9..4] from 59 to 0
waitcnt(clkfreq + cnt)
13) Solución:
PUB PushTwoStart
dira[4]~~
repeat until ina[23..21] == %101
outa[4]~~
14) Solución:
PUB PushTwoCountdown
dira[9..4]~~
repeat until ina[23..21] == %101
outa[4]~~
repeat outa[9..4] from 59 to 0
waitcnt(clkfreq + cnt)
Apéndice B: Estudio de Soluciones
Kit Educativo de Practicas Propeller: Fundamentos · Página 201