EmbeddedRelated.com
Forums

regarding mc68hc11e9

Started by Pratik Patel October 10, 2006
hi there

i m using 68hc11e9 to develop a robot.
up to now i have finished testing my robot. now i need to run it
without connected to com1 port of computer. i m writing code to EEPROM.

is there any jumper setting for this?
pls advice soon.
thanks
----- Original Message -----
From: "Pratik Patel"
To:
> i m using 68hc11e9 to develop a robot.
> up to now i have finished testing my robot. now i need to run it
> without connected to com1 port of computer. i m writing code to EEPROM.

You mean to say your whole robot control program (including the code you had
until now in the PC) fits in the 512 bytes of EEPROM? (I'd like to see that,
and I don't say this ironically!) But, if you need more space you need a
different part (like 68hc711e9 = 12K OTP EPROM) which has more programmable
memory, or a board with EEPROM/Flash that lets you reprogram it as many times as
you like. Many boards are still available for sale, like our F1-based one
(http://aspisys.com/f1.htm).

> is there any jumper setting for this?

For code to execute from EEPROM, you need to set a pin high (I think it's PE0
that must be held high during reset) and must have Buffalo in ROM. Most
68HC11E9's have Buffalo in ROM, but there is no guarantee (as some come from
large customers' proprietary masks). You can enable the internal ROM by writing
the appropriate value to CONFIG, if ROM is currently disabled.

Another way is to send a zero (instead of $FF) as the very first byte in boot
mode. This will run jump to your code in EEPROM at $B600. But that means a COM
connection is still needed until your program starts running (then you can let
go).

t...@acm.org
thanks for advise

well basically i have all my coding fitting to 512 bytes of EEPROM. and now i need to move my robot without having connected to PC through COM1 port.
i thought there is some jumper setting of MODA and MODB for this as i was given hint for this. correct me if i m wrong.

thanks again
Tony Papadimitriou wrote: ----- Original Message -----
From: "Pratik Patel"

To:
> i m using 68hc11e9 to develop a robot.
> up to now i have finished testing my robot. now i need to run it
> without connected to com1 port of computer. i m writing code to EEPROM.

You mean to say your whole robot control program (including the code you had
until now in the PC) fits in the 512 bytes of EEPROM? (I'd like to see that,
and I don't say this ironically!) But, if you need more space you need a
different part (like 68hc711e9 = 12K OTP EPROM) which has more programmable
memory, or a board with EEPROM/Flash that lets you reprogram it as many times as
you like. Many boards are still available for sale, like our F1-based one
(http://aspisys.com/f1.htm).

> is there any jumper setting for this?

For code to execute from EEPROM, you need to set a pin high (I think it's PE0
that must be held high during reset) and must have Buffalo in ROM. Most
68HC11E9's have Buffalo in ROM, but there is no guarantee (as some come from
large customers' proprietary masks). You can enable the internal ROM by writing
the appropriate value to CONFIG, if ROM is currently disabled.

Another way is to send a zero (instead of $FF) as the very first byte in boot
mode. This will run jump to your code in EEPROM at $B600. But that means a COM
connection is still needed until your program starts running (then you can let
go).

t...@acm.org



----- Original Message -----
From: "Patrik"
To:
> well basically i have all my coding fitting to 512 bytes of EEPROM. and
now i need to move my robot without having connected to PC through COM1
port.
> i thought there is some jumper setting of MODA and MODB for this as i was
given hint for this. correct me if i m wrong.

MODA/MODB control the startup mode, one of these four:

1. SPECIAL BOOTSTAP (single)
2. SPECIAL TEST (expanded)
3. SINGLE-CHIP (internal memory only)
4. EXPANDED (internal and external memories, code normally starts from
external).

MODA controls the single or expanded part of the mode (0=single, 1=expanded)
MODB control the normal or special part of the mode (0=special, 1=normal)

Special modes are normally used for programming while normal modes are used
for running your code. You normally want to be in 'normal' mode. Since you
don't have external memory attached, only option is [3] single-chip mode.

None of these modes will get your code in EEPROM executed automatically,
however, except...

With 68HC11F1 (68HC811E2, and possibly some other) parts, EEPROM is
relocatable and can be made to occupy the vector area. With these parts,
you can execute code directly from EEPROM. With any part (like the
68HC11E9) with fixed EEPROM at, say, $B600, this isn't possible.

But since you don't have one of these parts, my original reply still holds!

t...@acm.org
Tony Papadimitriou wrote:
>
> MODA/MODB control the startup mode, one of these four:
>
> 1. SPECIAL BOOTSTAP (single)
> 2. SPECIAL TEST (expanded)
> 3. SINGLE-CHIP (internal memory only)
> 4. EXPANDED (internal and external memories, code normally starts from
> external).
>
> MODA controls the single or expanded part of the mode (0=single, 1=expanded)
> MODB control the normal or special part of the mode (0=special, 1=normal)

Ok so far.

> Special modes are normally used for programming while normal modes are used
> for running your code. You normally want to be in 'normal' mode. Since you
> don't have external memory attached, only option is [3] single-chip mode.
> None of these modes will get your code in EEPROM executed automatically,
> however, except...

OOPS!

If one boots into SPECIAL BOOT mode, and ties TxD to RxD, along
with a pull-up resistor, then the code in EEPROM will automatically be
executed. The SPECIAL BOOT ROM sends a NUL as soon as it is ready to go,
and this can be routed back into the input to cause the jump.

BUFFALO is not needed for this, and indeed, parts without any usable
ROM on them may be used in this manner. I have some Toshiba second-
source parts with no ROM (it all reads back as 00, these are not
OTPs) which I have successfully used in this way.

One might think that this permanently eats up the SCI port, but
not so. I have a circuit around somewhere which uses a bit on
PORTB to do switching of the SCI. Upon RESET, PORTB is forced
to all bits 0. One of these pins can be used as the control
bit for a data selector which connects RxD to TxD upon RESET.
After the code has done minimal setup, it may force the output
pin on PORTB to 1 to connect RxD to a serial I/F chip. This
may be done under control of an external switch, so that
the switch may be set to "program" mode in which RxD is
connected externally, or to "run" in which it is switched
by PORTB as outlined above. TxD still needs a pull-up, but
this is normally supplied by the RS232 I/F chip.

[snip]

> But since you don't have one of these parts, my original reply still holds!

Well, almost :-)

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!
----- Original Message -----
From: "Mike McCarty"
To:
Sent: Wednesday, October 11, 2006 1:19 AM
Subject: Re: [m68HC11] regarding mc68hc11e9
> > Special modes are normally used for programming while normal modes are
used
> > for running your code. You normally want to be in 'normal' mode. Since
you
> > don't have external memory attached, only option is [3] single-chip
mode.
> > None of these modes will get your code in EEPROM executed automatically,
> > however, except...
>
> OOPS!

OOPS to you, too, thank you very much! I said, "automatically", ie., on its
own, ie., without your assistance! There is nothing wrong about the above
statement as it stands.

> If one boots into SPECIAL BOOT mode, and ties TxD to RxD, along
> with a pull-up resistor, then the code in EEPROM will automatically be
> executed. The SPECIAL BOOT ROM sends a NUL as soon as it is ready to go,
> and this can be routed back into the input to cause the jump.

Quote from my original reply (complete with the misplaced "run" word hanging
in there):

"Another way is to send a zero (instead of $FF) as the very first byte in
boot
mode. This will run jump to your code in EEPROM at $B600. But that means a
COM
connection is still needed until your program starts running (then you can
let
go)."

You just described this scenario, only using a loopback to cause this, which
is fine if, like you noted, you don't mind adding some circuit to be able to
use the SCI, or not use the SCI.

> > But since you don't have one of these parts, my original reply still
holds!
>
> Well, almost :-)

I can live with that!

> Mike

t...@acm.org
Tony Papadimitriou wrote:
> ----- Original Message -----
> From: "Mike McCarty"

[snip]

>
>>>None of these modes will get your code in EEPROM executed automatically,
>>>however, except...
>>
>>OOPS!
> OOPS to you, too, thank you very much! I said, "automatically", ie., on its
> own, ie., without your assistance! There is nothing wrong about the above
> statement as it stands.

Hmm. Depends on what the meaning of the word "is" is. Oh, wait,
I mean depends on what the meaning of the word "automatically"
is automatically taken to be. :-)

>
>>If one boots into SPECIAL BOOT mode, and ties TxD to RxD, along
>>with a pull-up resistor, then the code in EEPROM will automatically be
>>executed. The SPECIAL BOOT ROM sends a NUL as soon as it is ready to go,
>>and this can be routed back into the input to cause the jump.
> Quote from my original reply (complete with the misplaced "run" word hanging
> in there):
>
> "Another way is to send a zero (instead of $FF) as the very first byte in
> boot
> mode. This will run jump to your code in EEPROM at $B600. But that means a
> COM
> connection is still needed until your program starts running (then you can
> let
> go)."

Actually, this is what I was alluding to. One does not need a COM
connection.

> You just described this scenario, only using a loopback to cause this, which
> is fine if, like you noted, you don't mind adding some circuit to be able to
> use the SCI, or not use the SCI.

Yes, I did. And I knew that at the time. I was pointing out that one
doesn't "still" need a COM connection. The use of "still" I thought
implied "as you have now", which he was trying to get away from.

I realize that you were aware of the technique. But it doesn't require
a COM connection.

>>>But since you don't have one of these parts, my original reply still
>
> holds!
>
>>Well, almost :-)
> I can live with that!

Good, so can I.

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!