Freescale Student Project Board Sample Program Using HCS12 MCU Module from Freescale and Axiom

The following Freescale university website http://www.freescale.com/webapp/sps/site/overview.jsp?nodeId=06258A2580257E provides information about the Student Learning Kits. One of the learning kits is Student Project Board. http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=PBMCUSLK&fsrch=1

The Freescale Students Project Board can be used with National Instruments Elvis board or as stand-alone.
The Freescale Student Project Board has the part number PBMCUSLK (Project Board MCU Student Learning Kit) and costs around $175
The Student Project Board can be used with HCS12 MCU Modules such as HCS12DT256SLK and HCS12XD512SLK
The HCS12 MCU Modules of HCS12DT256SLK and HCS12XD512SLK can be purchased from Freescale under the part numbers of APS12DT256SLK and APS12XDT512SLK, respectively. It costs $95.
You can buy The Freescale Student Project Board (PBMCUSLK) and a single HCS12 MCU Module (APS12DT256SLK or APS12DT256SLK) together for $270.
The HCS12 MCU Modules of HCS12DT256SLK and HCS12XD512SLK are made by Axiom and can also be purchased from www.axman.com under the part numbers of CSMB-12DT256 and CSMB-12XDT512, respectively.

Using CodeWarrior With Freescale Student Project Board

Testing And Using Freescale (Axiom) HCS12 MCU Module By Itself (Without Freescale Student Project board) With Codewarrior

HCS12 MCU Modules (from Freescale or Axiom) come with USB-BDM and ready to be used with CodeWarrior. It can be programmed and used by itself without any need for the Student Project Board. This is specially useful in many Senior project (capstone) courses in which we need a small microcontroller board.
The HCS12 MCU Modules can be powered in three ways and only one of them must be selected via PWR_SEL jumpers (three of them) next to the barrel power jack.

1) the USB cable power (VB IS MIDDLE jumper),
2) external Power via barrel power jack (VR1), and
3) powered by the Freescale Student Project Board (VX_EN). MAKE SURE ONLY ONE OF THEM IS SELECTED (ONLY ONE JUMPER IS SET)

The power through the USB cable is limited to 500mA and used only for controlling digital logic devices. When MCU Module is powered via the USB cable it should NEVER be used to power the power-hungry devices such as stepper and DC motor.
The HCS12 MCU Modules has the following on-board features a)4 LEDs (green), b) 4 DIP SW (blue), c) a POT (brown), d) two push-button switches, e)DB-9 connector for serial COM, f) light sensor, and g)60-pin J1 male connector to access the HCS12 CPU signals. To use the on-board features of LEDs, POT, and so on you must set the jumpers. These jumpers release the HCS12 CPU signals so they can be accessed by J1 connector when it is plugged into the J5 of the Student Project Board. The following sample programs can be used to test the on-board features of HCS12 MCU modules:
(Make sure the USB power jumper is set in addition to jumpers for LEDS (LED1-LED4) and POT (RV1))

Sample Test Programs in Assembly Language for HCS12 MCU Modules (APS12DT256SLK or APS12DT256SLK) by itself
Open CodeWarrior and Create a New project in Assembly. Under Sources Click on main.asm and bring up the main.asm. Make sure you are in BDML mode.
Now:

a) Delete everything in main.asm,
b) Copy and paste any of the following programs into main.asm,
c) F7(to make), F5(to download), and F5(to run) to execute the program.

Sample Test Programs in C Language for HCS12 MCU Modules (APS12DT256SLK or APS12DT256SLK) by itself
Open CodeWarrior and Create a New project in C. Under Sources Click on main.c and bring up the main.c. Make sure you are in BDML mode. Now:

a) Delete everything in main.c,
b) Copy and paste any of the following programs into main.c,
c) F7(to make), F5(to download), and F5(to run) to execute the program.

Testing And Using Student Project Board With Freescale (Axiom) HCS12 MCU Module And Codewarrior

HCS12 MCU Modules (from Freescale or Axiom) come with USB-BDM and ready to be used with CodeWarrior. It can be programmed and used with the Student Project Board. The HCS12 modules has 60-pin male connector (J1) which is plugged into the 60-pin female connector (J5) of the Student Project Board. The Project Board has 8-LEDs, 8 DIP switches, 8 Push-button switches, a Buzzer, DB-9 connection for serial port, LCD, and on-board power connection. It also has the plug-in connector (J1) for Elvis board from NI. On the Prject we have a large breadboard for setting up circuits. The HCS12 CPU pins are accessible via a 60-pin female connector on each side of the breadboard(J6 and J7). All the on-board peripherlas such as DIP SW, LEDS, and so on are available via J11 female connector. All the NI Elvis signals are accessible via J2,J3 and J4 connectors.

Connecting HCS12 MCU Module to Freescale Student Project Board
Insert the HCS12 MCU Module into the J5 connector of the Project Board. Remove the following jumpers before turning on power to the project board

1) On the HCS12 MCU Module, remove the USB power jumper (VB). The VB is the middle jumper (3 of them) on PWR_SEL jumpers close to the power jack on the HCS12 MCU Module
2) On the HCS12 MCU module, remove all the jumpers belonging to LED1-LED4, SW1, SW2, SW3-1 to SW3-4, RV1, and RZ1. This should release the HCS12 CPU pins to be access by the Project Board.
3) On the Proejct Board, remove the USB jumper and put on the PWR_SEL. This jumper is labled +5V_SEL and located next to a big black CINCON DC-DC Converter on top corner of the Project Board. Next to it there are two more jumpers for power that need to be set They are as follow:
4) On the project Board, make sure the jumper is set for Vin (on the top right corner) under the PWR_SEL. The Vin jumper allows the power come from the power jack of the Project Board instead of J1 connection of NI-ELVIs.
5) On the Project Board, make sure the jumper is set for +5V (on the top right corner) under the VDD_SEL jumpers. The +5 jumper allows the selection of +5V power source instead of +3.3V.

Now,
1) connect the power adaptor to the power barrel jack of Student Project Board.
2) Connect the USB cable to HCS12 MCU module and to the USB port of the x86 PC. The HCs12 MCU module comes with a USB-BDM, so there is NO NEED to use the USB-BDM on the Student Project Baord

The following sample programs can be used to test the on-board features of Project Board with HCS12 MCU Module and CodeWarrior:

Sample Programs in Assembly Language for Freescale Student Project Board using HCS12 MCU Module and CodeWarrior
Open CodeWarrior and Create a New project in Assembly. Under Sources Click on main.asm and bring up the main.asm. Make sure you are in BDML mode.
Now:

a) Delete everything in main.asm,
b) Copy and paste any of the following programs into main.asm,
c) F7(to make), F5(to download), and F5(to run) to execute the program.

Timer Sample Programs in Assembly:

Interrupt Sample Programs in Assembly:

Sample Programs in C Language for Freescale Student Project Board with HCS12 MCU Module and CodeWarrior
Open CodeWarrior and Create a New project in C. Under Sources Click on main.c and bring up the main.c. Make sure you are in BDML mode.
Now:

a) Delete everything in main.c,
b) Copy and paste any of the following programs into main.c,
c) F7(to make), F5(to download), and F5(to run) to execute the program.

Timer Sample Programs in C:

Interrupt Sample Programs in C: