switching between EPROMS

Darrell Norquay dnorquay at awinc.com
Thu Aug 29 04:26:33 GMT 1996


At 09:06 PM 8/28/96 +1200, Warren Crowther wrote:

>I'd prefer to do it with the engine ON!!!  I don't see any reason why it
>cannot be done, provided the switch over is not done at a critical time, and
>that the only difference between the EPROMS is the data: ie. the fuelling,
>ignition timing, etc.  Also it should be done quick enough so that the micro
>does not miss an external data fetch (anyone know what the micro will do in
>this case??  will it hang or retry? ).
>
>Warren

This probably will not work.  You COULD build in some logic that waits until
both the CS (chip select) and OE (output enable or read line) are inactive,
then switch them over to the other chip.  BUT, if you do this, what's to say
that the other chip will have exactly the same code in the same place?  (if
it does, what's the point of switching?) The processor may be in the process
of executing some instruction when you do the switch, and the new EPROM may
have completely different insructions at the same address.  The processor
then executes a JTZ instruction, (Jump to Twilight Zone) and you're baked.
Same applies if the EPROM isn't enabled or finished putting data on the bus
by the time the processor reads it.

There are two ways this might work: 

(1) If the actual running code is identical in both chips, and you only
modified the values in, say, the fuel map, and haven't added or subtracted
any code, this method MAY work.  Your added circuitry would be fairly
complex, and must be both synchronized to the processor clock and fast
enough to complete the switch between bus read cycles.  Timing would be
critical in this scenario.  

(2) If your circuitry did a hardware reset after switching the CS and OE to
the new chip, you may get away with it, if the car will run long enough to
survive a cold reboot of the ECM.  If the micro copies the data from the
EPROM into RAM when it boots (say, for use in some adaptive algorithm),
changes in the RAM table would occur while the engine was running.  It would
require a hard reset to recopy the new data from the new EPROM into the RAM
map.  Also, you'd have to make sure you check the EPROM checksum (if it has
one), and fudge in some data to make the checksum the same for both chips.  




regards
dn
dnorquay at awinc.com




More information about the Diy_efi mailing list