CML12C32SLK Freescale Semiconductor, CML12C32SLK Datasheet - Page 9

no-image

CML12C32SLK

Manufacturer Part Number
CML12C32SLK
Description
KIT STUDENT LEARNING 16BIT HCS12
Manufacturer
Freescale Semiconductor
Type
MCUr
Datasheet

Specifications of CML12C32SLK

Contents
*
For Use With/related Products
*
Lead Free Status / RoHS Status
Lead free / RoHS Compliant
C M L - 1 2 C 3 2
J U L Y
2 6 ,
2 0 0 4
be read by, and programmed into the development board MCU.
It is important the user understand the development board's use of addressing and memory
when writing source code. Program code must be located at a valid address. For instance, in
debug mode, program code should be located in external RAM. In assembly language, the
ORG statement is used to locate user code in memory. All program code following an ORG
statement will begin at the specified memory location, for example: ORG $4000; locates the
code starting at address $4000. DATA (or variables) must be located in RAM unused by pro-
gram code, for example: ORG $800.
In debug mode the debugger utility handles all MCU configuration setup; CPU and STACK ini-
tialization, and interrupt vectors (reset, timers, etc) setup. When program development is
complete, the application code must be modified to include CPU and STACK initialization, and
interrupt vector setup. CPU setup initializes the bus frequency, bus mode, and Flash memory
programming clock rates, and other constraints. STACK setup initializes the stack pointer.
The STACK should be set to the top of available RAM, by default $0FFF. In assembly the ap-
propriate instruction is LDS #$0FFF. The RESET vector must also be written to the User Re-
set Vector.
The installed monitor is not required when using a BDM interface. The BDM tool may have the
capability to erase and program the FLASH memory. If this is the case, MCU resources used
by the monitor are available to the user. The embedded monitor S-record (.S19) is provided
on the support CD to program into flash if required. The BDM allows locating programs in
memory and using monitor reserved resources.
A look at the example programs on the disk will make this clearer. If using a compiler instead
of an assembler, consult the compiler documentation for methods used to locate (MAP) code,
data, and stack.
Assembling Source Code
The example program HELLO.ASM is provided under the <D:>\EXAMPLES\CML12 directory
on the CD. If the AxIDE utility is installed, the example program can also be found in the
AxIDE3\EXAMPLE\HC12\D256 directory. You must use the example program for the target
MCU type. For this example, use the example code in the \D256 directory.
The AxIDE utility software provided with this board contains a simple interface to the AS12 as-
sembler Follow these steps to assembly the test program;
1. In the AxIDE window, click the BUILD button. This will open an Assemble Code window.
2. In the Assemble Code window, click the BROWSE button to browse to the program file to
assemble. For this example, select the file AxIDE3\EXAMPLE\HC12\D256\Hello.asm.
3. In the Assemble Code window, select the OK button to assemble the test program.
NOTE: The correct target MCU must be selected from the pull-down selection or the file will
not assemble correctly. DO NOT use long path or file names (> 8 characters). AS12 is a DOS
based tool and does not understand long path or file name. The program code may not as-
semble correctly.
9

Related parts for CML12C32SLK