switching between EPROMS

Kalle Pihlajasaari kalle at device.data.co.za
Wed Aug 28 10:39:26 GMT 1996


Hi Warren,

Long post about ROM switching

> >     If you switch it with the engine turned OFF, I don't think you'd have 
> >     a problem.
> 
> This is a simple solution, and will work, but..
> 
> 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? ).

Hardware do not expect code memory fetches to be faulty, if this occurs you
will execute garbage.  Data fetches that are corrupt will be more transitory
as the next time it checks it will get the right value, it may store
the wrong value for a long time though so it is also a very bad idea.

You cannot allow this to happen as you could get any number of fault
conditions to occur, a hand would be relatively benign and the watchdog
(if any) would reset it again but you would have to be ready for a 
boot sequence.

You can use multiple EPROMS in parallel or as was mentioned you can use
a larger EPROM and bank switch within it, either method is sound but
having a 'known good' EPROM and then switching between 3 test units
would be a nice thing in your application I think.

For the single EPROM setup youcan get away with just one extra IC
basically any type of latch with a width of however many address lines
you want to change (8 programs would only need 3 lines) and you 
then use an external thumbwheel switch to load the latch inputs and
feed the latch outputs to the high address lines of your EPROM.  You would
then use either the _OE or _CS line to latch the new selection onto the
address lines.  The latch will be fast enough to set the address lines
for the current transfer if you have the correct edge in use but it
will be easier to use the trailing edge of the last fetch to load in
the new selection.  You may be able to use either _SIGNAL in a rising
edge latch or have to use _CS inverted on a falling edge latch this
does depend some on how they select the ROM so you may have 4 combinations
to try out _CS, _OE, CS or OE in a rising edge latch (DO NOT USE A 
LEVEL SENSITIVE LATCH) edge sensitive latches are often referred to 
as D-Flip-Flops.

To use multiple ICs that you wish to gate the _CS signal you would
be able to do it with 2 ICs by having a latch and a 3-to-8 line 
decoder chip with the 3 inputs from your latch and the _CS into 
one of the _EN inputs of the decoder.

Cheers ,have fun, don't do this to someone elses car without
warning them, you may still have occasional glitches if you get 
the latch enable polarity wrong, also if you change the latch with the
wrong signal midway in a address fetch, CS is safer than OE in norma
useage.

> >has anyone made a device that you can plugs lots of EPROMs into, plug into 
> >your car ECU, and switch between them with a switch??
> >     
> >I want to make one for only 2 EPROMs, and was thinking of using a simple 
> >switch to switch the chip enable between the EPROMs.  Will this work?? or 
> >will the time gap when neither of the EPROMs are enabled be enough to 
> >confuse the micro, and go into some unknown state?  
> >     
> >I could use latches and some simple logic chips to get around this I guess.

You dont need to latch any of the common signals, just your extra ones.

Cheers
-- 
Kalle Pihlajasaari     kalle at data.co.za
Interface Products     Box 15775, Doornfontein, 2028, South Africa
+27 (11) 402-7750      Fax: +27 (11) 402-7751



More information about the Diy_efi mailing list