EECS 373 Final Project Winter 06 - Software Design
 
 
 
         
Navigation

Our software uses a combination of C and assembly. A majority of the assembly is focused on the interrupt routine and device initializations. The C code is focused solely control logic.

The interrupt routine handles two different interrupts, one for the hardware timer and one for the software timer. The hardware timer operates at 7.68 kHz and is in control of the pulse width modulation for all of the motors. It uses an edge-triggered interrupt on IRQ7. The pulse widths are specified by sequential memory locations so they may be easily be changed within the C code.

The software timer operates at 60 Hz and controls the sampling of the N64 controller, ADC, and the sonic range sensor. Both the N64 controller and the ADC are sampled once every interrupt so that they operate at 60 Hz. The sonic range sensor requires longer time to process the distance therefore it is only sampled once every six times, resulting in it operating at 10 Hz. To avoid sampling invalid values within the C code, we assigned a separate memory location which is written to every time a sample is made. This allows for the C code to always read a valid value.

The C code is used to process the data from the N64 controller and assigning pulse widths as well as other signals. It also performs basic error correction for N64 controller to eliminate the cases where the controller has failed to respond properly. A number of different control modes are available, many of which use the value from the analog stick which needs to be converted from a signed one bit value on each axis (X and Y). The analog stick allows for variable speed by assigned different pulse widths to different motors.

Although we were unable to integrate the LCD with the rest of our project, we did manage to write software to display a static image on the LCD. The software takes 2,560 bytes starting at a specific memory location and writes it to the LCD graphic memory sequentially resulting in an image of a tank on the screen. The image was converted from a bit map into the proper format using an external program.

Introduction
High Level Design
Member Tasks
Hardware Design
Software Design
Results
Conclusions
Media