Forums

programming the reset vector (FFFE)

Started by reganumah January 12, 2006
heloo,
when ever i try to program the reset vector for example below

org $fffe
fdb $b600

an error is show. i'm using jbug11 , mc68hc11.
i would like to know my mistake. is it true after programming in
bootloader mode, setting the mod B to high and mod A to low and
reseting the board the program would run at b600? ( the above
instruction). i would welcome any help. thank you.



reganumah wrote:
> heloo,
> when ever i try to program the reset vector for example below
>
> org $fffe
> fdb $b600
>
> an error is show. i'm using jbug11 , mc68hc11.
> i would like to know my mistake. is it true after programming in
> bootloader mode, setting the mod B to high and mod A to low and
> reseting the board the program would run at b600? ( the above
> instruction). i would welcome any help. thank you.

You haven't given enough information. Do you have RAM or EEPROM
at location $FFFE?

Putting MODB high and MODA low boots in single-chip mode.
If you have any internal ROM at $FFFE/$FFFF this vector will
be used as the restart address. I don't imagine that whatever
ROM is at $FFFE/$FFFF points to $B600.

If you have BUFFALO internally on that chip, then you can
jumper PORTE bit 0. If not, then you can boot with TxD and
RxD tied together with MODB and MODA both low. This boots
into Special Boot mode, and after some initial setup jumps
to $B600.

What exactly are you trying to accomplish?
What mode do you intend to execute in?
Where do you plan to put your code?
What family of processor are you using? (A1, A8, E1, E8, F1?)
What external circuitry do you have?

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!



hello, thanks mike and sorry for the lack of information. the
motorola chip i am using is the mc68hc11E1. wat i intend to do is run a
program at $B600 when i press the reset button.i used the Jbug11 to
load the EEPROM and run the program in the bootloader mode. how do i
setup the MCU so the program can run wen i press the reset button.i
hope you can help me.... thanks a million


The 68HC11 has a very nice feature that if you loop back SCI TX to SCI
RX and put it in bootstrap mode, it will execute from B600. I have
used this even when I am using an external device on this port by
making a simple gate enabled by the reset line

cheers,
Nigel
--- In m68HC11@m68H..., "reganumah" <regan_83@h...> wrote:
>
> hello, thanks mike and sorry for the lack of information. the
> motorola chip i am using is the mc68hc11E1. wat i intend to do is run a
> program at $B600 when i press the reset button.i used the Jbug11 to
> load the EEPROM and run the program in the bootloader mode. how do i
> setup the MCU so the program can run wen i press the reset button.i
> hope you can help me.... thanks a million
>




reganumah wrote:
> hello, thanks mike and sorry for the lack of information. the
> motorola chip i am using is the mc68hc11E1. wat i intend to do is run a
> program at $B600 when i press the reset button.i used the Jbug11 to
> load the EEPROM and run the program in the bootloader mode. how do i
> setup the MCU so the program can run wen i press the reset button.i
> hope you can help me.... thanks a million

This still isn't all the information I asked for, but I'll try to
answer as best I can.

One way to do this is to use SPECIAL BOOT mode, and to connect
RxD and TxD together. Upon reset in SPECIAL BOOT (MODA = 0v,
MODB = 0v) the processor sends a BREAK out TxD and if it sees
this on RxD, it jumps to $B600. If you need to use the SCI port
after this boot, then there are a couple of ways to do that.
If you can continue to run in a single chip mode, either SPECIAL
BOOT, or SINGLE CHIP, then a very simple external circuit
using a bit from PORTB works nicely. If you need to run in
an expanded mode, then more advanced circuitry is needed.
Or you could just use a manual switch, connecting RxD either to
your serial interface chip, or to TxD, depending on the
position of the switch.

Note that, although a BREAK is all zero bits, you cannot just
tie RxD low, since that doesn't give a falling edge. You must
tie RxD (PORTD.0) to TxD (PORTD.1).

I recommend you to get a copy of AN1060 which describes how to
use SPECIAL BOOT mode

http://www.freescale.com/files/microcontrollers/doc/app_note/AN1060.pdf

Note that there is an uncorrected error on page 3 related to
the selection of modes. Here is the correct table:

MODB MODA Mode
1 0 Normal Single Chip
1 1 Normal Expanded
0 0 Special Bootstrap
0 1 Special Test If you have external RAM, it may be better to boot into Special Test
mode, and store your program into RAM. In this case, you'd first
boot into SPECIAL BOOTSTRAP mode, and load your program into RAM,
then switch to SPECIAL TEST mode (flip MODB to low) and RESET
to boot and run your program.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!