The microcontroller is a printed circuit mother board comprising a Motorola HC9S12DP256 (or DP512) 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 in 4/17/09 revision:
The motor control code has been revised extensively to reduce jerks at the beginning and end of accelerations.
The Speed variable computation has been revised to smooth the signal and to make it work with lower resolution encoders (down to 1 click/mm.)
Now calculates an inertial heading signal from the rate gyro. This signal is supplied as "hdgdeg". Using this signal effectively will require changes to the Nav & Control (or Lisp) software. It also computes X and Y coordinates based on the robot's encoders and inertial heading. This will also require Nav & Control code to use.
New motor control modes have been added to steer to the inertial heading signal.
Added a calculation of heading based dead reckoning (encoders) called headingDR.
MicroController Software User's Manual pdf file
Download current code here in a zip file. The source files are included as well as the .s19 file which is the file to be loaded onto the microcontroller board. Use out256.s19 for 256K processors and out512.s19 for 512 K processors
Older versions of the microcontroller code.