
Copyright © Parallax Inc.
●
PE Platform Setup v1.0
●
11/2/2006
●
Page 10 of 12
L
You can download
PushbuttonLedTest.spin from the Propeller Education Kit product page at
www.parallax.com
. Then, simply drag and drop it onto the Propeller Tool’s Edit Pane to open it.
3
Open PushbuttonLedTest.spin into the Propeller Tool, or type it in. If you type, be careful to
indent each line exactly as shown.
3
Click the Propeller Tool’s
Run
menu and select
Compile Current
→
Load EEPROM
(F11).
The Propeller Communication window will appear briefly and display the progress. If it closes after
the “Verifying EEPROM” message, then the download was successful. If instead an error window
opens that reads “EEPROM programming error...”, refer to Troubleshooting entry (8) on page 12.
3
Verify that the LED flashes on/off rapidly, at 10 Hz.
3
Press and hold the pushbutton down, and verify that the LED flashes slower, at only 4 Hz.
3
If everything worked as anticipated, go on to I/O Pin Tests below. If it did not work, go to
Troubleshooting entry (9) on page 12.
I/O Pin Tests
If you are inheriting this platform from a student who has already taken the class you are starting, it is
especially important to take some time now to confirm all the I/O pins are functioning correctly, both
as outputs and inputs. We will use the LED circuit to test each of the I/O pins’ output function on the
Propeller’s left side (P0 to P15). Since they all send the same signal as P3, each one should make the
LED circuit blink. After that, the pushbutton can be iteratively rewired to different I/O pins on the
right. PushbuttonLedTest.spin has to be modified and downloaded to the propeller to test each wiring
change. Once the left side has been tested as outputs and the right as inputs, the circuits can be
swapped so that the left side can be tested as inputs and the right side as outputs. If any of these tests
indicate that an I/O pin is faulty, refer to Troubleshooting entry (10) on page 12.
3
Use the wire connecting P3 to probe P0 through P15. Each I/O pin should cause the LED
circuit to blink the same way it does when it’s connected to P3.
3
Unplug the pushbutton wire at P18, and plug it into P16.
3
Change the
CON
directive
PUSHBUTTON
from 18 to 16.
3
Run the modified program and verify that a pushbutton connected to P16 still controls the
LED frequency.
3
Repeat this procedure for P17, P19, P20, and so on, up through P27. Using F10 to download
to RAM instead of EEPROM will make this go faster.
3
Disconnect the battery, and remove the pushbutton and LED test circuits from the board.
3
Reconnect the battery and Propeller plug.
3
Change the
CON
directives
LEDs_START
and
LEDs_END
from 0 and 15 to 16 and 27.
3
Change the
PUSHBUTTON
directive from 18 to 13.
3
Download the modified program.
3
Disconnect the battery, then rebuild the test circuits on opposite sides of the board from
what’s shown in Figure 5. The pushbutton should be connected to P13, and the LED should
be used to probe I/O pins from P16 to P27.
3
Reconnect the battery. The LED frequency should again be controlled by the pushbutton.
3
Repeat the output tests for P16 to P27 and the input tests for P0 to P15.
3
Also use the LED to probe the positive supply rails on the right side of the board.