I'm creating a extended ROM/RAM board for my computer. Essentially it will have a 128KB RAM chip which will be mapped as 16 banks or 8K each. But for the first four banks (0-3) I want the option of using ROMs instead.
Coming from my CPLD are five chip enable signals (the CPLD logic ensures only one is enabled low at a time). CE4 selects the RAM chip. The first four (0-3) are routed to both the relevant ROM chip
and the CE4 line for the RAM. Which chip is actually connected to each line is determined by a jumper. This is the circuit I came up with for each of the 0-3 CE lines.
Attachment:
ROM-RAM-diode.png [ 19.57 KiB | Viewed 1430 times ]
The idea is that when the jumper is set to connect the ROM, that line won't affect CE4 in any way because it's not connected. There's a pull-up on the ROM's CE line which the CPLD pin can pull low.
When the jumper is set to connect the RAM, the pullup keeps the ROM quiet. Meanwhile, although the CPLD pin can pull CE4 low (due to the diretion of the diode), it can't drive it high (there's also a pullup on CE4 elsewhere that I forgot to add). This is important because theres are, effectively, five pins from the CPLD potentially connected to CE4, so it's important that none can drive the line.
At least, that's my theory. But playing arounf with various diodes on the breadboard I find that values are not everything I'd like them to be.
For example, with one diode (an SD103C Schottky), when controlling the ROM, I get 5V when the CPLD output is high (good) and 0.5V when low (which I figure is good enough). But when I'm controlling the RAM, and the CPLD pin is high, I'm still getting 2V on CE4.
As an electronics beginner, I'm still at the confused stage when it comes to diodes, so I'd appreciate any advice on suitable devices, problems with my circuit or what characteristics to look for on the data sheet.
_________________
I like it when things smoke.
Blog –
Zolatron 64 project