Motorola MC9S12DP256, CML12S-DP256 manual Programming HCS12 Flash EEprom, Auto

Page 8

C M L 1 2 S D P 2 5 6

0 7 / 1 7 / 0 2

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. MON12 has many features such as breakpoints, memory dump and modify and simple program trace (no redirect of the PC is followed). Type HELP at the MON12 prompt for a listing of commands or consult the Mon12 documentation on the disk for more information.

For a more powerful debugger with many advanced features such as source level debugging, you can use the NoICE debugger software. A full-featured demo version is provided on the CD, which you can use to get started. NOTE: To use this program instead of MON12 you must set the Autostart, see the NOICE chapter for details.

Programming HCS12 Flash EEprom

After debugging, you can program your application into Flash Memory so it executes automatically when you apply power to the board as follows:

1.Make a backup copy of HELLO.ASM then use a text editor to modify it.

2.Remove the comment ';' character before one of the following lines to initialize the stack pointer which is necessary when running outside of a debugger:

LDS

#$3F80 ; initialize stack location…

3.Re-Assemble HELLO.ASM as described in the "Assembling Source Code" section.

4.Select Program from the AxIDE menu and follow the message prompts. When prompted for a file name, enter the new HELLO.S19 file.

5.Press the RESET button on the board before clicking OK. When prompted to Erase, choose Yes.

6.When finished programming, Reset the board to get the Monitor prompt again. Use the monitor AUTO command to set the Autostart Reset vector:

>AUTO 4000

AutoStart ON, effective address = 4000

>

7.Verify AUTO OFF option jumper is not installed. (Spare jumper on revision C boards)

8.RESET or re-apply Power to the board. Your new program should start automatically and the “Hello World” prompt should be displayed in the terminal window.

To return to the MON12 monitor program, install the AUTO OFF option jumper then press RESET. Execute the monitor command NOAUTO to disable the Autostart and allow removal of the Auto Off option jumper for normal operation.

8

Image 8
Contents CML12S-DP256 Contents Getting Started Installing the Software Board StartupSupport Software Modc = Out, JP2 = do not care, see COM PortsCreating Source Code TutorialSoftware Development Assembling source code AS12 HELLO.ASM -L HelloRunning your application Programming HCS12 Flash EEprom AutoMON12 Operation MON12 operation notesMovw #IRQSRV,VIRQ Mon12 Monitor CommandsMON12 Interrupt Support Noice Operation MON12 and Noice Memory MapClock frequency = 24MHz BDM OperationAutostart Memen ECSModc Auto OFF / spareMode OscselPorts and Connectors TB1 and J1 PowerJP1 and JP2 CUT-AWAY Options 1Mcuport Analog PortBusport Keypad / Port HPCOM1 and PCOM2 6 connected and 7,8 connectedCan Port PCOM2 pin connectionsCAN-H CAN-LLcdport Lcdport ConnectorP1 P4 HCS12 Header Ring BDM Port Test PointsSee the HC12 Technical Reference Manual for complete Documentation of the BDMTroubleshooting Tips and Suggestions Code Delay LCD Command and Character CodesCommand MON12 Interrupt Table