Hila Research Centre

Computer Engineering

The Joystick Port as an Experimental Input

This is the first in a series of pages supporting Hila's Computer Engineering program. We define computer engineering as a technology combining electronics with computers and programming. To attempt these activities on your own you will need some knowledge of electronics and an older computer. We recommend that you do not attempt these activities on your brand new multi-media, 200 Mhz, do everything machine - because it is possible to damage your computer! If you have a 286 or 386 sitting around, use it. These computers are very capable of doing everything in this program. Read waiver at bottom.

        Most "IBM-compatible" computers come equipped with a joystick port. Sound cards that are installed on many new computers have a joystick port. With a basic understanding of electronics and computer programming it is possible to use this port to time races, measure temperature, detect burglars or monitor anything that can be detected electronically.

       If your computer does not have a joystick port, inexpensive plug in cards are available at computer stores. You do not need a new, powerful computer to create the projects in this program. A 286 type computer is quite adequate. All the computer programs are created with MS QBASIC, a programming language that comes with most versions of DOS. If you are using WINDOWS 95, look under /Other/Oldmsdos on the Windows 95 CD, you will find Qbasic there.

There are 15 connection points on a PC joystick port. They are numbered 1 to 15 as shown above.

To test the fire buttons, connect a joystick to your computer. Start Qbasic, then enter the following program and run it. Press shift-F5 to start a Qbasic program.

Click your joystick buttons and notice which numbers change. To stop the program press the CTRL and PAUSE keys together.

To test these connections type in the following Qbasic program, run it, then move the stick on your joystick. Notice the numbers change as you shift the sticks position.

Download a Qbasic program to test your joystick with - Download portest.bas

After you have downloaded and saved the program (portest.bas) you must start Qbasic then open portest.bas. The code in the program has some useful information, read it before you run the program.

Important, read this:

This information is designed to support science and technology workshops given by the Hila Research Centre at Hila Science Camp, Turnbull School and schools of the Renfrew County RCSSB. While reasonable care has been taken with respect to the accuracy of the information contained here, we assume no responsibility for errors, omissions or liability for any damage resulting from use of this information.

Back to Projects Menu