Motorola CME-12D60 manual Programming Flash Eeprom, Lds, Start

Page 8

Programming 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. Remove the comment ; character before the following line to initialize the stack pointer which is necessary when running outside of a debugger:

LDS

#$7FE ; initialize the stack pointer

2.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

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.Set the CONFIG SWITCH positions 1-5 all ON. The red VPP light should come on.

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

7.When finished programming, REMOVE POWER then set the CONFIG SWITCH positions 1-5 all OFF. The VPP light should turn off.

8.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, set the CONFIG SWITCH positions 1-4 all back ON then press RESET.

8

Image 8
Contents CME-12D60 Contents Installing the Software Getting StartedBoard Startup OFFSupport Software Software DevelopmentORG $FFFE TutorialCreating source code Assembling source code AS12 HELLO.ASM -LHELLORunning your application Start Programming Flash EepromLDS Memory MAP Peripheral Area see note 2 belowConfig Switch ConfigSwitch Mode ChartJumpers MON-SEL JumperPgpull / Phpull Jumpers JP1 Oscillator Select JumperPorts and Connectors LcdportKeypad GNDGND CAN-H CAN-L McuportCanport COM1 COM2Analog Port TXD0 RXD0 GNDReset BusportBDM-IN Bgnd GNDTroubleshooting Tips and Suggestions UtilitiesLCD Character Codes LCD Command CodesTables Help Mon12 Monitor CommandsBulk