background image

2

CONTENTS

CONTENTS

GETTING STARTED ............................................................................................3

Installing the Software..................................................................... 3

Board Startup .................................................................................. 3

Support Software ............................................................................ 4

Software Development .................................................................... 4

TUTORIAL............................................................................................................5

Creating source code ...................................................................... 5

Assembling source code ................................................................. 6

Running your application ................................................................ 7

Programming Flash EEPROM......................................................... 8

MEMORY MAP .....................................................................................................9

CONFIG SWITCH ...............................................................................................10

MEM-SEL JUMPERS .........................................................................................10

PORTS AND CONNECTORS ............................................................................11

LCD_PORT ................................................................................... 11

KEYPAD........................................................................................ 11

MCU_PORT .................................................................................. 12

CAN_PORT................................................................................... 12

COM1 SERIAL PORT ................................................................... 13

J2 .................................................................................................. 13

BUS_PORT ................................................................................... 13

BDM-IN ......................................................................................... 14

EVU Compatibility Jumpers........................................................... 14

TROUBLESHOOTING .......................................................................................15

Code Execution ...................................................................... 16

TABLES..............................................................................................................17

TABLE 1.  LCD Command Codes ................................................. 17

TABLE 2.  LCD Character Codes.................................................. 17

TABLE 3.  D-Bug12 Monitor Commands....................................... 18

Содержание CME-12B

Страница 1: ...13 Industrial Ln Garland TX 75041 972 926 9303 FAX 972 926 6063 email Gary axman com web http www axman com xiom anufacturing CME 12B BC Development Board for Motorola 68HC12B32 and 68HC12BC32 Microcontrollers ...

Страница 2: ...ng your application 7 Programming Flash EEPROM 8 MEMORY MAP 9 CONFIG SWITCH 10 MEM SEL JUMPERS 10 PORTS AND CONNECTORS 11 LCD_PORT 11 KEYPAD 11 MCU_PORT 12 CAN_PORT 12 COM1 SERIAL PORT 13 J2 13 BUS_PORT 13 BDM IN 14 EVU Compatibility Jumpers 14 TROUBLESHOOTING 15 Code Execution 16 TABLES 17 TABLE 1 LCD Command Codes 17 TABLE 2 LCD Character Codes 17 TABLE 3 D Bug12 Monitor Commands 18 ...

Страница 3: ...teps 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 1 2 3 4 5 6 7 8 ON ON ON ON OFF ON OFF OFF 2...

Страница 4: ...d 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 debugging your program stored in either internal RAM 800 C00 or ex...

Страница 5: ...cate 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 pro...

Страница 6: ...th names 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...

Страница 7: ...LLO S19 Your program will be sent to the board thru the serial port 4 When finished loading you will see the prompt again Type CALL 1000 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 li...

Страница 8: ...ector to go to the beginning of the program the label START when powered on org fffe reset vector fdb START 5 Re Assemble HELLO ASM as described in the Assembling Source Code section 6 Select CME12BC under AxIDE 7 Select the Program option and when prompted for a file name enter the new HELLO S19 file then select OK 8 Set the CONFIG SWITCH positions 1 2 3 4 and 6 to ON 9 Press the RESET button on ...

Страница 9: ...7 Debug12 ON ON ON OFF External SRAM U4 5 OFF OFF OFF OFF Internal Flash EEPROM 7FFF 1000 External RAM in U4 5 with CONFIG 1 4 ON FFF D00 HC12 Internal EEPROM CFF C00 External RAM in U4 5 with CONFIG 1 4 ON BFF 800 Internal RAM 7FF 400 External RAM in U4 5 with CONFIG 1 4 ON Peripheral Area 3FF 200 Unused 280 3FF LCD CS7 270 27F CS6 260 26F CS5 250 25F CS4 240 24F CS3 230 23F CS2 220 22F CS1 210 2...

Страница 10: ...5 VPP Flash VPP voltage enable N A 6 RXD Serial Port RXD input enable PS0 RXD 7 PC0 CAN Port RXCAN enable PC0 8 PC1 CAN Port TX enable PC2 1 Enables memory bus operation for access to board memory Expanded bus must be on for proper operation 2 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 C...

Страница 11: ...iometer adjustable resistor See the file KEYLCD12 ASM for an example program using this LCD connector LCD3 2 1 LCD2 4 3 LCD4 Additional lines can be used as enables for larger panels and are mapped as LCD2 274 275 LCD4 27C 27D LCD3 278 279 KEYPAD 1 PS4 2 PS5 3 PS6 4 PS7 5 PP4 6 PP5 7 PP6 8 PP7 The KEYPAD connector is a passive 8 pin connector that can be used to connect a 4 x 4 matrix 16 key keypa...

Страница 12: ... Single Chip Mode XIRQ HC12 XIRQ interrupt input VFP Programming voltage 12v when VPP_EN jumper is on LSTRB HC12 LSTRB PE3 output indicates 8 bit bus access Should be enabled in software for bus use PP0 PP7 HC12 Port P I O or PWM port PP3 7 also used by the KEYPAD Port PT0 PT7 HC12 Port T I O or Timer port VRH VRL HC12 A D Converter Reference Pins See A D Reference Section PAD0 PAD7 HC12 Port AD i...

Страница 13: ... D10 3 4 D12 D9 5 6 D13 D8 7 8 D14 A0 9 10 D15 A1 11 12 A2 A10 13 14 A3 OE 15 16 A4 A11 17 18 A5 A9 19 20 A6 A8 21 22 A7 A12 23 24 A13 WE 25 26 CS0 CS1 27 28 CS2 CS3 29 30 CS4 CS5 31 32 IRQ 5V 33 34 P SEL RW 35 36 CS6 E 37 38 CS7 GND 39 40 RESET D8 D15 High Byte Data Bus in Wide Expanded Mode and Peripheral 8 bit data bus Port A in Single Chip Mode A0 A15 Memory Addresses 0 to 15 OE Memory Output ...

Страница 14: ...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 Jumpers 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 t...

Страница 15: ...rt 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 con...

Страница 16: ...ing 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 CA...

Страница 17: ...ink 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 0F 40us 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 ...

Страница 18: ...d summary LOAD AddressOffset Load S Records into memory MD StartAddress EndAddress Memory Display Bytes MDW StartAddress EndAddress Memory Display Words MM StartAddress Modify Memory Bytes CR Examine Modify next location or Examine Modify same location or Examine Modify previous location Exit Modify Memory command MMW StartAddress Modify Memory Words same subcommands as MM MOVE StartAddress EndAdd...

Отзывы: