[Coco] How do I program a new ECB ROM with minimal external hardware ?
RETRO Innovations
go4retro at go4retro.com
Sun Jul 28 20:48:20 EDT 2024
On 7/28/2024 7:13 PM, coco--- via Coco wrote:
> All
>
> Ok reformulating my question as one cannot write a EEPROM for a 5V
> system with 3.3V hardware such as the Raspberry Pi
> Since I already have a raspberry pi I had been hoping this would be a
> good solution.
Does it had to be an EEPROM? As I noted, FRAM will work, and it's not
that expensive.
Does it have to be 3v3 and 5v0 all the time? Or, are you OK with
putting the IC into a socket attached to the RPi, writing it, and then
putting it in the CoCo3? If this is OK, the RPI can work with a 5V
EEPROM. The trick is level shifting. Writing a 5V EEPROM via the RPi
is not that hard.
It turns out that 3v3 logic also works on 5v ICs, as the "1" is anything
above 2.0v, and both 3v3 and 5V ICs use the same threshold.
So, say you want to use a 28C series EEPROM (though, I really think you
should use the 39SF0X0 series FLASH ROM, as they are cheaper and just as
easy to erase and program.)
You wire up the EEPROM to 5V and GND, and attach all the address lies,
the OE, CE and WE lines to the RPi directly. Why? Because those lines
are always input on the EEPROM, and they will never send a 5V signal to
the RPI.
The only issue is the 8 data lines. For those, you grab 16 resistors.
8 3300 resistors and 8 1800 resistors. You connect them like this:
Data line from EEPROM Data 0 <----> 1800 <----> RPi Data Line 0 <---->
3300 <----> Ground
Do the same for the other 7 data lines.
Write to your EEPROM from the RpI like normal, no 3v3 IC required
If you're wondering what's going on with the resistors and how this will
protect the RPi, it's the resistors... They form a "voltage divider".
Here's a graphical page to show it:
https://ohmslawcalculator.com/voltage-divider-calculator
Your source voltage is the 5V coming from the EEPROM
R1 is 1800 ohms
R2 is 3300 ohms
Note that 1800 is about half of the 3300, so 3300/(3300+1800) = ~2/3.
As a result, the output voltage will be 2/3 of the source, which is 2/3
of 5, or 3v3
If you're wondering why this is not used all the time: Speed, power draw
Voltage dividers like this seem like perfect, but the calculation
ignores capacitance in the data lines and the wire used to connect
things together. BUt, there is capacitance, so the resistors (in
conjuction with the capacitance), make an RC delay circuit. The larger
the resistor, the more delay. For these resistor amounts, you might be
adding 30-70nS to the switching speed. Not horrible, but not great.
You can improve the speed delay by using smaller resistors, but then you
use more power (that 1800 + 3300 ohm resistor network is taking that 5V
to ground, which wastes power and creates heat). So, you have to balance
speed versus power draw, and neither is good.
But, in this case, if you don't need the RPi to program the EEPROM while
the EEPROM is installed in the CoCo, then you're fine. Just write your
RPi programmer to figure in the additional timing delay, and you're good.
If you need the EEPROM to be in the CoCo when programmed, that's a much
taller order, involving secondary ROM, buffers on all lines, and voltage
dividers on all lines. Not recommended
>
> I am looking for something preferably cheep but more importantly easy
> to use reading and writing coco3 ROM's.
>
> Charlie.
>
--
RETRO Innovations, Contemporary Gear for Classic Systems
www.go4retro.com
store.go4retro.com
More information about the Coco
mailing list