Parallax Stingray Manual page 23

Table of Contents

Advertisement

Conserve energy! Be sure to turn off the power when not downloading or running a program on the control
board. This will help conserve batteries and prevent accidents when wiring new circuits or connecting
accessories to the control board.
Protect your hardware! You should also turn off power to the board when building a new circuit to prevent
damaging any components.
Use the LEDS, resistors and pluggable wires to create the circuit shown in schematic below on the
breadboard.
The pluggable wires will jumper to the breadboard to make the I/O and ground
connections from the control board locations shown below.
bottom row of pins (marked B) on the I/O headers. P0 and P1 are picked up from the top row
(marked W) and are indicated on the silkscreen on the control board. Power is obtained from the
center row (marked R) and its voltage is set by the jumper immediately to the right of that group of
headers.
Download the example code from the Stingray product page at www.parallax.com.
Load the program LED Test.spin into the Propeller Tool.
Slide the power switch on the control board to the middle position. The Green power LED should
light up. In the Propeller Tool software press the F10 key to download the LED Test.spin code to
the control board. If your circuit was wired correctly the two LEDs should start flashing back and
forth every second.
'' File: LED Test.spin
CON
_xinfreq = 5_000_000
_clkmode = xtal1 + pll16x
PUB Main
dira[1..0] := %11
repeat
outa[0] := 1
outa[1] := 0
waitcnt(clkfreq / 2 + cnt)
outa[0] := 0
outa[1] := 1
waitcnt(clkfreq / 2 + cnt)
Once the test has completed, turn the power off and remove the components from the breadboard
and disconnect the pluggable wires from the control board.
Leave the USB cable and power supply connected as you will need them for the motor test coming
up.
Copyright © Parallax Inc.
' External Crystal Frequency
' Enabled External Crystal and PLL X16
' Set P0 And P1 To Output
' P0 HIGH
' P1 LOW
' Delay 1/2 Clock Frequency (1/2 Second)
' P0 LOW
' P1 HIGH
' Delay 1/2 Clock Frequency (1/2 Second)
Stingray Robot (#28980)
Ground can be obtained from the
v1.1 10/6/2009 Page 23 of 26

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the Stingray and is the answer not in the manual?

This manual is also suitable for:

28980

Table of Contents