MICROCONTROLLER Software

    The microcontroller is a printed circuit mother board comprising a Motorola HC9S12DP256 processor board procured as an Adapt9S12 card from Technological Arts in Canada,  various I/O connectors,  built-in sensors and a USB interface.

    The compiler/IDE used for the microprocessor is the Imagecraft ICC12  version 6.14.

    The software is derived from code I had recently used on my firefighting robot for the Trinity competition.  This code provides PID control laws for differential steering motors and data acquisition software for all the basic sensors.  The code for communicating with the laptop computer via USB was taken from some past experiments.

    The code is driven by a real time clock interrupt which executes the periodic software every 16.384 milliseconds.  The basic executive is a simple state machine which acquires data continuously while providing motor control based on commands from the laptop machine.

    A description of the software and the programming environment can be found in the Microcontroller Software User's manual below along with a copy of the source code and a downloadable image file (out.s19) in the form of a copy of the ICC12 project folder

    The microcontroller code is highly integrated with the Nav and Control software in the laptop computer.  It is important that compatible versions of each be used.  

Functional changes in12-31-05 revision:

   Modified John Edwards PWM test (#8) so that it should run even if the microcontroller board has not been initialized by the laptop.

   Modified accelerometer test so that it can also run if microcontroller not initialized.  Also change to printout raw accel values rather than tilt angle.

   Revised to setup to provide either H-bridge motor outputs or RC command outputs for an RC motor controller as a function of selection in a laptop .ini file.

   
NOTE: major changes have been made in this revision. It is only
compatible with the 4-24-06 revision of NavAndControl laptop code and
subsequent updates until further notice.

MicroController Software User's Manual  pdf file

Download current code here in a zip file.  The source files are included as well as the out.s19 file which is the file to be loaded onto the microcontroller board.

Older versions of the microcontroller code.