A laboratory experience is vital for us to be able to start programming the microcontroller and to be
able to really understand how it works and to apply it in embedded system designs. This module is a
continuation of the
Introduction to CodeWarrior® – Simulating the Microcontroller in Assembly
module where you learned how to enter an assembly language program and to simulate it
using the CodeWarrior True-Time Simulator. Now we will ask you to enter a program that exercises
the hardware on a laboratory student learning kit.
In this module we will give you a program and you will start to learn to use the HCS12 instruction set
by modifying it to change how it operates. You will learn how to program the HCS12 Flash memory
and to use the background debugger.
At the end of this module you will be able to assemble a program, download it to the microcontroller,
and run and debug it with the CodeWarrior hardware debugger.
You must know about the HCS12 instruction set and the memory addressing modes available. You
do not have to know the instruction set in detail. The following lab modules will help you learn that.
You should have completed the
Introduction to CodeWarrior® – Simulating the Microcontroller in
mode or be able to enter and simulate assembly language programs.
More Resources and Further Information
Cady, Fredrick M.,
Software and Hardware Engineering: Assembly and C Programming for the
Freescale HCS12 Microcontroller
edition. (New York: Oxford University Press, Inc., 2008).
Chapter 20 Debugging Systems
Debug (DBG) Module V1 Block User
Guide, S12DBGV1/D, Freescale Semiconductor, 2003.
MC9S12C128 Data Sheet: Covers MC9S12C Family and MC9S12GC Family
Semiconductor, Austin, Texas, 2005.
Montañez, E. and Ruggles, S., MCUSLK_CSM12C32 -
Getting Started with the Microcontroller
Student Learning Kit (MCUSLK)
, Freescale Semiconductor, Austin, Texas, 2005.
Montañez, E., AN2596/D –