c program for the HMA micro controller