EVBU, E1, External EEPROM, and an Exhausted Engineer

Started by ChuckP98 April 4, 2007
Hi everyone, I'm glad to see so many people still have interest in this
ol' chip.

I a couple of questions for you knowledgeable folks out there who have
more experience with this mcu than myself. I've posted (long ago) about
a problem I've had interfacing a circa 1990 M68HC11EVBU with 32k SRAM
and 32k flash EEPROM. I have a E1 PLCC chip in place of the traditional
E9 that comes with the EVBU. I've wirewrapped the SRAM, EEPROM, and
adjoining logic to the mcu and also soldered a LM7805 regulator for my
power supply.

Now the problem is, I can't seem to get the in-system-programming (ISP)
to work to write to the EEPROM no matter what software I use, HCLOAD,
IC11, etc. I believe I have my design correct since I am able to
run my previously burned (with a EEPROM programmer) code to run when
I set it to expanded mode. And I know for a fact that I have done
nearly the same exact setup on a breadboard and have gotten it to work
fairly reliably. But the problem occurs whenever I try to
place the device in bootstrap mode for programming. It always sends
the program to the boostrap RAM, but seems to fail right after that.

Also, since the code on the external EEPROM right now is a SRAM checker
it verifies that SRAM is ok. I have verified this fact with defective
as well as good SRAM chips.

Are there any precautions I should be aware of when using the E1 chip
with external flash EEPROM? Or with ISP? Or with the EVBU? What am I
doing wrong?

Any help would be greatly appreciated and I thank you all in advance.

-EngrForLife
On Wed, 04 Apr 2007 14:00:22 +1000, ChuckP98 wrote:

> Hi everyone, I'm glad to see so many people still have interest in this
> ol' chip.
>
> I a couple of questions for you knowledgeable folks out there who have
> more experience with this mcu than myself. I've posted (long ago) about
> a problem I've had interfacing a circa 1990 M68HC11EVBU with 32k SRAM
> and 32k flash EEPROM. I have a E1 PLCC chip in place of the traditional
> E9 that comes with the EVBU. I've wirewrapped the SRAM, EEPROM, and
> adjoining logic to the mcu and also soldered a LM7805 regulator for my
> power supply.
>
> Now the problem is, I can't seem to get the in-system-programming (ISP)
> to work to write to the EEPROM no matter what software I use, HCLOAD,
> IC11, etc. I believe I have my design correct since I am able to
> run my previously burned (with a EEPROM programmer) code to run when
> I set it to expanded mode. And I know for a fact that I have done
> nearly the same exact setup on a breadboard and have gotten it to work
> fairly reliably. But the problem occurs whenever I try to
> place the device in bootstrap mode for programming. It always sends
> the program to the boostrap RAM, but seems to fail right after that.
>
> Also, since the code on the external EEPROM right now is a SRAM checker
> it verifies that SRAM is ok. I have verified this fact with defective
> as well as good SRAM chips.
>
> Are there any precautions I should be aware of when using the E1 chip
> with external flash EEPROM? Or with ISP? Or with the EVBU? What am I
> doing wrong?
>
> Any help would be greatly appreciated and I thank you all in advance.
>
> -EngrForLife

Not sure what your problem is, but if you want some more code to test
with, check out my site at http://hc11-ide.funkmunch.net specifically the
code in newbrain/

I have another talker you could try, as well as makefiles and perl scripts
that verify data integrity at every step of the way

A logic analyser may be able to give you some useful data.
ChuckP98 wrote:

[snip]

> Now the problem is, I can't seem to get the in-system-programming (ISP)
> to work to write to the EEPROM no matter what software I use, HCLOAD,
> IC11, etc. I believe I have my design correct since I am able to
> run my previously burned (with a EEPROM programmer) code to run when
> I set it to expanded mode. And I know for a fact that I have done
> nearly the same exact setup on a breadboard and have gotten it to work
> fairly reliably. But the problem occurs whenever I try to
> place the device in bootstrap mode for programming. It always sends
> the program to the boostrap RAM, but seems to fail right after that.

Well, I didn't reply because I couldn't understand what your problem
was, and figured someone else might be better able to help. Since
your only other reply so far is also confused, I'll take a stab...

Please describe

(1) what tools you use
(2) what actions you perform
(3) what you expect to happen
(4) what actually happens

[snip]

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
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!
I have written a couple of little bootable programs for various flavors of hc11... maybe you need a custom eeprom burner that reads the srecords from the serial port and burns your external eeprom... 10ms per byte right?

-----Original Message-----
From: c...@yahoo.com
To: m...
Sent: Wed, 4 Apr 2007 1:26 PM
Subject: [m68HC11] Re: EVBU, E1, External EEPROM, and an Exhausted Engineer
Hi again guys, sorry if I didn't explain it well enough, I guess that
I a bit confused with what's going on myself.

Okay, here's the whole thing from the very beginning. I bought a
M68HC11EVBU last summer, and I had an old design with which I wanted
incorporated with it, namely I wanted to expand the memory of the HC11
by adding external 32K SRAM and 32K FLASH EEPROM. The SRAM takes up
the 0x0000-0x7FFF space of the memory map and the EEPROM takes up the
0x8000-0xFFFF space.

I am using D43256AC NEC SRAM and AMD AM19F010B +5V programmable FLASH
EEPROM. I socketed all the chips, and wire-wrapped the board
complying with the expanded mode configuration in the "big white book"
(PG. 112, M68HC11RM/D REV. 6 4/2002). However, I changed the design a
bit, and I just used A15 to act as the chip enable for both chips so I
can split the 64K address space in half. This way I don't need to use
a HC138 decoder. I used this same design previously with an A2 and it
worked great. I am generating the !WR signal by NANDing the E clock
and an inverted R/!W signal, to generate the !RD signal I am NANDing
the E clock and the R/!W.

I have not done anything to the original EVBU circuitry itself besides
add power through a LM7805 regulator that is on the wire-wrap portion
of the board. All chips are bypassed with 100 nF caps.

I tested the board by flashing the EEPROM (using an EEPROM burner)
with a RAM checker that I use for debugging. It worked fine and
everything turned out as I expected when just reading from the
external EEPROM.

Now, when I try to use ICC11 or HCLOAD or any type of tool which is
able to program the external flash EEPROM, it doesn't work. In HCLOAD
it says I have an "Error in EEPROM", and in IC11, it says:

"Loading bootstrap program into internal RAM at 1200 baud, bootstrap
file: bootext.s19
sync'ing with bootstrap program
Programming user program C:\icc\examples.11\hello.s19 at 9600 baud
Please Wait...timeout waiting for <0x8E>
Bootstrap Error during Programming user program"

I am also using a DB25 to DB9 converter to connect my board to my
computer.

What I would expect to happen is to have my *.s19 files burned
correctly onto the external flash EEPROM. I am probably missing a
step or something small like a jumper or a cut-trace, however I am
unsure of what it might be.

Sorry again for the confusion, I hope this gives a better
understanding of what I am trying to do.

Thanks again,
Chuck

Yahoo! Groups Links

________________________________________________________________________
AOL now offers free email to everyone. Find out more about what's free from AOL at AOL.com.
Yes actually, that sounds about right. I am thinking that most
programs I use to write my eeprom are incompatible with my setup.
Reading in the *.s19 files directly from serial port to EEPROM is the
type of setup a friend of mine used in a custom board he worked on,
and I believe 10 ms per byte was what he used for the writing delay.

Would I be able to try your bootloader? :) Or if not, could you maybe
point me in the right direction for creating my own bootloader? I've
never written one before.

Thanks again,
Chuck

--- In m..., BobGardner@... wrote:
>
> I have written a couple of little bootable programs for various
flavors of hc11... maybe you need a custom eeprom burner that reads
the srecords from the serial port and burns your external eeprom...
10ms per byte right?
>
>
B...@aol.com wrote:
> I have written a couple of little bootable programs for various
> flavors of hc11... maybe you need a custom eeprom burner that reads
> the srecords from the serial port and burns your external eeprom...
> 10ms per byte right?

This does not sound like what he described. He has FLASH, not regular
EEPROM. BTW, EEPROM usually takes 2ms per byte in byte mode, and
usually only 2ms per 64 bytes when in page mode.

[snip huge unnecessary quote]

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
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!
Oh, one more thing that I remembered why my board didn't work is that
I was using a RS232 to USB cable. And after doing some searching
around, I discovered that the HC11 will not work with these converter
type devices. Is this right? I'm sticking to my standard null-modem
cable, but now I have a RS232 to USB cable which I cant use
anymore...and I'm sure I am asking a question which has been asked
before, but what is the final word on using a USB to serial converter
with the HC11?
Bob Smith wrote:
> See below
>
> ----- Original Message -----
> From: Mike McCarty
> To: m...
> Sent: Friday, April 06, 2007 12:44 AM
> Subject: Re: [m68HC11] Re: EVBU, E1, External EEPROM, and an Exhausted Engineer
> ChuckP98 wrote:
> > Oh, one more thing that I remembered why my board didn't work is that
> > I was using a RS232 to USB cable. And after doing some searching
> > around, I discovered that the HC11 will not work with these converter
> > type devices. Is this right? I'm sticking to my standard null-modem
>
> Yes, thIs a known problem. Many of the RS232<->USB dongles have a problem
> handling the 'BREAK' sequence which the HC11 depends on. It is known
> that the BAFO-810 dongles, for example, do not work correctly. I
> have also heard that dongles based on the FTDI chip _do_ handle
> break ok. I had a long battle with this problem a couple of years
> ago. The net result was that I bought a serial card for my computer.

I still don't see any REASON why it shouldn't work.
Of course, if the converter itself doesn't work, then
it doesn't. :-)

[snip]

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
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!
autostaretx wrote:
>
> To convert that to brand names:
> i'd suspect that Belkin USB-serial adapters will -not- work
> reliably (even beyond the "break" issue),
> and that a Keyspan USB-19HS -will- work.
> (Keyspan uses the Texas Instrument chip).
>
> Meade Telescopes use the M68HC11 as the heart of their Autostar
> controllers, with a MAX232 from the on-board serial port...
> they don't use break for any communications, yet the Belkin
> adapters are notorious for not being able to handle
> 9600 baud binary transfers.
> My Keyspan does 9600 to over 200kbaud without problems.

What I thought. If the converter works, then there should be
no problem.

BTW, I have a really sour taste in my mouth for all Belkin
"special" cables. Their ordinary cables are top notch. But
I've had problems with their "smart" cables, like KVM switches,
and "auto switch" printer cables, etc.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
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!
Yup. I just did a couple of tests to prove this for myself. I have a
USB to serial converter which I believe is a PROLIFIC chipset.
Writing a bootstrap program and writing it to the RAM did NOT work. I
also borrowed two different USB to serial converters from friends and
they also did not work.

However, if you are merely running a program using RS232 just as pure
text. It "should" work. I ran the same test just outputting time to
the serial port and it worked fine.