Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Con
- _clkmode = xtal1 + pll16x
- _xinfreq = 5_000_000
- Obj
- pst : "Parallax Serial Terminal"
- Var
- long State[5]
- Pub Main | Index, Changed
- Init
- repeat
- Changed := 0
- repeat Index from 0 to 4
- if ina[Index] <> State[Index]
- Changed := 1
- State[Index] := ina[Index]
- if Changed == 1
- pst.Str(String("States: "))
- repeat Index from 0 to 4
- pst.Dec(State[Index])
- pst.Str(String(", "))
- pst.Char(13)
- Pub Init
- dira[0..4] := %00000
- pst.Start(115_200)
- waitcnt((clkfreq / 1000) + cnt)
Advertisement
Add Comment
Please, Sign In to add comment