Programming the boot loader into the build in EEPROM
John Davis was so nice to point out the following:
its better to use jbug for windows a pbug does not work on fast pc's
regards
John Davis
Thank you John. I'll try to create a new page with instructions how to use JBug.
Here is a step by step instruction how to program the boot loader into the build in EEPROM using the PICOBUG utility from Motorola.
Requirements: PICOBUG version 3.42 - you can download it from Motorola (for more details see the links section). Copy the os.s19 file in the same directory where the PICOBUG is installed. The instructions assume you have MC68HC811E2 device running from 8MHz crystal and connected to the COM1 via RS232. For details about this connection see this schematics.
Set the MODA and MODB jumpers so the MCU is in "boot mode". Power on the MCU and start the PICOBUG utility by typing "PCBUG11".
Note: You can start the PICOBUG using PCBUG11 -A as indicated on question seven - this is a shortcut and will skip all the prompts and jump straight to the UI.
Answer the prompts as follows (my answers are in Blue, each screen shows the prompt from the previous question):
First question ( we do not have a talker installed so answer No):
PCbug11 Ver 3.42 - M68HC11 Monitor for PC Hosts (c) Motorola Ltd 1994
PCbug11 Command Line Compiler - press <Esc> to terminate
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~
Is the talker installed on your board? (Y/N) :N
Second question (we do not want to use XIRQ):
Is the talker installed on your
board? (Y/N) : N
Do you wish to use the XIRQ
interrupt? (Y/N) :N
Third question ( select number 4 ):
Do you wish
to use the XIRQ interrupt? (Y/N) : N
MCU boot talkers available
~~~~~~~~~~~~~~~~~~~~~~~~~~
1 68HC11A0/1/7/8 2 68HC11D0/3 3 68HC11E0/1/8/9
4 68HC811E2 5 68HC11F1 6 68HC11G0/5/7
7 68HC11J0/6 8 68HC11K0/4 9 68HC11L0/6
10 68HC11ED0 11 68HC711E9 12 68HC11E20
13 68HC711E20 14 68HC11EA9 15 68HC711EA9
16 68HC711G5 17 68HC711L6 18 68HC711K4
19 68HC11KA4 20 68HC711KA4 21 68HC11M2
22 68HC711M2 23 68HC11P2 24 68HC711P2
Which device are you using? :4
Fourth question (we do not want to load a macro):
Which device
are you using? : -A
Do you wish to load a macro automatically? (Y/N) :N
Fifth question (we use COM1 - feel free to use COM2 if you have to):
Do you wish
to load a macro automatically? (Y/N) : N
PC communications port : 1. COM1 2. COM2
Which communications port are you using? :1
Sixth question (we have 8MHz crystal):
Which
communications port are you using? : port=1
Assume an 8MHz crystal in use (Y/N) :Y
Seventh question (finally - simply press any key):
Assume an
8MHz crystal in use (Y/N) : Y
Command Line : PCBUG11 -A
Press <Esc> to quit or any other key to run PCBUG11
First Screen (this is the PICOBUG UI):
PCbug11 Ver 3.42 - M68HC11 Monitor for PC Hosts (c) Motorola Ltd 1994
Internal RAM Bootstrap Mode
PC ACCA ACCB X Y CCR (SXHINZVC) SP MCU: 68HC11E2
$0000 $40 $2C $1000 $0100 $40 %.1...... $00EB RTS Level :ON
State: STOPPED
Base : DEC
User RST $XXXX
User SWI $XXXX
User XIRQ $XXXX
Type the following commands at the PICOBUG command prompt:
mm $1035 0
This will enable programming the EEPROM
eeprom $f800 $ffff
This defines the EEPROM region - on 68HC811E2 device the EEPROM is from $F800 to $FFFF.
loads os.s19
This will program the boot loader - note that this takes a while.
verf os.s19
This will verify if the boot loader was written correctly.
quit
You are all set and ready to go.
You can repeat the above procedure every time you need to flush the boot loader.
Go Back