Deving The XGameStation/Your First Program

Welcome to the first software development chapter of the book! To start this exercise you must have at least the following equipment:


 * An XGameStation
 * A Home PC
 * The XGameStation Development Toolchain

The Development Toolchain can be found at http://www.xgamestation.com/ under the downloads section. The XGameStation itself costs $199, and you're on your own as to a Home PC. I myself have no experience with the Linux version created by a user - (Someone enter information on it here).

First of all, plug your XGS unit up to the power adaptor and into the wall. Then use the parallel cable provided with it and connect it to LPT1 of your computer. Finally, start the XGS IDE.

In this exercise we will create the most simple program possible that will give immediate feedback. First, Wire an LED up. It should be connected between rb.0 and ground. Be sure to check the datasheet for your LED so that you have it properly biased, as putting it in backwards won't work! Also, make sure to put a 330ohm resistor in series with it to limit current. Not doing that will result in a burned out LED or even damaging a battery in some cases! Let's start by entering this simple program into the IDE:

Now, hit the 'Assemble and Run' button on the Toolbar. If everything is connected correctly and you typed the program in correctly, it should say 'Programming Successful'. Now turn on your XGS and switch the SYSMODE switch to 'RUN'. Hit the Reset button. You LED should light up!