Guest User

Untitled

a guest
Jul 20th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. Con
  2.  
  3. _clkmode = xtal1 + pll16x
  4. _xinfreq = 5_000_000
  5.  
  6. Obj
  7.  
  8. pst : "Parallax Serial Terminal"
  9.  
  10. Var
  11.  
  12. long State[5]
  13.  
  14. Pub Main | Index, Changed
  15.  
  16. Init
  17. repeat
  18. Changed := 0
  19. repeat Index from 0 to 4
  20. if ina[Index] <> State[Index]
  21. Changed := 1
  22. State[Index] := ina[Index]
  23. if Changed == 1
  24. pst.Str(String("States: "))
  25. repeat Index from 0 to 4
  26. pst.Dec(State[Index])
  27. pst.Str(String(", "))
  28. pst.Char(13)
  29.  
  30. Pub Init
  31.  
  32. dira[0..4] := %00000
  33. pst.Start(115_200)
  34. waitcnt((clkfreq / 1000) + cnt)
Advertisement
Add Comment
Please, Sign In to add comment