I was wondering if using a 5V tolerant CPLD in between a 5V and 3V bus would cause any issues. I don't see any reason why it would, but figured I'd throw the question here to see if anyone has any reason why that isn't a good practice.
Just seeing as a CPLD is needed for most custom mappers and such, if all the pins of a 3V chip were running through a CPLD that ran at 3V but is 5V tolerant (like the Xilinx 9500XL series), could it be good enough level translation that further shifters aren't needed?
5V compatible CPLD used as level shifter?
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
-
lidnariq
- Site Admin
- Posts: 11803
- Joined: Sun Apr 13, 2008 11:12 am
Re: 5V compatible CPLD used as level shifter?
Correct, a 3V device with 5V tolerant inputs still emits its logical outputs at 3V, so are compatible with a subsequent not-5V-tolerant 3V device.
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
Re: 5V compatible CPLD used as level shifter?
But could it be used safely in reverse, to drive the NES data bus for example?lidnariq wrote:Correct, a 3V device with 5V tolerant inputs still emits its logical outputs at 3V, so are compatible with a subsequent not-5V-tolerant 3V device.
Code: Select all
NES <---bidirectional---> CPLD <---bidirectional---> 3V ROM-
lidnariq
- Site Admin
- Posts: 11803
- Joined: Sun Apr 13, 2008 11:12 am
Re: 5V compatible CPLD used as level shifter?
Safely, definitely, but possibly not compatibly.
The NES (and Genesis and Master System) all use so-called "5VTTL" voltage thresholds, which is compatible with "3VCMOS" thresholds.
The SNES (and maybe the Gameboy?) use "5VCMOS" voltage thresholds, which will not reliably receive a 3V as logic "1".
random blog post about this
The NES (and Genesis and Master System) all use so-called "5VTTL" voltage thresholds, which is compatible with "3VCMOS" thresholds.
The SNES (and maybe the Gameboy?) use "5VCMOS" voltage thresholds, which will not reliably receive a 3V as logic "1".
random blog post about this
-
FrankenGraphics
- Formerly WheelInventor
- Posts: 2083
- Joined: Thu Apr 14, 2016 2:55 am
- Location: Gothenburg, Sweden
Re: 5V compatible CPLD used as level shifter?
As long as the highs and lows are on each side of the threshold, i think it would. /regards, a hobbyist with no formal training.
Unlike the bad case where a 5v source is shorted with a diode to protect a 3.3v device, you're not putting strain on the 5v output (which is forced to provide a higher current than it was designed for in this situation).
lidnariq ninja'd me.
Unlike the bad case where a 5v source is shorted with a diode to protect a 3.3v device, you're not putting strain on the 5v output (which is forced to provide a higher current than it was designed for in this situation).
lidnariq ninja'd me.
-
Memblers
- Posts: 4150
- Joined: Mon Sep 20, 2004 6:04 am
- Location: Indianapolis
Re: 5V compatible CPLD used as level shifter?
Only problem I've found with that, is that it can get expensive per-pin compared to something like an LVC245. You probably already know this, but as far as CPLD resources, the inputs are "free", but each output pin will also use a macrocell. But if you have left-over resources, it seems like a fine way to use them.
Be aware that there is potential for some strangeness on the CPU data bus. I believe it's the OAM DMA causing a bus conflict, if the cart can output to the data bus too quickly. I don't think it's been fully investigated. If that happens, it's easy to fix by putting something like 300 ohm resistors in series with the data bus, between cart and NES. This has been known to happen on (at least) my old ROM emulator (with 74HC outputs), and the first version of the PowerPak had a similar problem.
Be aware that there is potential for some strangeness on the CPU data bus. I believe it's the OAM DMA causing a bus conflict, if the cart can output to the data bus too quickly. I don't think it's been fully investigated. If that happens, it's easy to fix by putting something like 300 ohm resistors in series with the data bus, between cart and NES. This has been known to happen on (at least) my old ROM emulator (with 74HC outputs), and the first version of the PowerPak had a similar problem.
-
Bregalad
- Posts: 8181
- Joined: Fri Nov 12, 2004 2:49 pm
- Location: Divonne-les-bains, France
Re: 5V compatible CPLD used as level shifter?
What is the point ? You're using a CPLD as a simple buffer to lower signal voltage (for "high" logic state) from +5V to +3V. You can do the same with a simple buffer/level shifter. Why bother use a CPLD at all ?
-
getafixx
- Posts: 373
- Joined: Tue Dec 04, 2012 3:28 pm
- Location: Canada
Re: 5V compatible CPLD used as level shifter?
Tepples already answered below, but the idea is to use it instead of having to add additional costs to the PCB. Seeing as the CPLD is already a necessity (for NES, at any rate), might as well use it to do as many things as possible.Bregalad wrote:What is the point ? You're using a CPLD as a simple buffer to lower signal voltage (for "high" logic state) from +5V to +3V. You can do the same with a simple buffer/level shifter. Why bother use a CPLD at all ?
But like Memblers mentioned, bus conflicts and timing issues is something to avoid. Could use further testing, at any rate.