HC9S12

The following pages are code examples for the Freescale 9S12 microcontroller. The C compiler I use is ICC12. These pages are without copyright or guarantee

32x32 bit multiply

The ICC12 library doesn't supply a 64 bit result for it's long multiply.   This routine is an extension of the existing 32x32 library function and requires the user to define a uint64 type.  For a 9S12 running at 24MHz the function executes in 5.5usec.

ATD Example

This implementation of the S12ATD10B8C module is suitable for a system requiring a single ATD channel only. Reads automatically kick off a new sequence of eight conversions of the defined channel with the result being the average of those eight conversions. The maximum rate for updated data is approximately 20KHz.

Syndicate content