The Freescale HCS12 (also known as 9S12) microcontroller family was initially designed for
automotive applications. The design of the HCS12 combines most features common in major
8-bit and 16-bit microcontrollers.
1. Full-feature timer system. The HCS12 timer system provides input-capture, outputcompare,
pulse-width modulation, pulse accumulator, modulus down counter, realtime
interrupt, and computer-operate-properly systems.
2. Background debug mode (BDM). The BDM circuit provides a single-wire interface
for accessing the internal resources of the HCS12 and hence allows a low-cost debug
adapter to be constructed.
3. Multiple serial interfaces. The HCS12 supports industrial-standard UART, SPI, I2C,
BDLC, and the CAN bus. The UART allows the HCS12 to interface with the PC
using the popular RS232 protocol. The SPI and I2C allow the HCS12 to interface
with numerous peripheral devices (e.g., LED drivers, LCDs, matrix displays, A/D
converters, D/A converters, real-time clocks, EEPROMs, Ethernet controllers, phaselocked-
loops, and so on).
4. In-system programming (ISP) capability. Most HCS12 members provide on-chip flash
memory and allow the software to be upgraded in the system.
5. Fuzzy-logic support. The HCS12 provides a group of instructions to support fuzzylogic
operations. These instructions should facilitate the programming of fuzzy-logic
applications in assembly language.
With these features, the HCS12 is very suitable for those who want to learn modern microcontroller
interfacing and applications.
This new book provides a total solution for learning and teaching embedded system design based on the Freescale HCS12/9S12 microcontroller. Readers will learn step-by-step how to program the HCS12 using both assembly and C languages, as well as how to use such development tools as CodeWarrior, ImageCraft ICC12, MiniIDE, GNU C, and EGNU IDE. Supportive examples clearly illustrate all applications of the HCS12 peripheral functions, including parallel port, timer functions, PWM, UART port, SPI, I2C, CAN, on-chip flash and EEPROM programming, external memory expansion, and more. New sections on C programming style, software development methodology, and software reuse have been added in theis revision. A back-of-book CD contains the source code for all examples in the book, several groups of reusable utility functions, and complimentary freeware development tools for improved learning.