beautypg.com

Project b27 test the microcontroller – Elenco XP&trade User Manual

Page 59

background image

Project B27

Test the Microcontroller

This project was created to test the microcontroller (U21) and
all its connections, but is interesting and fun as well. It is
referenced by point 11 of the Advanced Troubleshooting section
on page 8. The programming cable and other Snap Circuits

®

parts can be tested independently by points 1-10 in the
Advanced Troubleshooting section.

Build the circuit as shown. Turn on the slide switch (S1). Load
the program Test the Microcontroller into the microcontroller
using the programming instructions in project B1. Both LEDs
(D1 & D2) should be on. Push the press switch (S2) to turn off
the red LED. This confirms the microcontroller is working
properly.

Note: If you get a “hardware not found” error while trying to
download a program to the microcontroller: Start the download
and then reset the circuit (switch the circuit off and on). A
running program will be interrupted by a new download when
it executes a command, but some commands (such as long
pause or wait commands) can take too long to complete, so
the download could be ignored. Reseting the microcontroller
just after initiating a download ensures that the microcontroller
will recognize the new download. If you still get an error then
test your programming cable using point 10 of the Advanced
Troubleshooting. If it still doesn’t work then your microcontroller
is damaged.

Optional:

-58-