User`s manual

The option a) will erase the D-Bug12 portion of flash memory, not the bootloader itself.
The option b) will program the D-Bug12 portion of flash memory, not the bootloader itself.
The file to be programmed into flash memory must be an s2-record file. If your assembler
and compiler generate s1-record files only, you must convert an s1-record file to an s-2
record file before programming flash memory with the bootloader.
The option c) will set a new baud rate.
The option d) will erase all on-chip EEPROM.
Note: Quite a few users would accidentally erase the D-Bug12 monitor when entering this
mode, so it’s important to know how to re-program the D-Bug12 monitor.
To program flash memory with the D-Bug12 monitor:
1. Enter the option a) to erase D-Bug12 portion of flash memory. Wait until the
bootloader menu re-appears after flash memory is erased.
2. Enter the option b), the bootloader will wait for your file. Do not type any thing on
keyboard.
3. Click the Build button, select the Download option, and select the file named
DBug12v32_MDP3_16MHz .s29 located in the folder named “D-Bug12_Monitor” for
downloading. You should see the following on the screen:
*****************************************************************************
*****************************************************************************
*****************************************************************************
*****************************************************************************
****************************************
4. Bootloader menu appears again after the D-Bug12 monitor is programmed into flash
memory. It would take a few minutes to program the D-Bug12 monitor so be patient.
3.2 Making a simple assembly program in RAM:
We are using AsmIDE as a terminal program and the following instructions to create your first
assembly program. If you are using a different terminal program, the instructions may vary.
The steps to create your first program are as follows:
1. Click the File button to open a new file.
In assembly language, you specify the starting address of your CODE by an ORG
statement.
You can start the data RAM at address $1000 with the statement org $1000 followed by
RAM variables, as shown by:
org $1000
count: rmb 1 ; reserve one byte of RAM for temp storage
temp: rmb 2 ; reserve two bytes of RAM for temp storage
If your program is small, say less than 4K, you can start your program at address $2000
with the statement org $2000 followed by your program, as shown by:
org $2000
22