Step-By-Step

Building the
Programming Trainer



The trainer is a tool that is handy to use while you test out your programming on these parallel port projects. It features 8 light emitting diodes (LEDs) and 5 push-button switches that can interact with your programs. It can be built for under $15.00. It plugs into the parallel port and the LEDs can be powered directly off that connection without an external power source.

To see a close up photo of the trainer, click on the image in the title at the top of this page.

To view a schematic of the the trainer, click here.

The trainer pictured is housed in a plastic box that used to contain drafting instruments.

For information about the parallel port, how it works, and how to address it with a QBasic program, click here.

Once you get the trainer built, you can try it out with the programs shown below.



Testing the LEDs

Run the following program in QBasic to try out the LEDs. The LEDs should light in sequence as they count (in binary) from 1 to 255.

You can download the program in three formats:

Executable (QBasic not required)

QBasic Source Code (QBasic required)

Text File



' Trainer Demo Program

FOR I = 1 TO 255

     OUT 888, I

     t = TIMER
     DO
     LOOP WHILE TIMER < t + .2

NEXT I




Testing the LEDs

Run the following program in QBasic to try out the switches. When the program runs you should see a number scrolling on the screen. That number should change when you press one or more of the buttons.

You can download the program in three formats:

Executable (QBasic not required)

QBasic Source Code (QBasic required)

Text File


' Trainer Demo Program

DO
     I = INP(889)
     PRINT I

LOOP




Go Back to the Main Robotics Page