Appendix E - Operating and Testing Instructions
 
 

Setup

Before powering up the Xilinx board for the motor control, there are a number of items that must be done.  First, load touchvga.hex into the microcontroller using the Data I/O machine.  Then, connect the serial line from the touch screen into the maxim chip. Next, connect the Xilinx board to the PC with the parallel port line and an Xbus dongle.  Connect the touch screen ground and power to the breadboard.  All other pins from the touch screen should go to ground on the breadboard.  To power up the touch screen, connect its power cable to the back of the PC to where the keyboard is normally connected.

 Before powering up the breadboard or Xilinx board for the VGA camera interface, there are also some connections that need to be made.  First, connect the VGA monitor to the VGA monitor port that is attached to the outputs of the digital to analog converters.  Second, connect the Xilinx board to a second PC (a PC other than the one the motor control is connected to) with the parallel port line but without the Xbus dongle in place.

Now you are ready to power up the motor control board.   After carefully re-checking your ground and power connections, power up the breadboard and FPGA by plugging in the 5 V power supply to the XS40 board.  Reset the microcontroller by pushing the switch rapidly until the LED turns off.  If the LED refuses to turn off, unplug and re-plug the Xilinx board.   Repeat this process until the LED turns off.  This is only necessary for the motor control Xilinx board since only that board will have the Atmel microcontroller on it.  Power up the board with the camera interface by plugging in a 12 V power supply to the protoboard and the 5 V power supply to the XS40 board.

 Once the two XS40 boards are powered up, a 12 V fan is used to keep the stepper motor control chips cool.  Plug the fan’s power and ground into a separate breadboard that is not used to power anything else.  Be sure to place the fan as close to the two stepper motor control chips as possible without the fan interfering with the wiring.

Use the xsload command to load vgacam.bit onto the Xilinx board with the camera interface on it.  After downloading the vgacam.bit file onto the camera interface board, configure the camera by typing these three separate commands at the command prompt:

config -w 10 08
config -w 11 02
config -w 14 4c

Once the camera is configured, remove the parallel port connection and add an Xbus dongle to it and reconnect it to the camera interface board.  Next, use the xsload command to load xbusvga.bit onto the Xilinx board with the motor control.  The VGA monitor should now be displaying the image from the camera and two pairs of crosshairs.

Now calibration is needed between the display and the actual motor position.  On the computer that is connected to the board with the motor controls do an xsport 1 and an xsport 0 at the command prompt.  This will reset the crosshairs and motor box to the “center” of our display.  Using a laser pointer, or a similar device, manually center the motor using the pointer to point at the center of the display.  The setup is now complete.
 

Operation

 Once calibrated the crosshairs represent the position of where on the touch screen the user has touched.  There are two white boxes that are shown on the display.  The box on the upper right hand corner of the display remains stationary and an “X” appears in the box once the motor points at the target and the system is locked and ready to fire.

 The crosshairs represent the target and it will move to where the user touches on the screen.  Dragging on the screen is also possible and it will allow the crosshairs to move with the finger until the hand is off the touch screen.  Once the “X” appears on the upper right hand corner box the user is ready to fire at the target.  To prepare to fire the user has to “pump” the air bottle to obtain enough pressure so that the projectile (a paper dart) will be able to reach its target.  Once pressure is obtained it is as simple as touching the desired target on the screen and depressing the squeeze trigger to fire away.
 

Testing

  The HyperTerminal application was used to help with our testing of the touch screen.  The HyperTerminal allowed us to see what data was being sent from the touch screen to the microcontroller.  We also used the LED’s to help in the testing of the touch screen.  We first segmented the touch screen into four different segments and touching any area of these four segments would correspond to lighting four different LED segments.

 The logic analyzer was used to help in the debugging of both our Xbus interface and our FPGA to FPGA interface.  Using the logic analyzer to see exactly what was being sent from the microcontroller to the FPGA and from one FGPA to another helped in the debugging of those two components.

 To test some of the individual modules for the stepper control the Xilinx simulator was used.  Descriptive test scripts were created to test if the module worked properly.  The rest of the testing for the VGA camera interface was done by observing the VGA monitor to see if the monitor displayed what was expected of it.
 
 

Back to Report