Advertisement
Guest User

Untitled

a guest
Aug 19th, 2015
60
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 : "FullDuplexSerial"
  9. modem : "FullDuplexSerial"
  10.  
  11. Pub Main | rxByte, txByte
  12.  
  13. Init
  14.  
  15. repeat
  16. rxByte := modem.RxCheck
  17. case rxByte
  18. -1:
  19. other:
  20. pst.Tx(rxByte)
  21.  
  22. txByte := pst.RxCheck
  23. case txByte
  24. -1:
  25. other:
  26. modem.Tx(txByte)
  27.  
  28.  
  29.  
  30. Pub Init
  31.  
  32. pst.Start(31, 30, 0, 115_200)
  33. modem.Start(2, 3, %0000, 300)
  34.  
  35. waitcnt((clkfreq / 100) + cnt) 'wait 10ms
  36.  
  37. pst.Str(String("Propeller Modem Check Running!"))
  38. pst.Tx(13)
  39. pst.Tx(13)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement