CME-12B/BC Development Board for Motorola 68HC12B32 and 68HC12BC32 Microcontrollers xiom anufacturing 2000 2813 Industrial Ln. • Garland, TX 75041 • (972) 926-9303 FAX (972) 926-6063 email: Gary@axman.com • web: http://www.axman.
CONTENTS GETTING STARTED ............................................................................................3 Installing the Software..................................................................... 3 Board Startup .................................................................................. 3 Support Software ............................................................................ 4 Software Development .................................................................... 4 TUTORIAL...
GETTING STARTED The Axiom CME-12B/BC single board computer is a fully assembled, fully functional development system for the Motorola 68HC12B32 and BC32 microcontrollers, complete with wall plug power supply and serial cable. Support software for this development board is provided for Windows 95 and NT operating systems and DOS. Follow the steps in this section to get started quickly and verify everything is working correctly. Installing the Software 1. Insert the Axiom 68HC12 support disk in your PC.
Support Software There are many useful programs and documents on the included HC12 support disk that can make developing projects on the CME-12B/BC easier. You should browse the disk and copy anything you want to your hard drive. See the README.TXT file for a description of what is included. The flash programming utilities communicate with the board via its COM1 port and the supplied cable.
TUTORIAL This section was written to help you get started developing software with the CME-12B/BC 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 \EXAMPLE directory. You can assemble your source code using command line tools under a DOS prompt by typing: AS12 HELLO.ASM –LHELLO Most compilers and assemblers allow many command line options so using a MAKE utility or batch file is recommended if you use this method. Run AS12 without any arguments to see all the options, or see the AS12.TXT file on the disk.
Running your application After creating an 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 DBug12 Monitor to test it without programming it into EEPROM. If you haven’t done so already, verify that the CME-12B/BC board is connected and operating properly by following the steps under “GETTING STARTED” until you see the D-Bug12 prompt, then follow these steps to run your program: 1.
Programming Flash EEPROM You can program your application into EEPROM 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. Change the start of the program to $8000 which is the beginning of the EEPROM. Do this by changing the ”ORG $1000” to ”ORG $8000”. 2.
MEMORY MAP Following is the default memory map for this development board. Consult the HC12 technical reference manual on the support disk for details of the internal memory map for the processor.
CONFIG SWITCH The CME-12B/BC board is shipped from the manufacturer with the following default CONFIG SWITCH settings: 1 ON 2 ON 3 ON 4 ON 5 OFF 6 ON 7 OFF 8 OFF The 8 position CONFIG SWITCH provides an easy method of configuring the CME-12B/BC32 board operation.
PORTS AND CONNECTORS LCD_PORT The LCD_PORT interface is connected to the data bus and memory mapped to locations 270 – 27F hex assigned to CS7. For the standard display, address 270 is the Command register, address 271 is the Data register. The interface supports all OPTREX DMC series displays in 8 bit bus mode with up to 80 characters and provides the most common pinout for a dual row rear mounted display connector. Power, ground, and Vee are also available at the LCDPORT-1 connector.
MCU_PORT The MCU_PORT provides access to the peripheral features and I/O lines of the HC12 as follows: A14 D0 D2 D4 D6 /XIRQ VFP VRH +5V PAD0 PAD2 PAD4 PAD6 PS0 / RXD PS2 PS4 PS6 PC6 PC4 PC2 PC0 / RXCAN PP6 PP4 PP2 PP0 PT0 PT2 PT4 PT6 +5V 1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39 41 43 45 47 49 51 53 55 57 59 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60 A15 D1 D3 D5 D7 /DBE /LSTRB VRL GND PAD1 PAD3 PAD5 PAD7 PS1 / TXD PS3 PS5 PS7 PC5 PC3 PC1 / TXCAN
COM1 SERIAL PORT 1 TXD0 2 RXD0 3 4 GND 5 The COM-1 port has a Female DB9 connector that interfaces to the HC12 internal SCI0 serial port. It uses a simple 2 wire asynchronous serial interface. 6 7 8 9 Pins 1, 4, and 6 are connected for default handshake standards. Pins 7 and 8 are connected for default handshake standards. Handshake pins can be easily isolated and connected to I/O ports if necessary.
BDM-IN The BDM-IN port is a 6 pin header compatible in pinout with the Motorola Background Debug Mode (BDM) Pod. This allows the connection of a background debugger for software development, programming and debugging in real-time, since the BDM control logic does not reside in the CPU. BGND 1 2 GND 3 4 /RESET 5 6 +5V See the HC12 Technical Reference Manual for complete documentation of the BDM. A Background Debug Module is available from the manufacturer.
TROUBLESHOOTING The CME-12B/BC 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 CME-12B/BC 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 HC12 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. D-Bug12 Monitor Commands ASM
<.> BAUD BF [] BR [] BULK CALL [] DEVICE [ [...