CMD912x Development Board for Motorola 68HC912 MCU’s 68HC912D60/ DG128/ DT128 and MC9S12DP256 xiom anufacturing 2000 2813 Industrial Ln. • Garland, TX 75041 • (972) 926-9303 FAX (972) 926-6063 email: Sales@axman.com • web: http://www.axman.
CONTENTS GETTING STARTED ............................................................................................3 Installing the Software ............................................................................. 3 Board Startup .......................................................................................... 3 Support Software..................................................................................... 4 Software Development .........................................................
GETTING STARTED The Axiom CMD912X single board computer is a fully assembled, fully functional development system for the Motorola 68HC912D60/ DG128/ DT128 and MC9S12DP256 microcontrollers, complete with wall plug power supply and serial cable. Support software for this development board is provided for Windows 95/98 and NT operating systems. Follow the steps in this section to get started quickly and verify everything is working correctly. Installing the Software 1.
5. Apply power to the board by plugging in the power adapter that came with the system. 6. If everything is working properly, you should see a message to “PRESS KEY TO START MONITOR…” in your terminal window. Press the ENTER key and you should see: Axiom MON12 - HC12 Monitor / Debugger > _ 7. Your board is now ready to use! If you do not see this message prompt, or if the text is garbage, see the TROUBLESHOOTING section at the end of this manual.
TUTORIAL This section was written to help you get started developing software with the CMD912X board. Be sure to read the rest of this manual as well as the documentation on the disk if you need further information. The following sections take you through the complete development cycle of a simple "hello world" program, which sends the string "Hello World" to the serial port.
Assembling source code An example program called “HELLO.ASM” is provided under the \EXAMPLES\912x directory of the CD and if you installed AxIDE, under that programs \EXAMPLE directory. You must use the example for the PM Module you have installed on the CMD912x board. The PM Label is located beside the microcontroller. For example: \EXAMPLE\HC12D60\HELLO.ASM \EXAMPLE\HC12D128\HELLO.ASM \EXAMPLE\HC12D256\HELLO.
Running your application After creating a Motorola S-Record file you can "upload" it to the development board for a test run. The provided example “HELLO.ASM” was created to run from RAM so you can use the Mon12 Monitor to test it without programming it into Flash. If you haven’t done so already, verify that the CMD912X board is connected and operating properly by following the steps under “GETTING STARTED” until you see the Mon12 prompt, then follow these steps to run your program: 1.
Programming Flash EEPROM After debugging, you can program your application into Flash Memory so it executes automatically when you apply power to the board as follows: 1. Make a backup copy of HELLO.ASM then use a text editor to modify it. 2. Change the ORG location for the program start to the internal flash if needed. 3.
BDM OPERATION The CMD912X board will emulate supported HC12 device internal flash memory in external ram. This feature allows BDM (Background Debug Modules) such as the AX-BDM12 to load and control the execution of code being developed without the necessity of the internal flash memory being programmed many times during the development process. This feature improves updating time and allows the use of may software breakpoints instead of being limited to only 2 hardware breakpoints.
MEMORY MAPS Following is the memory map for the CMD912X development board and the various Microcontroller PM Modules that it supports. Consult your MCU technical reference manual on the CD for internal memory map details for the processor.
PM12DG128 / PM12DT128 Memory Map FFFF Special (BDM) Expanded Wide Mode Expanded Wide Mode CONFIG MODE 1 ON ON 2 ON ON CONFIG MODE External EPROM U5/6 (Mon12) 1 2 ON OFF OFF OFF Single Chip Mode 1 2 3 4 CONFIG OFF OFF OFF OFF MODE OFF OFF (see BDM notes) On-Chip Flash Memory C000 BFFF External RAM U3/4 8000 Flash Page 8000 – C000 External RAM U3/4 4000 3FFF On-Chip RAM 3E00 – 3FFF used by Mon12 2000 1FFF Reserved 1000 FFF On-Chip EEPROM 800 7FF Peripheral Area Unused = 400-7BF LCD / CS7
PM12D60 Memory Map FFFF Expanded Wide Mode CONFIG MODE C000 BFFF 1 ON ON Special (BDM) Expanded Wide Mode 2 ON ON CONFIG MODE Single Chip Mode 1 2 ON OFF OFF OFF CONFIG MODE 1 2 OFF OFF OFF OFF External EPROM U5/6 (Mon12) External RAM U3/4 External RAM U3/4 Internal Flash Memory On-Chip 1000 FFF HC12 Internal EEPROM On-Chip C00 BFF Peripheral Area - see note 2 below Unused = A00-B7F LCD / CS7 = BF0-BFF CS6 = BE0-BEF A00 9FF CS5 = BD0-BDF CS4 = BC0-BCF CS3 = BB0-BBF CS2 = BA0-BAF CS1 = B
OPTION SWITCHES CONFIG SWITCH The CMD912X board is shipped from the manufacturer with the following default CONFIG SWITCH settings: 1 ON 2 ON 3 4 5 OFF OFF OFF The 5 position CONFIG SWITCH provides an easy method of configuring the CMD912X board memory operation.
MODE SWITCH The 3 to 5 position MODE SWITCH on the PM12xxx Module provides an easy method of configuring the HC12 operating Mode and Options from RESET. NOTE: Expanded Narrow Mode is not available on this board, Expanded Wide operation is required due to the memory application and that any expanded bus operation requires both HC12 I/O ports A and B in any case. Following are the Mode Switch selections and descriptions: PM12D60 Default: 1 and 2 ON, 3 - 5 OFF.
PORTS AND CONNECTORS PRU PORT The Port Replacement Unit (PRU) provides simulation of the HC12 bus and control ports A, B, E, and K so expanded memory can be used for single-chip application development. PRU operation is enabled with external memory by CONFIG Switch 1 ON. The PRU also provides control of the external memories and peripherals on the CMD912x board. Care should be taken not to violate PRU operation constraints or user code operation could be rendered inoperable until a RESET is performed.
PRU PORT CONNECTOR +5V XPB6 XPB4 XPB2 XPB0 XPA6 XPA4 XPA2 XPA0 XPE6 XPE4 XPE2 PE0 XPK4 XPK2 XPK0 GND 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 +5V XPB7 XPB5 XPB3 XPB1 XPA7 XPA5 XPA3 XPA1 XPE7 XPE5 XPE3 PE1 XPK7 XPK5 XPK3 XPK1 Note: PE0 and PE1 are the same signals as the HC12 Port E.
MCU_PORT 2 PK0 PK2 PK4 PB0/D0 PB2/D2 PB4/D4 PB6/D6 PE0/XIRQ* PE6/MODB A14 A15 A16 A17 1 3 5 7 9 11 13 15 17 19 21 23 25 2 4 6 8 10 12 14 16 18 20 22 24 26 PK1 PK3 PK5 PK7/ECS PB1/D1 PB3/D3 PB5/D5 PB7/D7 PE3/LSTRB* PE5/MODA PE7 A18 A19 The MCU_PORT 2 provides access to the Expanded Bus and I/O lines of the HC12. Note: 1) Not all I/O Ports are provided by all HC12 MCUs. 2) The A14 - A19 address signals are provided by the PRU.
ANALOG PORT PAD0 PAD1 PAD2 PAD3 PAD4 PAD5 PAD6 PAD7 VRL0 VRL1 1 3 5 7 9 11 13 15 17 19 2 4 6 8 10 12 14 16 18 20 PAD8 PAD9 PAD10 PAD11 PAD12 PAD13 PAD14 PAD15 VRH0 VRH1 The ANALOG port provides access to the Port AD0 and Port AD1 Analog-to-Digital input lines. PAD0 – PAD7 HC12 Port AD0-15 is an input port or A/D Converter inputs. VRH / VRL HC12 A/D Converter Reference Pins. See A/D Reference Section. To provide an external reference voltage, R3,4,10 and 32 may need to be removed. See schematic.
CAN1 - 4 PORTS These ports provide the CAN Bus input and output. Each port has a CAN Transceiver (Philips PCA82C250) capable of up to 1M Baud data rate. Not all HC12 devices support all of the channels, refer to the device data for capability. Each transceiver receive output has a COM Switch position associated with it. For proper operation the COM Switch should be turned on for each CAN channel that is used for CAN communication.
LCD_PORT The LCD_PORT interface is connected to the data bus and memory mapped into the Register Following memory area of the HC12. Note that the DP256 does not support the LCD Port due to no Register following area is available. Refer to the PM12xxx board memory map for LCd Port address location. For the standard display, the base address of the LCD Port is the Command register and the Base+1 address is the display Data register.
TB1 and J6 Power The TB1 and J6 connectors provide power input to the board or if J6 is used for input, TB1 maybe used to source additional circuitry. The J6 power jack accepts a standard 2.0 ~ 2.1mm center barrel plug connector (positive voltage center) to provide the +VIN supply of +7 to +20 VDC @ 300ma minimum (+9VDC nominal). TB1 provides access to the +VIN, GND (power ground), and +5V power supplies. The CMD912x power supply will provide 500ma of +5V for user application.
TROUBLESHOOTING The CMD912X board is fully tested and operational before shipping. If it fails to function properly, inspect the board for obvious physical damage first. Ensure that all IC devices in sockets are properly seated. Verify the communications setup as described under GETTING STARTED and see the Tips and Suggestions sections following for more information. The most common problems are improperly configured communications parameters, and attempting to use the wrong COM port. 1.
Tips and Suggestions Following are a number of tips, suggestions and answers to common questions that will solve many problems users have with the CMD912X development system. You can download the latest software from the Support section of our web page at: www.axman.com Utilities • If you’re trying to program memory or start the utilities, make sure all jumpers and CONFIG SWITCH settings are correct.
TABLES TABLE 1. LCD Command Codes Command codes are used for LCD setup and control of character and cursor position. All command codes are written to LCD panel address $B5F0. The BUSY flag (bit 7) should be tested before any command updates to verify that any previous command is completed. A read of the command address $B5F0 will return the BUSY flag status and the current display character location address.
TABLE 3. Mon12 Monitor Commands BF [] BR [] BULK CALL [] G [] HELP LOAD [P] MD [] MM or <=> <^> or <-> <.
TABLE 4.
PM12D60 PM12DG/DT128 PM12DP256 PS4/MIOS PS5/MOIS PS6/SCK PS7/SS* PT0 PT1 PT2 PT3 PT4 PT5 PT6 PT7 RXCAN0 TXCAN0 PCAN2 PCAN3 PCAN4 PCAN5 PCAN6 PCAN7 PP0/PWM0 PP1/PWM1 PP2/PWM2 PP3/PWM3 PS4/MIOS PS5/MOIS PS6/SCK PS7/SS* PT0 PT1 PT2 PT3 PT4 PT5 PT6 PT7 RXCAN0 TXCAN0 RXCAN1 TXCAN1 PIB4 PIB5 PIB6 PIB7 PP0/PWM0 PP1/PWM1 PP2/PWM2 PP3/PWM3 BGND RESET* PAD0 / AN0 PAD1 / AN1 PAD2 / AN2 PAD3 / AN3 PAD4 / AN4 PAD5 / AN5 PAD6 / AN6 PAD7 / AN7 PAD10 / AN10 PAD11 / AN11 PAD12 / AN12 PAD13 / AN13 PAD14 / AN14 PAD15 / A