Home

CML-12C32 User Guide

image

Contents

1. MON12 Ram Interrupt MCU Interrupt Vector MON12 Vector Vector Address TRAP code Source OF8C FF8C 02 PWME OF8E FF8E 04 PTPI OF90 FF90 06 C4TX 0F92 FF92 08 C4RX OF 94 FF94 OA C4ERR OF96 FF96 OC C4WU OF98 FF98 OE C3TX OF9A FF9A 10 C3RX OF9C 9 12 OF9E FF9E 14 C3WU OFAO FFAO 16 C2TX OFA2 FFA2 18 C2RX OFA4 FFA4 1A C2ERR OFA6 FFA6 1C C2WU 8 8 C1TX OFAA FFAA 20 C1RX OFAC FFAC 22 CiERR OFAE FFAE 24 C1WU OFBO FFBO 26 COTX OFB2 FFB2 28 CORX OFB4 FFB4 2A COERR OFB6 FFB6 2C COWU OFB8 FFB8 2bE FEPRG OFBA FFBA 30 EEPRG FFBC 32 SPI2 OFBE FFBE 34 SPI1 OFCO FFCO 36 I2C OFC2 FFC2 38 BDLC OFC4 FFC4 3A CRGC OFC6 FFC6 3C CRGL OFC8 FFC8 OFCA FFCA 40 MCNT 42 PTHI OFCE FFCE 44 PTJI OFDO FFDO 46 ADC1 0 2 2 48 ADCO OFD4 FFD4 4A SCI1 OFD6 FFD6 4C SCIO OFD8 FFD8 4E SPIO OFDA FFDA 50 PACAI OFDC FFDC 52 PACAO OFDE FFDE 54 TOF OFEO FFEO 56 TC7 OFE2 FFE2 58 TC6 OFE4 FFE4 5A TC5 OFE6 FFE6 5C TC4 OFE8 FFE8 5E TC3 OFEA FFEA 60 TC2 OFEC FFEC 62 TC1 OFEE FFEE 64 TCO OFFO FFFO 66 RTI OFF2 FFF2 68 IRQ OFF4 FFF4 6A XIRQ JULY 26 2004 CML 12C32 MON12 Interrupt Table continued OFF6 FFF6 6C SWI FFF8 6E TRAP OFFA FFFA 70 COP OFFC FFFC 72 CLM OFFE FFFE 74 RESERVED
2. ae me CO FEATURES Bd E Qo 60 MC9S12C32 MCU 48 32K Byte Flash EEPROM m ME x 2K Bytes RAM 308 601 O lines e Timer PWM SCI and SPI Communications Ports l Key Wake up Port 29 DEBUG Port 2 0 Module em d us Analog to Digital Converter rera 8 Mhz Internal Bus Operation Default amm 16 MHz Bus Operation using internal PLL Qua Chris 3 3VDC to 5VDC operation unm dx O PORT BUS PORT connectors provide access to MCU signals Sr On board regulated 5V power supply NS T 50808050000000 583333588335389 R Optional power output through connector J1 lkegeeep djosoooosoccoco 16 MHz Ceramic Oscillator RS 232 Serial Port w DB9 Connector 8 Ch 10 bit Analog to Digital Converter with full rail to rail operation and external trigger capability 8 Channel 16 bit Timer with Input Capture Output Compare PWM capabilities e User Components Provided 3 Push Button Switches 2 User RESET ALED Indicators 2 User VDD RESET Configuration Jumpers to setup board operation Connectors 60 pin PORT Socket Header 28 pin BUS PORT Socket Header DB9 Communications Connector DEBUG BDM Connector 4 pin CAN PORT Connector 8 pin
3. GND 60 59 GND The MCU_PORT provides access to the peripheral 5V 58 57 5V features and I O lines of the HCS12 PP4 56 55 5 PAD3 54 53 2 Note signals with alternate connections on the devel PAD1 52 51 PADO opment board PAD7 50 49 PP3 PAD6 48 47 2 PA 7 0 AD 7 0 provide multiplexed address PAD5 46 45 1 data on the expanded mode MCU PAD4 44 43 PPO PAO 42 41 PA1 PB 7 0 AD 7 0 provide multiplexed address 2 40 39 data on the expanded mode MCU 38 37 5 PAG RXCAN CAN channel to PTO 34 33 1 PT2 32 31 PT3 PT4 30 29 PT5 CAN Port transceiver pte 28 27 PT7 PM S 0 SPI Port provides LCD PORT serial PP6 26 25 PM3 SS interface PM5 SCK 24 23 PM4 MOSI PM2 MISO 22 21 PS1 TXD PS 1 0 COM Port RXD TXD provides serial PSO RXD 20 19 PE1 IRQ RS 232 interface PEO XIRQ 18 17 RESET PB7 16 15 6 5 14 13 PB3 12 11 2 PB1 10 9 PM1 TXCAN 8 7 PMO RXCAN PP7 6 5 7 PJ6 4 3 53 PS2 2 1 KEYPAD The KEYPAD PORT P connector supports connection of a passive 12 key 16 key keypad This connector also provides connection directly to Port P on the MCU Current limit is not provided on any KEYPAD input a
4. ace an interrupt service set a breakpoint in the 3 Mon12 will not trace into interrupts To tr service routine and then trace 4 Mon12 trace is limited to expecting the next linear address Program counter modification branches calls or subroutines will not trace correctly 5 Monitor start up procedure A Determine if Auto Start is enabled and execute code at address 8000 B Set Stack Initialize memory map and SCIO port and send prompt C Receive first character from Console port and execute monitor if ASCII text command else start utility mode for programming services Mon12 Monitor Commands BF lt StartAddress gt lt EndAddress gt lt data gt BR lt Address gt CALL lt Address gt GO lt Address gt HELP LOAD P MD lt StartAddress gt lt EndAddress gt MM lt Address gt MW lt Address gt MOVE lt StartAddress gt lt EndAddress gt lt DestAd dress gt RD OFFSET arg Proceed RM STOPAT lt Address gt T lt count gt Items in Italics are not implemented at this time Block Fill memory range with data Set Display user breakpoints Call user subroutine at lt Address gt Begin continue execution of user code Display the Mon12 command summary Load S Records into memory P Paged S2 Memory Display Bytes Modify Memory Bytes 8 bit values Modify memory Words 16 bit values Move a block of memory Display all CPU registers Offset for download Continue program e
5. BDM OPERATION JULY 26 2004 BDM operation on the CML 12C32 board emulates supported HC S 12 internal flash memory in external ram This feature allows BDM s 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 repeatedly during the development process This feature improves update time and allows the use of software breakpoints instead of being lim ited to only 2 hardware breakpoints Operation Notes for BDM use 1 The BDM initialization of the HC12 should set the correct operating MODE expanded wide for external memory access The LSTRB RW ROMEN and Stretch configuration bits should be set for proper external memory access operation The Axiom support CD contains sample set up macros for the USB BDM 2 While using the BDM the user has full control over the memory map and hardware re sources of the HCS12 No MCU resources are reserved for monitor use and the MCU interrupt vector table located at OXFF8C OxFFFF may be used 25 CML 12C32 JULY 26 2004 APPENDIX A HCS12 SERIAL MONITOR OPERATION This CML 12C32 contains the HCS12 Serial Monitor instead of the MON12 monitor mentioned in the User Guide This addendum provides a brief description of this serial monitor program Further details may be found in Appli cation Note AN2548 from Freescale Semiconductor This board also contains a small demo
6. AN7 or to the BUS PORT header for use on prototyping area 11 CML 12C32 JULY 26 2004 1 PAD7 AN7 01 58 Shunt across pins 1 2 to route POT output to the MCU 2 POT Shunt across pins 2 3 to route POT output to the EE PORTAT MCU PORT pin 27 J2 LCD EXPANSION The J2 option header is explained in detail in the LCD PANEL section below VRH EN VRL EN The VRH EN and VRL EN option headers are not installed on the CML 12C32 board and are hard connected by circuit copper trace for default operation These jumpers provide voltage reference inputs for the MCU analog to digital converter block Alternative upper and lower reference voltages may be used by cutting the circuit trace and attaching a jumper wire to the appropriate pin of VRH EN and VRL EN After cutting the circuit trace use of default refer ence voltages will require installing 2 position header with shunt jumper Refer to the PCB schematic for further details CUT TRACE OPTIONS CUT TRACE is a component pad connected by a circuit trace The cut trace sets up default board operation Cut trace options allow the user to disconnect or modify on board resource configurations The cut trace pad also allow for reestablishing the connection by installing surface mount 1206 size 0 ohm resistors or mod wire Normal operation of the development board generally does not require manipulating any CUT TRACE option CT1 Removed Not Used CT2 Remo
7. BUS PORT provides access to Port E signal and to latched address signals Care should be taken when using these signals Excessive load may adversely affect MCU operation PEO XIRQ 1 2 PE1 IRQ A 15 0 Latched Memory Addresses 0 to 15 PE2 RW 3 4 PE3 LSTRB PE 7 0 MCU expanded bus control signals PE4 ECLK 5 6 PES MODA 7 9 PE6 MODB 8 PR7 XCLKS 5 10 GND 11 12 A1 2 13 14 4 15 16 5 A6 17 18 7 8 19 20 10 21 22 A11 12 23 24 13 14 25 26 15 POT 27 28 GND BDM PORT The BDM port is a 6 pin header compatible with the Motorola Background Debug Mode BDM Pod This allows the connection of background debugger for software development pro gramming and debugging in real time without using HC12 I O resources BGND 1 2 GND See the HC12 Technical Reference Manual for NC 3 4 J RESET complete documentation of the BDM NC 5 6 5V A Background Debug Module is available from the Axiom Manufacturing 13 CML 12C32 JULY 26 2004 MCU_PORT The MCU_PORT provides signal access between the MCU and the breadboard This con nector is designed to interface directly with the Axiom Manufacturing Project Board through a 60 pin ribbon cable This connector will also support ribbon cable connection to the Axiom Manufacturing MCU Project Board
8. Keypad Connector 14 pin LCD Connector 2 0mm Barrel Connector Power Input Solderless Breadboard Area 3 5 x 1 75 Supplied with DB9 Serial Cable Documentation CD Manual and Wall plug type power supply 99999 Specifications Board Size 4 5 x 5 0 Power Input 9VDC 200 mA typical 6 to 16VDC range GETTING STARTED The CML 12C32 single board computer is fully assembled fully functional development board for the Motorola MC9S12C32 microcontroller The board comes with a serial cable power supply and installed binary monitor for stand alone operation Support software for this development board is provided for Windows 95 98 NT 2000 XP operating systems Users should be familiar with the hardware and software operation of the target MCU Refer to the MC9S12C32 User Manual and Reference Manual for details on MCU operation The board s purpose is to promote the features of the MC9S12C32 and to assist the user in quickly developing an application in a known working environment Users should be familiar with memory mapping memory types and embedded software design for quick successful appli cation development The user should also be familiar with the various operation modes of the MCU NOTE With the MCU in expanded mode the user can not access to Port A Port B or Port E Application development may be performed by using the embedded binary monitor or any compatible MCU BDM cable with supporting host software
9. program that flashes LED1 and LED2 has been loaded to simulate application code startup The 2K byte serial monitor program provides RS 232 serial interface to host PC The monitor is compatible with Metrowerks CodeWarrior and other serial monitor interface IDE s It is not compatible with ASCII interface pro grams such as hyperterm or AxIDE The monitor supports 23 primitive commands to control the target MCU To allow a user to specify the address of each interrupt service routine this monitor redirects interrupt vectors to an unprotected portion of FLASH just before the protected monitor program The monitor uses the SCIO serial interface to communicate with the host PC The monitor must have exclusive use of the serial port to work correctly This monitor accommodates RS 232 serial communications through SCIO at 115 2 K bps SERIAL MONITOR MEMORY MAP 0x0000 Registers 0x3800 Internal RAM Ox3FFF 0x8000 Fixed Flash EEPROM Block 1 16K bytes OxBFFF visible at RESET 0 000 Fixed Flash EEPROM Block 2 OxF6FF OxF780 User Vectors Relocated OxF7FF User Reset Vector F7FE F7FF 16K bytes OxF800 Vectors OxFFFF Protected NOTE Although the monitor does not support external memory the user can enable external memory accesses in the unfilled areas of the memory map CONFIGURATION The CML 12C32 boots to user application code out of RESET if the p
10. termination requirements RC11 CAN H Bias Resistor Provides bias to ground potential RC12 CAN Termination Resistor Provides end point termination between CAN H and CAN L signal RC13 CAN L Bias Resistor Provides bias to 5V potential LCD PORT The LCD PORT interface is connected to the MCU SPI port and uses a serial shift register to convert the data to parallel interface for LCD input This is necessary due to the fast timing characteristics of the MCU data bus and the slow timing of standard LCD Modules Example LCD Port assembly language driver software is provided on the support CD to demonstrate typical LCD module operation using this technique The installed interface in default configuration supports all OPTREX DMC series and similar displays with up to 80 characters in 4 bit bus mode and provides the most common pinout for a dual row rear mounted display connector The LCD module VEE or contrast potential is set 0 Volts on this board This configuration requires the LCD module be TN style Standard Twist and Reflective to support this VEE potential The Axiom Mfg HC LCD is also compatible The LCD Module is configured for Write only mode It is not possible to read current cursor posi tion or the busy status back from the module Connector J2 located directly adjacent to the installed LCD connector support LCD panels up to 160 characters in 4 bit bus mode To implement a larger LCD panel refer to the J2 descrip tive t
11. 1 Red wireflector 1206 SMT mess Rohm SML 010LTT86 1 Ind 10uH 1210 SMT Vishay IMC1210SY100K 3 tai Quartz 16 OOH 20pF SWT ECS 160 20 5P TR L 24 Reg 5 0V 250mA D Pak T0 262 L4931CDT50 Det SV 40mA 5 pen Drain SOT23 3 DS1813 LV1 Dallas DS1813R 5 CML 12C32 Semiconductor Mii NE Motorola Cypress IDT 29 IC 8b Shift Reg Fateh 14808 1660 STM 30 24C Quad 2 NAND 14 SOIC FAACTO0 ouo Fairchild GN Sipex Philips 37 1 Conn 1x1 Pin Header 1 Ctr Thru Conn 1x2 Pin Header 1 Ctr Thru Conn 1x3 Pin Header 1 Ctr Thru Conn 1x4 Pin Header 1 Ctr Thru Conn 1x8 Pin Header 1 Ctr Thru 42 2 2x2 Pin Header 1 Ctr Thru NO AUTO MEM EN Conn 2x7 Pin Header 1 Ctr Thru Conn 2x3 Pin Header 1 Ctr Thru 46 1 Hdr Socket 2x14 1 Thru Haw Shunt 2 Pos T EE 48 4 Hdw Rubber Bumper 45 x 2 Hemisphere 1 Hdw Proto Board 3 3 x 1 8 1 CML12C32 Board JULY 26 2004 MC9S12C32CFU16 CY62256L 70SNC 74FCT16374ATPV M74HC595B1R 74ACTOOM HIN202CBN SP202ECN PCA82C250TD T 165 40 3010 28
12. 24 34 4 44 D 54 T 64 D 74 t 25 9 35 5 45 55 U 65 E 75 u 26 amp 36 6 46 56 V 66 F 76 v 27 37 7 47 G 57 W 67 G 77 w 28 38 8 48 H 58 X 68 H 78 x 29 39 9 49 59 Y 69 79 y 2A 3A 4A J SA Z 6 J 7A 2 2B 3B 4B 5B 6B 7B 2 3C 4C L 5C Yen 6C 1 7C C 2 3D 540 M 5D 6D M 7D D 2b 4E N 5E SEE n 7E gt 2F 3F 4F 5F 6F o 7F lt MON12 OPERATION The following section describes the operation of the pre loaded MON12 ASCII monitor power on or after RESET the board will produce text message at the connected terminal If no text message is produced the board has been pre loaded with a serial monitor Refer to Appendix A for details on the operation and functionality of the serial monitor Mon12 is an embedded monitor debug utility that allows loading a compiled software program S record into Ram memory for testing and debug The monitor may control the execution of the software by using the SWI software interrupt service Other features allow memory and register locations to be examined or modified Communication with the monitor is provided through the MCU SCIO serial port or COM port the development board Default settings are 38 4 K bps with 8 n 1 bit settings Flow control is not provided so the host PC communication software should be set to None or Hardware flow control AxIDE utility software is recommen
13. 5E JMP OUTSTRG display string at X term with 04 FF61 JMP OUTSTRGO outstrg with no initial FF64 JMP INCHAR wait for and input a char from term FF67 JMP VECINIT initialize RAM vector table MON12 Interrupt Support All interrupt services under MON12 are provided through the ram vector table see the table below Each location in the table is initialized to value of 0000 to cause the trap of an scheduled interrupt Any nonzero value will allow the interrupt to proceed to the user s service routine that should be located at the provided address value Interrupt service delay is plus 21 cycles over standard interrupt service To use vectors specified in the table the user must insert the address of the interrupt service routine during soft ware initialization into the ram interrupt table For an example for the IRQ vector the following is performed Example IRQ Service routine label IRQ_SRV Ram Vector Table address is defined in table below IRQ vector definition EQU 3EF2 define ram table vector location Place IRQ service routine address in the table MOVW SRVVIRQ This vector initialization should remain after debug when auto start will launch the user s appli cation Note that the user interrupt service routines must be located in the 4000 7FFF ad dress range for correct operation See Autostart for more details 23 CML 12C32 Monitor Interrupt Vector Table
14. CML 12C32 Development Board for Freescale 9512 32 Axiom Manufacturing 2813 Industrial Lane Garland TX 75041 Email Sales axman com Web http www axman com CML 12C32 JULY 26 2004 CONTENTS CAUTIONARY NOTES aai 4 TERMINOLO GY dm H 4 FEATUHES Lataa 5 Cizamr cc plo 6 ISEFERENOEDOGUMENTATIGOI tette peu bee cbe tt Rb ecd dee Dee oce 6 INSTALEING THE SOFTWARE ce tate lat latent tate lat latins at ate tette 7 BOARD STARTUP tan dd ttt ur 7 SUPPORT SOFTWARE M a e estos e A 8 SOFTWARE DEVELOPMENT EG 8 TUTORIAE vater 8 CREATING SOURCE CODE vunne bed eee eb 8 ASSEMBLING SOURCE CODE iate e retira ent et ade te re e Ie CERRAR TG 9 EXECUTING AP PUCATIONS NE 10 OPTIONS and JUMPERS 2 snr 11 Muni M tu ical andre 14 dex une nU dU n Ua n LM M hed M Rd DL 14 INO AUTO orans Aae ae 11 RANGE HTA E EE ebrei eh casu dub ciudad dodo aoo 11 JE VPOT QUI SED4 11 J LED EXPANSION detect eate et ead 12 ULM Lm 12 CUFTRACE OPTIONS are tettes ae toe 12 PORTS AND CONNECTORS i eee ann ade eed ences 12 POWER CONNE
15. CTORS Staite tonto Dou ad fed tes died 13 BUS PORT eee 13 BOM PORT tr tes Ee endet ctp HE euet eade Eie epit 13 je M tq E 14 KEYP AD PORT Plukke keen bebe rater eae abo teo 14 COMMUN CAT O NS ete de bote 15 Figure 1 COM Connector 15 GAN PORT Cds nete eet oet LL eL e 15 LED PORT aei EET 16 Figure 2 LCD Connector 16 J2 5 EG DY EXPANSION NE 17 WES PIR OUNT Saddam ed ee 17 TROUBLESHOOTING nedsiden ence 17 TIPS AND SUGGESTIONS LA Ne 18 Utilities ass te 18 Code EXecullofr ek 19 LED COGS steen 19 ECD COMMAND CODES ierat Seeds 19 LED CHARACTER CODES etus Etro EP ees ES FEE eL SE Fit emit SEES EO Hau Eher 20 CML 12C32 JULY 26 2004 MON12 OPERA TION sisccsicttssssasasisceccsievciansastetvetecsendsaiinisanaidnisansesdtornsisaancainatbececs 20 AVTOSTAR mM cem 21 MONT12 MEMORY MAP eoe p RE Ge ROS 21 MON12 MONITOR 22 MONITOR UTILITY JUMP TABLE i odio tosta nem Dena o Nd odd Dt ndi qaod sd 23 MON12 INTERRUPT SUPPORT dad 23 MONITOR INTERRUPT VECTOR Eee Fee EE Ee ERR Ede Fe 24 BDM OPERATION idrns
16. T 1 Simply cut both cut traces and use mod wire to route power as needed To revert to a standard 40 character LCD panel simply remove the installed mod wire and 0 ohm 1206 size resistors across CT6 and CT7 A mod wire jumper across each cut trace will also suffice Refer to the PCB schematic and the OPTREX LCD panel documentation for further details NC 1 2 EN1 LCD enable input 1 LCD enable TEST POINTS The following test points are provided on the development board VDD1 VDD2 2 5V digital logic voltage Derived from the MCU internal voltage regulator XFC MCU PLL reference voltage and filter VDDPLL 2 5V input to PLL 5V Regulated 5 voltage GND Ground plane reference RTS flow control signal Ready To Send TTL CMOS logic level CTS COM 1 flow control signal Clear To Send TTL CMOS logic level RS Slew rate control for CAN Port Vref1 CAN Port reference voltage output TROUBLESHOOTING The CML 12C32 board is fully tested and operational before shipping If it fails to function properly inspect the board for obvious physical damage first Verify the communications setup as described under GETTING STARTED and see the Tips and Suggestions section for more information The most common problems are improperly configured communications parameters and at tempting to use the wrong COM port 1 Verify the power source You should measure a minimum of 6 volts between the GND and VIN connectio
17. The included monitor provides an effective and low cost debug method Note that when a BDM cable is used for debugging the BDM pod should be powered from an external supply A debug monitor is loaded in the MC9512C32 internal flash memory and uses some MCU re sources for operation User application may be executed by loading the program start address into the Reset Vector OxF7FE OxF7FF and loading the program into device Flash Memory The monitor remains in protected flash memory for future use if needed Refer to the MC9S12C32 Reference Manual for details on using a BDM pod with the CSM 12C32 board Refer to Appendix A for a pin out of the BDM PORT connector Reference Documentation Reference documents are provided on the support CD in Acrobat Reader format More infor mation can be found in the Application Notes section of the Motorola Web site CML12C32_SCH_C pdf CML 12C32 Board Schematic Rev B CML12C32_UG pdf CML 12C32 User Guide this document CML12_SerMon phy Serial Monitor Physical Record Object Code File CML12 SerMon sx Serial Monitor S Record Object Code File 9512C32DGV 1 pdf 9512 32 Device User Guide 9512C32 ZIP zip Zip file containing Device Block User Guides AN2548 pdf Serial Monitor Program for 512 MCU s CML 12C32 JULY 26 2004 Installing the Software The following steps will help the user to get started quickly and verify the board is working properly 1 Insert the Axiom 68HC12 support CD in your PC t
18. am code may not as semble correctly CML 12C32 JULY 26 2004 If the source code assembles with no fatal errors 2 output files are created HELLO S19 a Motorola S Record file that can be programmed into memory HELLO LST a common listing file which provides physical address information with resulting opcode and operand information Warnings and error messages are provided with a summary at the end of this file The list LST file is especially helpful when debugging The list file shows each error en countered and its location Fatal errors prevent the output files from being generated A count of errors and warnings encountered can be found at the end of the list file Executing Applications After creating a Motorola S Record file upload it to the development board for a test run The provided example HELLO ASM was created to run from external RAM The embedded monitor can be used to test the program without programming it into Flash If not already completed verify that the CML 12C32 board is connected and operating properly by following the steps under GETTING STARTED until you see the monitor prompt then fol low these steps to run your program 1 Press and release the RESET button on the CML 12C32 board You should see the PRESS ANY KEY message Press the letter E key to get the monitor prompt 2 Type LOAD J This will prepare the embedded monitor to receive a program 3 Click the Upload button and when pro
19. bugging programs stored in RAM see Memory Map After satisfactory operation running under a debugger the program can be written to internal Flash Memory using the included programming utilities The embedded monitor relocates the interrupt vectors to RAM memory and provides an AUTOSTART feature to launch applications Loaded programs will then run automatically whenever the board is powered or RESET is ap plied TUTORIAL This section was written to help the user get started developing software for the CML 12C32 development board Read rest of this User s Guide and additional documentation on the CD for further information The following sections illustrate the complete development cycle for a simple hello world pro gram This program sends the text string Hello World to the serial port The following exam ple assumes the use of the AxIDE interface and the free assembler AS12 Both utilities are provided on the software CD Creating Source Code Source code may be created using any ASCII text editor such as Windows Notepad Note the source file must be simple ASCII text with no document formatting After the source code is written and saved the file must be assembled to a Motorola S Record hex format This type of output file usually has a MOT HEX or S19 file extension and is in a format that can 8 CML 12C32 JULY 26 2004 be read by and programmed into the development board MCU is important the user understa
20. ded for use on a Windows based host PC The monitor relies on resources from the MCU target to provide the monitor environment This includes 16K bytes of flash memory and 512 bytes of internal ram memory The user must re spect the monitor s memory map when using the monitor to help debug code Restricted memory areas Monitor Program space 0 000 OxFFFF Flash Monitor Data space 0x0E00 OxOFFF Internal Ram Monitor Console COM Port and SCIO Monitor use redirects the interrupt vectors through a RAM based interrupt table initializes the SCIO serial port the MCU Flash and EPROM programming clock rates the 8 MHz E clock 20 CML 12C32 JULY 26 2004 and detects auto start enabled operation The MCU memory map is fixed under monitor op eration AUTOSTART The embedded Monitor supports Autostart to launch user application code at Reset If the NO_AUTO jumper is removed at power on the monitor executes program code located at FLASH location 8000 If program code at 8000 fails to execute as expected follow the trou bleshooting tips above to debug The following steps illustrate how to execute user code out of RESET or at power on 1 Relocate application code to address 8000 2 Remove the No_ Auto jumper 3 Apply power or press the RESET button MON12 Memory Map ADDRESS TYPE MEMORY MEMORY APPLICATION Size 0000 MCU Registers Monitor or User access to control registers 1K 03FF by
21. ext below for configuration information Refer to the PCB schematic for further details Figure 2 LCD Connector 5V 2 1 GND SPI data bit definitions to LCD Port RS 4 3 VEE GND DB 7 4 LCD data bits D 3 0 EN 6 5 R W GND DB 3 0 Unused 10K ohm pull downs installed DB1 8 7 080 EN 1 LCD enable DB3 1019 082 R W Read Write pin set to 0 volts Read only DB5 12 11 DB4 EN LCD enable input 1 LCD enable DB7 14 13 086 VEE LCD contrast input set to 0 volts RS Register Select 0 LCD Command 1 LCD Data NOTES 1 The above connector shows connections for a standard 80 character LCD panel 2 The LCD write requires 3 SPI transfers Transfer 1 provides data 0 3 and RS register se lect value Transfer 2 provides the same data with the EN D7 bit set Transfer 3 provides same data with the EN bit clear Resistor R22 can be removed to apply and external VEE potential 4 The LCD Port cannot be isolated from the MCU SPI port 16 CML 12C32 JULY 26 2004 J2 LCD EXPANSION Header J2 allows the use of a 160 character LCD panel Refer to LCD port section above for details on the LCD PORT To implement this option modification wire from J2 2 to the LCD panel must be installed Also the 5V and GND inputs on the LCD PORT connector must be reversed This is accomplished using CT6 and CT7 GND must be connected to LCD PORT 2 and 5V must be connected to LCD POR
22. he setup program does not start execute the file lt D gt SETUP EXE where lt D gt is the drive letter of the CD drive 2 Follow the instructions on screen to install the support software onto your PC At mini mum AxIDE for Windows software should be installed 3 To compile designs correctly the target MCU must be specified within the AxIDE utility Select the CML12C32 MCU target to correctly compile application designs NOTE If CML12C32 is not available select the CML12SDP256 MCU target Board Startup Follow these steps to connect and power on the board for default Monitor operation The fol lowing steps assume use of the AxIDE utility installed in the previous section If a different terminal program is used ensure the communications port settings are set to 9600 bps No parity 8 data bits and 1 stop bit 1 Set the CML 12C32 board Option jumpers to default positions MEM EN ON NOAUTO ON RANGE don t care 2 Connect one end of the supplied 9 pin serial cable to an available serial COM port on your PC Connect the other end of the cable to the COM1 port on the CML 12C32 board 3 Open the AxIDE program 4 Apply power to the board by connecting the power adapter that came with the system 5 If configured properly the message PRESS KEY TO START MONITOR should dis play in the terminal window Press the SPACEBAR and you should see Axiom MON12 HC12 Monitor Debugger V32 0 Type Help for c
23. ias vas 25 APPENDIX A 27 OF MATERIALS E 27 CML 12C32 JULY 26 2004 CAUTIONARY NOTES 1 Electrostatic Discharge ESD prevention measures should be used when handling this product ESD damage is not a warranty repair item 2 Axiom Manufacturing does not assume any liability arising out of the application or use of any product or circuit described herein neither does it convey any license under patent rights or the rights of others 3 EMC Information on the CML 12C32 development board a b This product as shipped from the factory with associated power supplies and cables has been verified to meet with requirements of CE and the FCC as a CLASS B product This product is designed and intended for use as development platform for hardware or software in an educational or professional laboratory In domestic environment this product may cause radio interference in which case the user may be required to take adequate prevention measures Attaching additional wiring to this product or modifying the products operation from the factory default as shipped may effect its performance and cause interference with nearby electronic equipment If such interference is detected suitable mitigating measures should be taken Terminology This development board uses
24. ly LCD Codes LCD Command Codes control the operation of the LCD panel The table below gives each command code its effect and its execution time LCD COMMAND CODES Command Code Delay Clear Display Cursor to Home 01 1 65ms Cursor to Home 02 1 65ms Entry Mode Cursor Decrement Shift off 04 40us Cursor Decrement Shift on 05 40us Cursor Increment Shift off 06 40us Cursor Increment Shift on 07 40us Display Control Display Cursor and Cursor Blink off 08 40us Display on Cursor and Cursor Blink off 0C 40us Display and Cursor on Cursor Blink off 0E 40us Display Cursor and Cursor Blink on 40us LCD Command Codes continued Cursor Display Shift nondestructive move Cursor shift left 10 40us Cursor shift right 14 40us Display shift left 18 40us Display shift right 1C 40us Display Function default 2x40 size 3C 40us Character Generator Ram Address set 40 7F 40us Display Ram Address and set cursor location 80 FF 40us LCD Character Codes are the ASCII representations for the characters displayed on the LCD panel Many ASCII characters cannot be displayed and are used for other purposes The ta ble below lists the ASCII codes that can be displayed and the corresponding character pro duced 19 CML 12C32 JULY 26 2004 LCD Character Codes 20 Space 30 0 40 Time 50 P 60 70 p 21 31 1 41 A 51 Q 61 A 71 q 22 32 2 42 B 52 62 B 72 r 23 33 3 43 C 53 5 63 C 73 s
25. mpted for a file name select your assembled pro gram file in S record format that was created in the previous section called HELLO S19 Your program will be sent to the board through the serial port 4 When finished loading the gt prompt returns Type GO 4000 J This starts program execution at address 4000 This is the starting address of the test program 5 If everything is working properly the message Hello World will echo back to the terminal screen Press RESET to return to the monitor 6 If this message is not displayed on the terminal monitor see the TROUBLESHOOTING section of this manual The Hello World program can be easily modified to display other strings or perform other functions Procedures for assembling uploading and executing program code are the same The embedded monitor many features to support program debug such as breakpoints mem ory dump and modify and simple program trace redirect of the PC is not followed Type HELP at the monitor prompt for a listing of commands or consult the monitor documentation on the disk for more information 10 CML 12C32 JULY 26 2004 OPTIONS and JUMPERS MEM EN The MEM EN option jumper is installed by default and enables access to the external SRAM memory when the MCU is configured for expanded mode operation Removing the MEM EN option jumper disables external memory access MODE The MODE option jumper is not installed on the CML 12C32 board and is hard co
26. nd should be provided by the user if needed or desired I PPO This interface is implemented as a software 2 PP1 key scan Use pins PP 3 0 as active high a a column driver outputs Use pins PP 7 4 as 5 PP4 row inputs Each row input will read high 5 when the associated row is active 7 PP6 8 PP7 14 CML 12C32 JULY 26 2004 COMMUNICATIONS The CML 12C32 board provides a single RS 232 communications port consisting of a 9 pin DSUB connector and an RS 232 transceiver The transceiver U7 provides RS 232 signal level to TTL CMOS logic level translation Serial communications signals TXD and RXD are routed from the transceiver to MCU The remaining signals are available at test points located behind the COM connector RTS has been biased properly to support 2 wire RS 232 commu nications Figure 1 COM1 Connector 1 Female DB9 connector that interfaces to the MCU internal SCI serial port via RS232 transceiver U7 It provides simple 2 6 wire asynchronous serial communications without flow control TXD 2 Flow control is provided at test points on the board 7 RTS RXD 3 2 8 CTS Pins 1 4 and 6 are connected together m 9 GND 5 CAN PORT This port provides CAN Bus interface associated witn MCU CAN channel The port has CAN Transceiver Philips PCA82C250 capable of up to 1M Baud data rate The user may isolate the MCU CAN channel f
27. nd 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 In assembly the ap propriate instruction is LDS SOFFF 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 suppo
28. nnected by circuit copper trace for Single chip Mode operation of the CPU MODA and MODB signals are terminated by this option Single Chip Mode operation is selected by default because the MCU internal flash memory provides the only nonvolatile program memory on the board All other Modes can be enabled under software control from this mode of operation The MODE option jumper may be installed by the user by cutting the circuit trace and installing 2 position header with shunt jumper With the shunt jumper removed the Reset mode will then be Normal Expanded Wide External non volatile memory must be added to support this functionality NO AUTO The NO AUTO jumper prevents the MCU from executing program code at start up Enable automatic program execution by removing this jumper To use the auto start feature the cor rect reset vector must be loaded to point to the location of program code RANGE The CML 12C32 board provides 20 turn 10 precision potentiometer POT with adjust able range for use in circuit prototyping The RANGE jumper selection of output range In stalling the option jumper provides the full range output from the POT from GND to Re moving the option jumper places 10k resistor in series with the POT limiting output from GND to Vpp JP1 POT OUT SEL The JP1 option jumper selects where the destination of the potentiometer The output of the POT may be routed to a MCU analog port input PAD7
29. ns on the TB1 power connector 2 If no voltage is present verify the wall plug connections to 115VAC outlet and the power 17 CML 12C32 JULY 26 2004 connector 3 Verify the logic power source Measure 5VDC between the GND and 5V connections on the TB1 power connector If the VIN supply is present and the 5V output is not pres ent immediately disconnect power from the board Contact support axman com by email for instructions provide board name and problem 4 Make sure that the RESET line is not being held low Measure the voltage level at the RESET signal on the BUS_PORT connector 5 Verify the communications port is working by substituting a known good serial device or by doing a loop back diagnostic 6 Ensure NO_AUTO jumper is installed This will prevent any loaded program from execut ing at power on or RESET 7 Disconnect all external connections to the board except serial cable and the wall plug 8 Verify the presence of a 16MHz clock signal at the EXTAL input pin 9 Contact support axman com by email for further assistance Provide board name and describe problem Tips and Suggestions Following are a number of tips suggestions and answers to commonly asked questions that will solve many problem users have with the CML 12C32 development system You can download the latest software from the Support section of our web page at www axman com Utilities e Make sure all jumpers are set correctly if trying t
30. o program memory or start the utilities e Make sure the serial cable is bi directional and connected securely to both the PC and the board e Make sure the serial cable is connected to the correct serial port e sure the power is supplied to the board Only use a 9 volt 200mA minimum wall adapter or DC power supply set to provide 9V output to the board If applicable make sure the power strip is turned on e Make sure you load your code to an address space that actually exists See the Mem ory Map if you re not sure MCU mode single chip or expanded changes the memory map e f debugging under embedded monitor make sure you re not over writing reserved in ternal SRAM f running in a multi tasking environment such as Windows close all programs in background to reduce the potential for conflicts 18 CML 12C32 JULY 26 2004 Code Execution e Use the GO command to use breakpoints when executing under the monitor Break points may not be acknowledged if the CALL command is used e If using Autostart make sure program code is loaded at address 8000 e When running code stand alone initialize ALL peripherals used by the micro including the Stack Serial Port and pseudo Interrupt vectors etc e Either reset the COP watchdog timer in the main program loop or disable it when not running in monitor or mode The MCU may enable this by default and if not han dled properly the MCU will reset periodical
31. ommands 6 The board is now ready to use If this message prompt is not displayed or if the display is meaningless refer to the TROUBLESHOOTING section at the end of this manual CML 12C32 JULY 26 2004 Support Software There are many programs and documents on the included HC12 support CD that support the CML 12C32 board Install any desired applications from the CD main menu Documentation and example code may be copied directly from the CD AT minimum the AxIDE terminal program should be installed AxIDE provides a simple termi nal interface between the host PC and the CML 12C32 development board The program in tegrates an assembler a flash programming utility and a serial communication interface Also on the disk are free assemblers AS12 and MCU EZ the open source GNU C C com piler tools for HC11 12 example source code and other useful software The introductory tu torial in this manual uses the free AS12 assembler integrated into the AxIDE program This is a simple assembler with limited capability For a more powerful assembly tool install the Mo torola MCUez program from the CD Software Development Software development on the CML 12C32 can be performed using either the embedded monitor installed in the MCU internal FLASH a third party debugger Debug12 NolCE CodeWarrior etc or a Background Debug Module BDM connected to the BDM PORT con nector Any of these tools can be used to assist in creating and de
32. option selection jumpers and cut traces to setup default configu ration Terminology for application of the option jumpers is as follows Jumper a plastic shunt that connects 2 terminals electrically Jumper on in or installed jumper is installed such that 2 pins are connected together Jumper off out or idle jumper is installed on 1 pin only It is recommended that jump ers be idled by installing on 1 pin so they will not be lost Cut Trace a circuit trace connection between component pads The circuit trace may be cut using a razor knife to break the default connection To reconnect the circuit simply install a suitably sized 0 ohm resistor or attach a wire across the pads FEATURES The CML 12C32 development board provides stable development platform for the Motorola 9512 32 MCU The included wall plug DB9 serial cable sample software tools exam and debug monitor makes application development quick and easy background DEBUG port is provided for development tool use and is compatible with HCS12 BDM inter face cables and software This board may be used as stand alone development platform or along with the Axiom Manufacturing Project Board as an enhanced learning environment F
33. rom the transceiver by cut traces CT3 4 and CT5 1 GND The CAN Port connector provides an interface to the 2 MSCAN12 channel in the MCU 3 CAN L 4 5V CAN BUS TRANSMIT ENABLE The CAN port transceiver transmit driver is enabled for maximum drive and minimum slew rate by default The drive and slew rate may be adjusted by cutting cut trace CT6 and adding 1206 size surface mount resistor see the PCA82C250 data sheet for details on resistor value selection CAN Bus Transceiver transmit enable control can be applied to the port using the RS tie pad The user should select an available MCU I O port to perform the transmit enable function and connect it from the MCU_PORT pin to the RS pad as required The transmit enable signal to the CAN transceivers is active low logic NOTE Cut trace CT6 must be open to use the transmit enable control sig nal CAN BUS TERMINATION The CAN port provides RC11 RC12 and RC13 1206 SMT size termination resistor locations on the bottom side of the CML 12C32 board These termination resistors are not installed at 15 CML 12C32 JULY 26 2004 the factory The termination resistors provide optional bias and termination impedance for the CAN bus connected to the CAN Port Type of wire media data rate length of wire and num ber of CAN bus nodes all effect the requirement or value of the termination for the CAN bus User should refer to particular application for
34. rt 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 lt D gt 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 Ax IDE3 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 progr
35. seudo reset F7FE F7FF vector is pro grammed Pressing SW1 after user application code executes has no effect A small demo program to flash LED1 and LED2 has been preloaded at the factory To boot to the serial monitor simply press and hold SW1 while applying power or pressing the RESET button The CML 12C32 will boot to monitor mode if the pseudo reset vector is not programmed also 26 CML 12C32 APPENDIX B JULY 26 2004 BILL OF MATERIALS ltem Qy Me Rem Mfr Mfr P N AE 11 2 Mon 22pF 50 0805 Ct C2 NMCO8NP0220J50M 2 3 Cep Mon 01uF 50V X7R 5 0805 IC4 C9 C12 Meritek MA0805XR103K500 EB ER MEE C5 C10 C19 C21 C22 Meritek MA080525U104M500 C23 C24 C25 C26 C27 C28 C29 C30 4 5 fuF 16V 0805 1014 C15 C16 C17 C18 O 5 4 Cap Tant 10V SMA 107 8 11 20 Ax TAJA106K010R 6 1 Cap Mon 4700pF 0808 Ct Kemet C0805C472K5RACTU Cap Mon 470pF 50V 596 0805 Kemet C0805C471J5GAC7025 R16 R17 R18 R19 R20 R23 R24 R25 R26 9 1 Carbon 100 ohm 5 080 2 O Res Carbon 4 7K ohm 5 0805 Res Carbon 10 Ohm 595 0805 HARE Essa 17 2 Diode Schottky 30V 200mA BAT54C Com Cathode S0T23 0102 Vishay Bat54C 19 Trans Sup 5 0V 600W DO214AA 5 5 DBCS SMBJ5 0CA 20 SILED Green wireflector 1206 SMT_ Pwr LED1 LED2_ Rohm SML 010MTT86
36. tes 0400 External Memory Expanded Mode Development Memory 1K 07FF bytes 0800 Internal RAM Internal RAM memory 1 5K ODFF bytes 0E00 Internal RAM Monitor reserved ram memory Stacks and 0F8B variables 512 Internal RAM Ram Interrupt Vector Table bytes 1000 External RAM Expanded Mode Data Program Memory 28K 7FFF Space bytes 8000 FLASH EEPROM User Program Memory User Autostart Pro 16K BFFF gram Memory Space bytes C000 FLASH EEPROM Protected Monitor Space 16K bytes The monitor relocates hardware interrupt vectors in the monitor data space from OxOFFF The vectors are in the same order as the default hardware table for the MCU located at address see table The Reset vector is reserved user should use Auto Start for to start applications from Reset MON12 operation notes 1 At startup the CML 12C32monitor allows the user to select operating mode at the prompt to select Expanded Mode operation any other key selects Single Chip opera tion 2 The monitor application configures target MCU for 8MHz E clock lower flash block dis abled from memory map and external access clock stretch set to 3 cycles User can in crease clock speed in an application by modifying PLL control and setting new baud rate for serial port Defaults monitor setup returns when the MCU is Reset 21 CML 12C32 JULY 26 2004
37. ved Not Used CT3 MCU Port M1 TXCAN signal to the CAN Controller Interface CT4 MCU Port MO RXCAN signal to the CAN Controller Interface CT5 CAN Port Transceiver Enable The default connections enables device output con stantly This connection enables the CAN Port transceiver output to the CAN bus To use slew rate control or MCU controlled enable on the transceiver this option should be cut and 1206 size resistor installed for slew rate control or a MCU I O port attached for output enable control See the PCA82C250 data sheet for application information CT6 Vcc input to the LCD panel CT7 GND input to the LCD panel PORTS AND CONNECTORS 12 CML 12C32 JULY 26 2004 Power Connectors Power connectors J1 and TB1 provide power input to the board Voltage input should be lim ited to the range of 6VDC to 16VDC with 9VDC typical Voltage should be applied to the board at either J1 or TB1 but not both Applying input voltage to both input connectors at the same time will cause a supply conflict and damage the CML 12C32 may result Connector J1 accepts a standard 2 1mm barrel plug connector with positive voltage center Connector TB1 accepts 18G 24G solid copper wire TB1 may also be used to gain access to on board power levels Vin GND or 5VDC for off board use The 5VDC output may be used to power off board circuitry if desired However the voltage regulator output is internally limited to 250 mA BUS_PORT The
38. xecution Modify CPU Register Contents Trace until address Trace lt count gt instructions 22 CML 12C32 JULY 26 2004 Monitor Utility Jump Table ADDRESS FF10 JMP MAIN warm start FF13 JMP BPCLR clear breakpoint table FF16 JMP RPRINT display user registers FF19 JMP HEXBIN convert ascii hex char to binary FFic JMP BUFFARG build hex argument from buffer read argument from terminal FF22 JMP CHGBYT modify memory byte at address in x FF25 JMP CHGWORD modify memory word at address in x FF28 JMP READBUFF read character from buffer FF2B JMP INCBUFF increment buffer pointer FF2E JMP DECBUFF decrement buffer pointer FF31 JMP WSKIP find non whitespace char in buffer FF34 JMP CHKABRT check for abort from terminal FF37 JMP UPCASE convert to upper case FF3A JMP WCHEK check for white space FF3D JMP DCHEK check for delimeter FF40 JMP ONSCIO initialize i o device FF43 JMP INPUT low level input routine FF46 JMP OUTPUT low level output routine FF49 JMP OUTLHLF display top 4 bits as hex digit FF4C JMP OUTRHLF display bottom 4 bits as hex digit FF4F JMP OUTA output ascii character in FF52 JMP OUT1BYT display the hex value of byte at X FF55 JMP OUT1BSP out1 byt followed by space FF58 JMP OUT2BSP display 2 hex bytes word at x and space FF5B JMP OUTCRLF carriage return line feed to terminal FF

Download Pdf Manuals

image

Related Search

Related Contents

Tecumseh AVA2515ZXNXF Performance Data Sheet  User Manual - Visual Enhancements  

Copyright © All rights reserved.
Failed to retrieve file