Home

Motorola 68000202881-A Cell Phone User Manual

image

Contents

1. 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 RESET Vector Address CONFIG SWITCH 1 2 3 4 ON ON ON ON External EPROM U6 7 Debug12 ON ON ON OFF External SRAM U4 5 OFF OFF OFF OFF Internal Flash EEPROM External RAM in U4 5 with CONFIG 1 4 ON HC12 Internal EEPROM External RAM in U4 5 with CONFIG 1 4 ON Internal RAM External RAM in U4 5 with CONFIG 1 4 ON Peripheral Area Unused 280 3FF CS5 250 25F CS2 220 22F LCD CS7 270 27F CS4 240 24F CS1 210 21F CS6 260 26F CS3 230 23F CSO 200 20F 68HC12 Internal Registers See 68HC12 Technical Reference Manual CONFIG SWITCH The CME 12B BC board is shipped from the manufacturer with the following default CONFIG SWITCH settings 1 2 3 4 5 6 7 8 ON ON ON ON OFF ON OFF OFF The 8 position CONFIG SWITCH provides an easy method of configuring the CME 12B BC32 board operation Following are the configuration switch descriptions and HC12 WO port usage CONFIG Pe SWITCH OPERATION when in ON position HC12 I O PORT USED MODE A selection see Mode chart MODA PER below PE6 A 1 2 MODE B selection see Mode chart MODB below 6 RXD Serial Port RXD input enable PS0 RXD_ 8 PC1 CAN Port TX enable DG Enables memory bus operation for access to board memory Expande
2. 8 bit access narrow bus WE Memory Write Enable signal Active Low Valid with ECLK high and R W low IRQ HC12 IRQ PE1 Interrupt Input RW HC12 Read Write DEZ control signal E HC12 ECLK PE4 bus clock signal Stretch should be enabled in software P SEL Selects Peripheral area register following space 8 bits wide RESET HC12 active low RESET signal 13 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 GND See the HC12 Technical Reference Manual for complete RESET documentation of the BDM 5V A Background Debug Module is available from the manufacturer The BDM OUT port is provided on the board for Motorola MC68HC912B32 EVU Board compatibility Consult the EVU board documentation for usage information EVU Compatibility J umpers The EVB H3 and EVB H4 jumpers provide backward compatibility with the Flash Options on the Motorola MC68HC912B32 EVU Board These can be installed by the user and the Debug12 s19 file programmed into the Internal Flash EPROM for EVU similar operation of the development board Normally this is not necessary due to the Utilities provided in the UTL12 EPROM s 14 TROUBLESHOOTING The CME 12B BC board is fully tested and operational before
3. gt prompt again Type CALL 1000 J This tells D Bug12 to execute the subroutine at address 1000 which is the start of our test program 5 If everything is working properly you should see the message Hello World echoed back to your terminal screen then since we return at then end of our program a line containing the internal register status displayed by D Bug12 and a message prompt 6 If you do not get this message try going thru this tutorial once more then if still no go see the TROUBLESHOOTING section in this manual You can modify the hello program to display other strings or do anything you want The procedures for assembling your code uploading it to the board and executing it remain the same D Bugi2 has many powerful features such as breakpoints assembly disassembly memory dump and modify and program trace Type HELP at the D Bug12 prompt for a listing of commands or consult the D Bug12 documentation on the disk for more information Programming Flash EEPROM You can program your application into EEPROM so it executes automatically when you apply power to the board as follows 1 10 11 12 13 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 Remove the comment character from before the following line to initialize the stack pointer which is neces
4. CME 12B BC Development Board for Motorola 68HC12B32 and 68HC12BC32 Microcontrollers 4 xiom nufacturing a A 2000 2813 Industrial Ln e Garland TX 75041 e 972 926 9303 FAX 972 926 6063 email Gary axman com e web http Awww axman com CONTENTS GETTING STARTED 25 sssicsoncassssussnsussepastsvnsnsnsniciavenopencasnisisneneatvssopentuvvapasencastesesnnts 3 deiere 3 BOald otal Oi islet i ee ee ee ee eet 3 lernen 4 enee En EE 4 TEAM eeteeeeeegeegteeee eege ee ee eege 5 Creating source code fas ci eee eA cee ae te aed 5 Assembling ee E 6 Running your application WEE 7 Programming Flash EPROM E 8 OA nA E A E 9 CONFIG SWITCH ios ecicsssieisistsscascinscsvsissnsnvnsssassisnthvassisenvncssneskistacsssuncavadsenceestavnsseecevs 10 MEM SEL JUMPERS sssaannnsunnnennnnnnennnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn nnmnnn nnmnnn nnmnnn nnmnnn 10 PORTS AND SONNEGIOHRESeeeed eege eege 11 LOD PORT RE 11 KEYPAD EE 11 MCU PORT eiin ein o E 12 CANMPOR RE 12 COMT SERIAL PORT srann a a 13 EE 13 BU SO POR EE 13 E EE 14 EVU Compatibility il 14 TROUBLESHOOTING EE 15 Code Execution ccccccccceeceescccneeeeeeeeeeeeecaaeeeeeeeseeeessaaeeeeees 16 TABLE E ccscbestecissceecadsscteceislasssncteecsasnupsssedadewatassivausenatescteadwesnusnuseasiscdenss 17 TABLE 1 LCD Command Codes anwain ahaa iat makes 17 TABLE 2 LCD Character COG6S ira ssa Eege 17 TABLE 3 D Bug12 Monitor Commande 18 GETTING STARTED The Axiom CME 12B BC single boar
5. D4 27C amp 27D LCD3 278 amp 279 KEY PAD 1 PS4 The KEYPAD connector is a passive 8 pin connector that can be used to 2 PS5 connect a 4 x 4 matrix 16 key keypad device The connector is mapped to 3 PS6 the HC12 I O ports S and P This interface is implemented as a software 4 PS7 keyscan Pins PS4 7 are used as column drivers which are active low C5 PP4 outputs Pins PP4 7 are used for row input and provide an idle hi condition l6 PP5 with internal pull ups to provide active key detection under software control 7 PP6 8 PP7 See the HC12 Technical Reference Manual for a full description of these pins and the file KEYLCD12 ASM for an example program using this connector 11 MCU PORT The MCU_PORT provides access to the peripheral features and I O lines of the HC12 as follows A15 DO D7 Low Byte of the Data Bus in Wide Expanded D1 Mode Port B in Single Chip Mode D3 D5 XIRQ HC12 XIRQ interrupt input D7 VFP Programming voltage 12v when VPP_EN jumper is XIRQ DBE d LSTRB o l VRL LSTRB HC12 LSTRB PE3 output indicates 8 bit bus GND access Should be enabled in software for bus use Ge Ge PPO PP7 HC12 Port P I O or PWM port PP3 7 also PADA PADS used by the KEYPAD Port PAD6 PAD7 PTO PT7 HC12 Port T UO or Timer port P PEAD VRH VRL HC12 A D Converter Reference Pins See PS5 A D Reference Section PS7 PADO PAD7 HC12 Port AD is an input port or the A D PCS Conver
6. F 10 14 18 1c 3C 40 S7F Delay 1 65ms 1 65ms 40us 40us 40us 40us 40us 40us 40us 40us 40us 40us 40us 40us 40us 40us 80 SFF 40us TABLE 2 LCD Character Codes 20 21 22 23 24 25 26 27 28 29 2A 2B 2C Space o ge Oe 2D 2E 2F 30 31 32 33 34 35 36 37 38 39 OO JO OP Go cO 3A 3B 3C 3D 3E 3F 40 41 42 43 44 45 46 TAMODQWDPAVY TI 3 D 47 48 49 4A 4B 4C 4D 4E 4F 50 51 52 53 ADOVOZETAOS LO 54 55 56 57 58 59 5A 5B 5C 5D 5E 5F 60 17 ee gt lt N lt amp X Oo bel 61 62 63 64 65 66 67 68 69 6A 6B 6C 6D x IO e OD OO oD 3 6E 6F 70 71 72 73 74 75 76 77 78 79 7A Hrs XS lt CTFHTOTOS 7B 7C 7D 7E 7F AY SSH TABLE 3 D Bug12 Monitor Commands ASM lt Address gt Single line assembler disassembler lt CR gt Disassemble next instruction lt gt Exit assembly disassembly BAUD lt baudrate gt Set communications rate for the terminal BF lt StartAddress gt lt EndAddress gt Fill memory with data lt data gt BR lt Address gt Set Display user breakpoints BULK Erase entire on chip EEPROM contents CALL lt Address gt Call user subroutine at lt Address gt DEVICE lt DevName gt lt Add
7. ain loop of your code or disable it when not running under MBug or BDM mode The micro enables this by default and if you don t handle it your code will reset every couple of ms ImageCraft C e Your make or build should create a MAP file Some versions change this to a MP file At the top of this file should be a label _ START This is where you should CALL or GO to when debugging in D Bug12 16 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 Command Clear Display Cursor to Home Cursor to Home Entry Mode Cursor Decrement Shift off Cursor Decrement Shift on Character Generator Ram Address set Display Ram Address set Cursor Increment Shift off Cursor Increment Shift on Display Control Display Cursor and Cursor Blink off Display on Cursor and Cursor Blink off Display and Cursor on Cursor Blink off Display Cursor and Cursor Blink on Cursor Display Shift nondestructive move Cursor shift left Cursor shift right Display shift left Display shift right Display Function default 2x40 size Code 01 02 04 05 06 07 08 0c SOE SO
8. d bus must be on for proper operation Enables monitor EPROM s in memory map at 0x8000 FFFF hex if CONFIG SWITCH position 3 is also on When in off position memory space is SRAM for BDM use MODE CHART Single Chip Mode A and B OFF Expanded Wide Mode A and B ON MEM SEL J UMPERS Memory sockets U4 5 are shipped with 32K byte RAM devices U6 7 are shipped with 32K byte EPROM devices programmed with the D bug12 monitor IN enables RAM or EEPROM 32K devices to U6 7 1 3 IN enables RAM or EEPROM 8K devices in U6 7 2 4 IN enables EPROM 8K or 32K devices in U6 7 Default 10 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 Command Register 270 Data Register 271 LCD Vee is supplied by U13 and is adjusted by the R18 Potentiometer adjustable resistor See the file KEYLCD12 AsM for an example program using this LCD connector LCD3 2 1 LCD2 Additional lines can be used as enables for larger panels and IECH are mapped as LCD2 274 amp 275 LC
9. d 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 If the setup program does not start run the file called SETUP EXE on the disk 2 Follow the instructions on screen to install the support software onto your PC 3 The flash programming utilities require you to specify the board you are using You should select either CME 12B32 or CME 12B BC for this board Board Startup Follow these steps to connect and power on the board This assumes you re using the provided AXIDE or AX12 terminal program installed in the previous section or a similar communications terminal program on your PC If you re using a different terminal program than the one provided set it s parameters to 9600 baud N 8 1 1 Make certain the CONFIG SWITCH is set as follows fi 2 3 4 5 6 7 8 2 Connect one end of the supplied 9 pin serial cable to a free COM port on your PC Connect the other end of the cable to the COM1 port on the CME 12B BC board 3 Apply power to the board by plugging in the power adapter that came with the system 4 I
10. d data Source code created to run under the D bug12 monitor environment will be slightly different than code written for stand alone operation The monitor contains interrupt and RESET vectors that your code must provide when it s no longer running under the monitor See the Programming Flash EEPROM section for more information on this 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 The programming utilities provided with this board also contain a simple interface to the free assembler Use it by selecting Build or Assembler from the menu This will prompt you for the file to be assembled DO NOT use long path names gt 8 characters The free assembler is an old DOS tool that does not recognize them If there are no errors in your source code 2 output files will be created HELLO S19 a Motorola S Record file that can be programmed into memory HELLO LST a common listing file which shows the relationship between source and output The listing file is especially helpful to look at when debugging your program If your program
11. ebugging your program stored in either internal RAM 800 CO0 or external RAM U4 U5 see Memory Map After satisfactory operation running under a debugger your program can be written to the Internal Flash Memory by relocating its start address to 8000 and programming it using either the included programming utilities or a BDM Your program will then run automatically whenever the board is powered on or RESET is applied Option jumpers and switches on the board allow for easy transition from one memory type to another and restoring an operating monitor 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 Creating source code You can write source code for the CME 12B BC board using any language that compiles to Motorola 68HC12 instructions Included on the software disk is a free Assembler and also a freeware C compiler and Basic compiler You can write your source code using any ASCII text editor You can use the free EDIT or NOTEPAD programs that come with your computer A better code editor can be downloaded at http www winedit com Once your source code is written and saved to a file you can assemble or c
12. f 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 D Bug12 v2 0 2 Copyright 1996 1997 Motorola Semiconductor For Commands type Help gt 5 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 3 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 These programs also include a simple Terminal for interfacing with other programs running on the CME 12B BC such as the D Bug12 and information from your own programs that send output to the serial port Also on the disk is a free assembler example source code and other tools to get you started Software Development Software development on the CME12B32 can be performed using either the DBUG12 monitor utility installed in EPROM sockets U6 U7 the DBUG12 monitor programmed into the internal Flash EPROM or a Background Debug Module BDM connected to the BDM IN connector Any of these tools can be used to assist in creating and d
13. has errors they will be displayed and no output will be generated otherwise the listing file will be displayed If you prefer a windows integrated programming environment try the Motorola MCU EZ tools Refer to the MCU EZ documentation on the disk for more information Also a port for the free GNU C compiler and tools for the HC12 is in the works and may be finished as you read this Check www axman com or http nome worldnet fr stcarrez m68hc1 1_port html 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 D Bug12 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 Press and release the RESET button on the CME 12B BC board You should see the PRESS ANY KEY message Hit the return key to get the monitor prompt 2 Type LOAD J This will prepare D Bug12 to receive a program 3 Select Upload or Send and when prompted for a file name select your assembled program file in s record format that was created in the previous section called HELLO S19 Your program will be sent to the board thru the serial port 4 When finished loading you will see the
14. isplay lt EndAddress gt USEHBR Use Hardware Breakpoints VERF lt AddressOffset gt Verify S Records against memory contents lt Register Name gt lt Register Value gt Set register contents Register Names PC SP X Y A B D CCR Status Bits S XM H IM N Z V C 18
15. ompile it 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 be read by the programming utilities to be programmed into the CME 12B BC board It s important to understand your development board s use of Memory and Addressing when writing source code so you can locate your code at valid addresses For example when in debug mode you should put your program CODE in External RAM In assembly language you do this with ORG statements in your source code Any lines following an ORG statement will begin at that ORG location which is the first number following the word ORG for example ORG 2000 You must start your DATA or variables in a RAM location unused by your program for example ORG 1000 When finished debugging you must change these ORG statements so that your program is moved to a valid EEPROM area somewhere after hex 8000 Do this by putting an ORG 8000 in front of your Program CODE Data may remain where it is or be moved down to internal RAM starting at ORG 800 You must also program the STACK register somewhere at the top of your available RAM for example hex BFF Do this with this instruction as the first instruction in your program code LDS 0BFF A look at the example programs on the disk can make all of this clearer If you re using a compiler instead of an assembler consult the compiler documentation for methods used to locate your code an
16. ress gt lt Address gt display select add target device EEBASE lt Address gt Set base address of on chip EEPROM FBULK Erase entire target FLASH contents FLOAD lt AddressOffset gt Load S Records into target FLASH G lt Address gt Begin continue execution of user code GT lt Address gt Set temporary breakpoint at lt Address gt amp execute user code HELP Display this D Bugi2 command summary LOAD lt AddressOffset gt Load S Records into memory MD lt StartAddress gt lt EndAddress gt Memory Display Bytes MDW lt StartAddress gt lt EndAddress gt Memory Display Words MM lt StartAddress gt Modify Memory Bytes lt CR gt Examine Modify next location lt gt or lt gt Examine Modify same location lt gt or lt gt Examine Modify previous location lt gt Exit Modify Memory command MMW lt StartAddress gt Modify Memory Words same subcommands as MM MOVE lt StartAddress gt lt EndAddress gt lt DestAddress gt Move a block of memory NOBR lt address gt Remove One All Breakpoint s RD Display all CPU registers REGBASE lt Address gt Set base address of I O registers RESET Reset target CPU RM Modify CPU Register Contents STOP Stop target CPU T lt count gt Trace lt count gt instructions UPLOAD lt StartAddress gt S Record Memory d
17. sary when running outside of D Bug12 LDS C00 initialize the stack pointer Add acomment character to the beginning of the first RTS statement which will cause the program to end gracefully with an endless loop 7 RTS return use this only if called from monitor bra ENDPROG endless loop Remove the comment character from before the following 2 lines at the end to set the reset vector to go to the beginning of the program the label START when powered on org fffe reset vector fdb START Re Assemble HELLO ASM as described in the Assembling Source Code section Select CME12BC under AxIDE Select the Program option and when prompted for a file name enter the new HELLO S19 file then select OK Set the CONFIG SWITCH positions 1 2 3 4 and 6 to ON Press the RESET button on the board then select Continue or hit ENTER A new utilities menu should be displayed If you have trouble here see the TROUBLESHOOTING section Set the CONFIG SWITCH position 5 ON The red VPP light should come on When prompted to Erase choose Yes When finished programming set the CONFIG SWITCH positions 1 2 3 4 and 5 OFF The VPP light should turn off Cycle power or press RESET on the board Your new program should start automatically and the Hello World prompt should be displayed in the terminal window To return to the D Bug12 monitor program set the CONFIG SWITCH positions 1 2 3 and 4 back ON then press RESET
18. 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 Verify that your communications port is working by substituting a known good serial device or by doing a loop back diagnostic 2 Verify the jumpers on the board are installed correctly 3 Verify the power source You should measure approximately 9 volts between the GND and 9V test point pads on the board 4 If no voltage is found verify the wall plug connections to 115VAC outlet and the power connector 5 Disconnect all external connections to the board except for COM1 to the PC and the wall plug 6 Make sure that the RESET line is not being held low Check for this by measuring the RESET pin on P4 for 5V 7 Verify the presence of an 8MHz sine wave on the crystal or 2MHz E clock signal if possible 15 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
19. ter inputs PC3 PC1 TXCAN PSO PS7 HC12 Port S I O or Serial Port lines PS4 7 PCO RXCAN PP7 also used by the KEYPAD Port RXD TXD Serial Port SCI receive and transmit pins PP PCO PC7 HC12 PDLC I O or CAN lines PT1 PT3 PT5 PT7 GND GND CAN PORT 1 GND The CAN_PORT connector provides an interface to the MSCAN12 on 2 CAN H _ the microcontroller See the MC68HC912BC32 data sheet for 3 CAN L information on using this peripheral 4 5V 12 COM1 SERIAL PORT 1 The COM 1 port has a Female DB9 connector that interfaces to TXDO 2 6 the HC12 internal SCIO serial port It uses a simple 2 wire RXD0 3 7 asynchronous serial interface 4 8 GND 5 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 J 2 T2IN The J2 connector near COM1 contains spare RS232 translator inputs R2OUT and outputs It can be used for implementing hardware handshaking on DAIN COM1 if necessary T2OUT aloln BUS PORT The BUS_PORT supports off board memory devices as follows D8 D15 High Byte Data Bus in Wide Expanded Mode and Peripheral 8 bit data bus Port A in Single Chip Mode AO A15 Memory Addresses 0 to 15 OE Memory Output Enable signal Active Low Valid with ECLK and R W high CS0 CS7 Peripheral chip selects 16 bytes each located at 200 27F hex
20. to program memory or start the HC12 Utilities make sure all jumpers and CONFIG SWITCH settings are correct Be certain that the data cable you re using is bi directional and is connected securely to both the PC and the board Also make sure you are using the correct serial port Make sure the correct power is supplied to the board You should only use a 9 volt 300 mA adapter or power supply If you re using a power strip make sure it is turned on Make sure you load your code to an address space that actually exists See the Memory Map if you re not sure Make sure you re not over writing memory used by the monitor program If you re running in a multi tasking environment such as Windows close all programs in the background to be certain no serial conflict occurs Code Execution Make sure the CONFIG SWITCH is set for the proper mode If executing from the BDM you should turn switches 1 4 OFF If debugging from internal flash EEPROM disable any reset macro s If you re using D Bug12 breakpoints may not be acknowledged if you use the CALL command You should use one of the GO command instead Check the HC12 reset vector located at FFFEh FFFFh These 2 bytes contain the address where execution will begin when the unit is powered on When running your code stand alone you must initialize ALL peripherals used by the micro including the Stack Serial Port etc You must either reset the COP watchdog timer in the m

Download Pdf Manuals

image

Related Search

Related Contents

DM18G43  Nexus 21 Two-Way NX1000 User's Manual  handleiding  安全データシート  DUVRI - Master  QUESTIONNAIRE DN4 - Institut Upsa de la Douleur  MemoryStar BOXX Manual  認知された規格に従 JIST14971:医療機器− 年3月10自薬食発第 条  Atlas.ti manual  Manuel de formation destiné aux personnes effectuant des  

Copyright © All rights reserved.
Failed to retrieve file