8
Programming External EEPROM
When finished with program development you can program your application into EEPROM
so it executes automatically when you apply power to the board. The following procedure
does this:
1. Make a backup copy of the HELLO.ASM source code.
2. Use a text editor to modify HELLO.ASM. Change the start of the program to
$E000
which is the beginning of the EEPROM in U7. This can be done easily in the file since
there is a line:
ORG $E000
already there you can add by removing the comment
*
character from the beginning of it.
3. Remove the comment
*
character from before the following lines also:
*
LDS
#$23FF
set the stack pointer
*eloop
nop
endless loop
*
bra
eloop
*
org
$FFFE
set the reset vector
*
fdb
START
4. This will initialize the stack pointer which is necessary when running outside of buffalo
but should not be done while running under buffalo since it must handle the stack;
cause the program to NOT try to "return" at the end and lastly, program the HC11 reset
vector to go to the beginning of the program when powered on.
5. Re-Assemble HELLO.ASM as described in the "Assembling Source Code" section.
6. Start AxIDE and select Configure and follow the onscreen instructions. Make sure
ROMON is disabled and if not configure it to be so.
7. Select Program and make sure External EEPROM is selected.
8. At the file prompt enter your newly assembled HELLO.S19 file.
9. Click OK then follow the onscreen instructions, installing the programming jumpers then
power off/on or press the RESET switch.
10. When finished programming, remove the jumpers as instructed by the program.
11. Return to the AxIDE terminal window and cycle power or press RESET on the board.
Your new program should start automatically.
To return to the buffalo monitor program, select Configure again and this time enable
ROMON. The buffalo monitor on chip will execute the next time the board is powered on.