The kits are designed to be used in ECE courses or students who already have some experiences in the HCS12 / 9S12 family. If you would like to learn HCS12 / 9S12 programming by yourself, we recommend you purchase our Dragon12-Light instead.
48-pin QFP, MC9S12C32 / MC9S12C128 MCU standard specifications:
Assemble the module:
The Dragonfly12-Plus DIP module is pre-installed with the Freescale Serial Monitor and a test program in the flash memory addresses $C000-$FFFF. The Serial Monitor is located in the highest 2K addresses ($F800-$FFFF). The test program is located at $E000-$F7FF. The reset and interrupt vectors in the user program are located in normal addresses at $FF8A-FFFF, but the monitor automatically relocated them to $F78A-F7FF during file downloading.
To test the Dragonfly12-Plus module with the RoadRunner module, follow the steps below:
Plug both modules onto a solderless breadboard.
Make 4 connections for the Dragonfly12-Plus module:
Plug a USB cable to the USB connector on the RoadRunner module and the other end to a USB port of your PC. The power LEDs on both modules should be lit. Make sure that the 5V power LED on the RoadRunner module is ON and 3V power LED is off.
Set the slide switch S1 on the Dragonfly12 module in the "LOW" position (DownLOAD mode) and press the reset button (S1) once, the LED indicator (PE4) on the Dragonfly12-Plus module should blink twice. If it does not occur, the serial monitor is not pre-loaded.
Set the slide switch S2 on the Dragonfly12-Plus module in the "UP" position (RUN mode) and press the reset button (S1) once, the LED indicator (PE4) on the Dragonfly12-Plus module should blink 4 times. If the test program is pre-loaded then the LED will flash rapidly.
Diagnostic LED indicator:
The Dragonfly12-Plus module is pre-installed with serial monitor and
a simple test program at factory. The state of the slide switch (S2) is tested by the
serial monitor for selecting RUN or LOAD mode during power up or
reset, and the PE4 LED will
blink twice to indicate that the serial monitor is functioning. If the slide switch is placed in "LOAD" mode
the monitor will wait for a command from PC. If the slide switch is
placed in "RUN" mode the LED will blink two more times to indicate that
the program execution is diverted to the user code. When
the user code ( the pre-loaded factory test program) is running the
LED indicator will flash rapidly.
The MC9S12C32 memory map in single chip mode is as follows:
$3800-$3FFF RAM, the highest 50 bytes of RAM are reserved for the Serial Monitor.
$4000-$7FFF 16K fixed Flash
$C000-$FFFF 16K fixed Flash, $F800-$FFFF is the Serial Monitor.
Three ways to develop code using the Dragonfly12-Plus module:
If the serial monitor is used, the method of downloading your programs into this module is different than the normal way of downloading programs into RAM using Buffalo monitor or D-Bug12 monitor. This chip does not have a full-featured monitor that can execute ASCII commands given in the terminal window. Instead, it has a small 2K serial monitor that can only execute binary encoded commands. You can only interact with it using a special program called CodeWarrior IDE.
The CodeWarrior IDE is an industrial grade program that lets you examine memory and registers, change memory and registers, erase flash, and download programs. The most valuable feature is that it supports breakpoints and source level debugging in assembly and C languages. The standard version of the CodeWarrior costs thousands of dollars, but the special edition of the CW is free. The limitation of the special edition is that your program code size cannot exceed 32K in flash memory which is still large enough for most educational applications.
For more information about CodeWarrior please visit: http://www.evbplus.com/Code_Warrior_hcs12.html
How to make an S29 file used by a BDM pod? ( If you don't use a BDM pod, skip this section)
An S29 file is only used by a BDM pod to program flash memory. The most common mistake that a user makes while trying to program flash memory using a BDM pod is to FLOAD an s19 file into flash memory.
In order to program the MC9S12DG256 flash memory, you must program an even number of bytes and begin on an even address boundary for each s-record. If any one s-record in the file contains an odd number of bytes or begins with an odd address, the flash memory cannot be programmed. Let's use the test_DF12P.asm as a sample program and assume that the assembler successfully generated the test_DF12P.s19. Next, you must use the Freescale’s s-record conversion utility, sreccvt.exe, to make an s29 file from the test_DF12P.s19 by using the following command line:
-m c0000 fffff 32 -of f0000 -o test_DF12P.s29 test_DF12P.s19
It will create a new s2 file named test_DF12P.s29 that has an even number of bytes and can be programmed into the flash memory by FLOAD command ( Use FLOAD command only, do not use FLOAD ;b command ).
For your convenience, we made a batch file, MAKE_test_DF12P_s2.bat, that can be placed along with the srccvt.exe in your working directory. After assembling your test_DF12P.asm without an error, you can double click the MAKE_test_DF12P_s2.bat and it will create test_DF12P.s29 and test_DF12P.s2 from test_Df12P.s19. You can use this batch file for your other application programs. If your file name is not test_DF12P.asm, you can edit the MAKE_test_DF12P_s2.bat by substituting the filename 'test_DF12P' with your new file name. For instance, if your new filename is demo.asm the DOS command in the MAKE_testDF12P_s2.bat will be:
-m c0000 fffff 32 -of f0000 -o demo.s29 demo.s19.
To edit MAKE_test_DF12P_s2.bat, right click it and a small pull down menu will appear. Left click the edit option to modify the dos command. After modification is done you can save it with the new batch file name, MAKE_demo_s2.bat
Schematic and sample programs:
Sample code for testing the Dragonfly12-Plus module.