EVBplus MiniDragon-Plus2 Trainer User manual

MiniDragon-Plus2 Trainer
ForFreescaleHCS12microcontrollerfamily
User’sManual
Revision 1.03

Table OF Contents
Chapter 1. Introduction...........................................................................................................................4
1.1 Welcome....................................................................................................................................4
1.2 MC9S12DG256 features and memory map..........................................................................5
1.3 On-board hardware features..................................................................................................8
1.4 I/O pin usage.............................................................................................................................9
Chapter 2. Quick Start............................................................................................................................. 12
2.1 Install software from CD ...................................................................................................... 12
2.2 Getting Started ...................................................................................................................... 13
2.3 Test hardware........................................................................................................................ 15
Chapter 3. Software Desriptions.........................................................................................................16
3.1 Bootloader and D-BUG12 monitor..................................................................................... 16
3.1.1 EVB mode .................................................................................................................. 16
3.1.2 Jump to EEPROM mode.......................................................................................... 17
3.2.3 BDM POD mode........................................................................................................ 17
3.2.4 Bootloader mode ...................................................................................................... 20
3.2 Making a simple assembly program in RAM.................................................................... 21
3.3 Software development ......................................................................................................... 23
Chapter 4. Hardware Descriptions......................................................................................................25
4.1 Power LED............................................................................................................................. 25
4.2 Jumper switches and pushbuttons.................................................................................. 25
4.3 Seven-Segment LED display.............................................................................................. 25
4.4 Trimmer pot........................................................................................................................... 25
4.5 Speaker.................................................................................................................................. 26
4.6 Dual RS232 communication ports.................................................................................... 26
4.7 External SPI interface.......................................................................................................... 27
4.8 Servo motor controllers...................................................................................................... 27
4.9 Dual H-Bridge for DC motor and Stepper motor controllers........................................ 27
2

4.10 Temperature sensor........................................................................................................... 27
4.11 LCD display module........................................................................................................... 27
4.12 Keypad ................................................................................................................................. 28
4.13 All jumper settings.............................................................................................................. 29
Chapter 5. EmbeddedGNU..................................................................................................................30
Chapter 6. Code Warrior and serial monitor.....................................................................................32
Chapter 7. PLL code.............................................................................................................................33
Chapter 8. Appendix ............................................................................................................................34
8.1 D-Bug12 utility routines..................................................................................................... 34
8.2 Interrupt vector tables........................................................................................................ 35
8.3 Useful web links................................................................................................................. 38
8.4 Troubleshooting notes....................................................................................................... 38
3

Chapter 1. Introduction
1.1 Welcome
Thank you very much for purchasing the MiniDragon-Plus2 trainer. The MiniDragon-Plus2 trainer
is a low-cost, feature-packed training board for the Freescale HCS12 microcontroller family. It is
compatible with the Freescale 9S12DP256EVB board and other similar development boards on
the market today, but it also incorporates many on-board peripherals that make this board one of
the best trainers in universities around the world.
For engineers, it is a convenient prototype system suitable for designers who want to rapidly
develop and prototype new HCS12 applications. For students, it can not only to be used as a
general trainer for freshman and sophomore students, but also as a powerful platform for senior
projects as well. The compact size and new features of the MiniDragon-Plus2 board create a new
potential for students at every level.
The MiniDragon-Plus2 trainer kit comes with the following items:
1. MiniDragon-Plus2 board
2. CD ROM which contains:
a. AsmIDE with HCS12 assembler
b. Sample programs with source code
c. Freescale application notes for the HCS12
d. Data sheets for on-board hardware
e. User’s manual
f. Reference documents
3. RS232 cord
4. 110V AC adapter for North America customers
The specification of the AC adapter is:
DC input: 110V
DC output: 7.5V-9V
Current rating: 300mA
Type of plug: 2.1mm female barrier plug, center positive
The AC adapter is only available to North American customers.
WARNING: If more power is needed in some applications, you should upgrade the AC adapter.
Otherwise, the board could keep resetting itself when the VCC drops below 4.6V.
If your board sometimes resets by itself you need to upgrade your AC adapter to 9VDC
output at 800mA or at 1A. Do not use an AC adapter whose DC output voltage is rated
higher than 9V with this board. If an AC adapter is rated for 9V at 300mA it should have
an output DC voltage about 12.5V without a load, 9V with a full load.
4

1.2 MC9S12DG256 features and memory map:
The MiniDragon-Plus2 board may come with theMC9S12DP256CCPV or the
MC9S12DG256CVPE installed. The MC9S12DG256 is the best replacement for the
MC9S12DP256 since the latter has been discontinued by Freescale. The only difference
between DG256 and DP256 is the number of CAN ports. The DG256 has 2 CAN ports, but the
DP256 has 5 CAN ports. Other than the different number of CAN port these two microcontrollers
have the same features. If you don't use more than 2 CAN ports these two chips are identical
and all datasheets and manuals for the DP256 can be used for the DG256.
The MC9S12DG256 microcontroller consists of a powerful 16-bit CPU (central processing unit),
256K bytes of flash memory, 12K bytes of RAM, 4K bytes of EEPROM and many on-chip
peripherals.
The main features of the MC9S12DG256 are listed below:
• Powerful 16-bit CPU
• 256K bytes of flash memory
• 12K bytes of RAM
• 4K bytes of EEPROM
• SCI ports
• SPI ports
• CAN 2.0 ports
• I2C interface
• 8-ch 16-bit timers
• 8-ch 8-bit or 4-ch 16 bit PWM
• 16-channel 10-bit A/D converter
• Fast 25 MHz bus speed via on-chip Phase Lock Loop
• BDM for in-circuit programming and debugging
• 112-pin LQFP package offers up to 91 I/O in a small footprint
5

Fig 1-1: MC9S12DG256 Memory map
6

Fig 1-2: MC9S12DG256 MCU block diagram
7

Fig 1-3: MC9S12DG256 MCU pin assignments
1.3 On-board hardware features:
The MiniDragon-Plus2 board includes the following features:
1. Dual RS232 communication ports
2. CAN port
3. SPI expansion port for interfacing external SPI devices
4. Four robot servo controllers with terminal block for external 5V
5. 7-segment LED display
6. Two jumper switches
7. Two push button switches
8. 5V regulator with DC jack
9. Speaker to be driver by timer, or PWM signal for alarm or music applications.
10. Dual H-Bridge for controlling two DC motors or one Stepper motor
8

11. Power-On LED indicator
12. BDM-in connector to be connected with a BDM from multiple vendors for debugging
13. BDM POD mode for programming other HCS12 boards. No extra hardware needed
14. Abort switch for stopping program when program is hung in a dead loop
15. Mode switch for selecting 4 operating modes: EVB, Jump-to-EEPROM, BDM POD and
Bootloader
16. 4 X 4 keypad header
17. Wytec’s TinyBee 3-axis accelerometer interface or GP2-D12 distance measuring sensor
interface for distance measurement
18. Potentiometer trimmer pot for analog input
19. Temperature sensor
20. Female or male headers provides all I/O pins of the MC9S12DG256
21. 400-tie solderless breadboard included
22. Small PC board size is 5.25" X 3.40"
The MiniDragon-Plus2 board has the following features as options:
23. RF transmitter
24. RF receiver
25. 4 X 4 keypad
26. 16X2 LCD
27. RTC
28. RS485 communication
29. Form C relay output rated at 3A/30V or 1A/125V
1.4 I/O Pin Usage
Many I/O pins of the MC9S12DG256 on the MiniDragon-Plus2 board are used by on-board
peripherals, but thanks for the large 112-pin LQFP package, there are still many I/O pins available
for your circuits on the breadboard. Also it’s unlikely that all on-board peripherals will be used by
one application program. So the I/O pins on unused peripheral devices can still be used by your
circuits on the breadboard. For instance, if you don’t connect a keypad, the entire port A will be
available to your circuits. If you don’t use LCD, the port K will be available as well. Port B drives
H-Bridge, but if you don’t connect a motor, the port B can drive any other I/O devices on the
breadboard.
9

Pin Name Pin # I/O Usage
PA0 Pin 57 Col_0 of keypad (output)
PA1 Pin 58 Col_1 of keypad (output)
PA2 Pin 59 Col_2 of keypad (output)
PA3 Pin 60 Col_3 of keypad (output)
PA4 Pin 61 Row_0 of keypad (input)
PA5 Pin 62 Row_1 of keypad (input)
PA6 Pin 63 Row_2 of keypad (input)
PA7 Pin 64 Row_3 of keypad (input)
PB0 Pin 24 H-bridge (output)
PB1 Pin 25 H-bridge (output)
PB2 Pin 26 H-bridge (output)
PB3 Pin 27 H-bridge (output)
PB4 Pin 28 not used
PB5 Pin 29 not used
PB6 Pin 30 not used
PB7 Pin 31 not used
PE0 Pin 56 Abort switch SW8 (input)
PE1 Pin 55 not used
PE2 Pin 54 not used
PE3 Pin 53 not used
PE4 Pin 39 not used
PE5 Pin 38 not used
PE6 Pin 37 not used
PE7 Pin 36 not used
PH0 Pin 52 Segment A on display
PH1 Pin 51 Segment B on display
PH2 Pin 50 Segment C on display
PH3 Pin 49 Segment D on display
PH4 Pin 35 Segment E on display
PH5 Pin 34 Segment F on display
PH6 Pin 33 Segment G on display
PH7 Pin 32 not used
PJ0 Pin 22 not used
PJ1 Pin 21 not used
PJ6 Pin 99 not used
PJ7 Pin 98 not used
PK0 Pin 8 RS of LCD module (output)
PK1 Pin 7 EN of LCD module (output)
PK2 Pin 6 DB4 of LCD module (output)
PK3 Pin 5 DB5 of LCD module (output)
PK4 Pin 20 DB6 of LCD module (output)
PK5 Pin 19 DB7 of LCD module (output)
PK7 Pin 108 not used
Table 1-1: I/O pin usage list 1
10
Table of contents
Popular Computer Hardware manuals by other brands

EMC2
EMC2 VNX Series Hardware Information Guide

Panasonic
Panasonic DV0PM20105 Operation manual

Mitsubishi Electric
Mitsubishi Electric Q81BD-J61BT11 user manual

Gigabyte
Gigabyte B660M DS3H AX DDR4 user manual

Raidon
Raidon iT2300 Quick installation guide

National Instruments
National Instruments PXI-8186 user manual











