Created
July 28, 2012 04:54
-
-
Save sbehrens/3191851 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CON | |
_clkmode = xtal1 + pll16x | |
_xinfreq = 5_000_000 | |
VAR | |
long foodude | |
long datatown | |
byte hello | |
long i | |
OBJ | |
pst : "Parallax Serial Terminal" | |
sircs_rx : "sircs_rx" | |
sircs_tx : "sircs_tx" | |
PUB main | |
'initalize_reader | |
'reader | |
initalize_writer | |
writer | |
PUB initalize_reader | |
pst.Start(115_200) | |
pst.Str(String("Starting...")) | |
pst.NewLine | |
foodude := sircs_rx.start(12) | |
sircs_rx.enable | |
PUB reader | |
repeat | |
pst.NewLine | |
if sircs_rx.bit_count <> 0 | |
datatown := sircs_rx.rx | |
writeserial(datatown) | |
PUB initalize_writer | |
sircs_tx.start(13,40_000) | |
PUB writer | |
repeat | |
i := 0 | |
if sircs_tx.busy == 0 | |
repeat while i < 3000 | |
sircs_tx.tx(i,12,3) | |
repeat until sircs_tx.busy == 0 | |
i++ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment