Copyright © Parallax Inc.
Page 3 of 4
Propeller QuickStart
OBJ
pst : "Parallax Serial Terminal.spin"
CON
_clkmode = xtal1 + pll16x
_xinfreq = 5_000_000
PUB Main
dira[0..4]~ ' Pins 0-4 to input
pst.Start(115_200) ' Terminal to 115,200 baud
waitcnt(c cnt)
repeat
if ina[0] == 0
pst.Str(String("Down",13))
if ina[1] == 0
pst.Str(String("Left",13))
if ina[2] == 0
pst.Str(String("Center",13))
if ina[3] == 0
pst.Str(String("Right",13))
if ina[4] == 0
pst.Str(String("Up",13))
waitcnt(clkfreq / 3 + cnt)
Note:
This program uses the Parallax Serial Terminal object library, which is included with the
Propeller Tool software download.
Note:
To view the results of the demonstration, after uploading is complete run the Parallax
Serial Terminal from the Run menu, or press F12. Momentarily depress the Reset button on the
Propeller QuickStart board to restart the program. See Using the Parallax Serial Terminal article
(Learn.Parallax.Com > Support > References) for more details.