Interfacing CMOS 3.3V logic
Interfacing CMOS 3.3V logic
Has anybody info about VOH, VOL, VIH, VIL (with max and min) for the cartridge lines?
Could 3.3V CMOS devices be interfaced without the need of transceivers such as 74LVC162245? Maybe adding just some series resistors to limit current on clamping diodes (if VOHmax is higher than 3.3V) would do the trick?
It looks like at least krikkzz did it using just 100 ohm resistors.
Could 3.3V CMOS devices be interfaced without the need of transceivers such as 74LVC162245? Maybe adding just some series resistors to limit current on clamping diodes (if VOHmax is higher than 3.3V) would do the trick?
It looks like at least krikkzz did it using just 100 ohm resistors.
-
- Very interested
- Posts: 86
- Joined: Fri Sep 25, 2015 4:16 pm
Re: Interfacing CMOS 3.3V logic
It will "work" but I've been told that it is bad for the 5V and 3.3V devices both in the long run. A resistor is probably fine, but the transceiver is much better practice.
Krikzz seems to have stopped using resistors and started putting transceivers in his newer devices.
Krikzz seems to have stopped using resistors and started putting transceivers in his newer devices.
Re: Interfacing CMOS 3.3V logic
The PCB cart design from Krikkzz I linked above, is very recent (it's dated december 2014 on the PCB), and he uses resistors.
-
- Very interested
- Posts: 86
- Joined: Fri Sep 25, 2015 4:16 pm
Re: Interfacing CMOS 3.3V logic
For all of his newer RAM cartridges, like the everdrives, he has been using transceivers. He may have went with resistors on the small flash cart as a cost-saving measure.
-
- Very interested
- Posts: 89
- Joined: Mon Feb 24, 2014 6:04 pm
- Location: Kapuskasing, Ontario, Canada
- Contact:
Re: Interfacing CMOS 3.3V logic
You must use a transceiver to interface most 3.3V logic parts to 5V else you risk damaging parts in the long run. There are several Altera parts which are rated to accept 5V inputs directly (CPLDs: EPM3xxx) or indirectly (FPGAs: Cyclone II via a current limiting resistor) but there are specifics you need to follow. Example, for the Cyclone II parts the inputs are NOT 5V tolerant during configuration, and thereafter you still need to limit the clamping diode current by supplying a series resistor. See this Altera appnote for more details:
https://www.altera.com/en_US/pdfs/liter ... c51011.pdf
Series resistors in line with 3.3V flash parts (such as the Krikzz product you linked) is BAD engineering. The maximum Vin those parts can handle is 4V, after that, all excess votlage is converted to latch-up current by the input clamping diodes - and also means that your console is sourcing alot of current on the data and address lines.
https://www.altera.com/en_US/pdfs/liter ... c51011.pdf
Series resistors in line with 3.3V flash parts (such as the Krikzz product you linked) is BAD engineering. The maximum Vin those parts can handle is 4V, after that, all excess votlage is converted to latch-up current by the input clamping diodes - and also means that your console is sourcing alot of current on the data and address lines.
What does db stand for? Well that's an excellent question...
http://www.db-electronics.ca
http://www.db-electronics.ca
Re: Interfacing CMOS 3.3V logic
OK, I'll go the safe route and use transceivers. Thanks for the help!
Re: Interfacing CMOS 3.3V logic
I never had any issues with Krikzz products (I've got an old Everdrive MD and one of these USB programmable flashcarts) which I used a lot for testing things but could you explain concretely what that means and what possible problems could arise ? Is it limited to more heat and more power consumption or is there really a risk of frying the flash chip in the long run ?db-electronics wrote: Series resistors in line with 3.3V flash parts (such as the Krikzz product you linked) is BAD engineering. The maximum Vin those parts can handle is 4V, after that, all excess votlage is converted to latch-up current by the input clamping diodes - and also means that your console is sourcing alot of current on the data and address lines.
Also, my knowledge with electronic is kinda old and limited to basic stuff but I'm interested to know why series resistors cannot efficiently convert the console 5V output to flash tolerable voltage and why this could still lead to excess voltage being applied ?
-
- Very interested
- Posts: 89
- Joined: Mon Feb 24, 2014 6:04 pm
- Location: Kapuskasing, Ontario, Canada
- Contact:
Re: Interfacing CMOS 3.3V logic
3.3V Flash datasheet used in Everdrive for reference
http://pdf.datasheetcatalog.com/datashe ... s/9195.pdf
Concretely, specifications are provided by the manufacturer for a reason - to ensure reliable system performance across ALL production units. In the case of the M29W160EB flash chip, an important spec to look at is Vio max on page 19: listed as Vcc+0.6V. Notice also they don't specify a maximum power dissipation or a maximum current per pin in the datasheet because they don't expect anyone to make a bad enough design to dump excess current intentionally into the chip! BTW, I've actually taken the time to contact the FAE (Field Applications Engineer) of several flash producing companies (Microchip and Macronix) and discussed the 5V -> 3.3V issue, they both replied "OMG DON'T DO THAT!" when I mentioned adding a series resistor as a simple solution. Of course I already knew this as should any educated engineer.
Let's break this down:
Exposure to Absolute Maximum Rating conditions for extended periods may affect device reliability. These are stress ratings only and operation of the device at these or any other conditions above those indicated in the Operating sections of this specification is not implied.
So really what they're telling you is to STAY AWAY from the maximum ratings at all costs.
Now, electrically, what is happening is this, and we will focus on Rser which on Everdrives is 100ohms. When the 5V output is low (0V), life is wonderful and everyone is happy. When the 5V is high (5V) is where problems arise. Under normal circumstances, the console would be driving into a 5V input and very little current would flow between the output (console) and input (cartridge). However, when the console is driving into a 3.3V Everdrive funny things happen. Firstly, the top clamping diode will turn on when the input's voltage exceeds 3.3V+0.6 (3.9V) which leaves approximately 1.1V across 100ohms giving 11mA flowing into the clamping diode - so that's 11mA per input worst case. Best case, the console's outputs are weak and provide 4.25V (MC68000 datasheet) and thus we have 0.35V across 100ohms giving 3.5mA per input. Let's settle for the middle for a fair analysis - 7.25mA.
Let's now consider that the flash IC, at the very minimum, has all data pins and most address pins connected to the console; that's 16 data + 20 address lines. Because they are always connected to the console, the clamping diodes are always being activated even during internal cycles. Therefore, let's multiply our value of 7.25mA per input by 36 (data and address lines) = 261mA. The keen ones here will point out that the data and address lines are not always high, OK, let's be conservatinve and say they are 25% duty cycle, so, on average, we have 261mA/4 = 65.25mA excess current. Not only in the flash IC, but also 65.25mA excess being supplied by the console's very un-efficient linear voltage regulators. For the un-electronically educated, an additional 65.25mA through the console's (let's assume Genesis) 7805 LDO equals an additional 261mW (P = V*I) of heat dissipated which is approximately 25% of its rated maximum (let's not forget it's already taxed and powering the rest of the console! else the 32X or Sega CD would not need their own power supplies).
That's just the console power dissipation aspect, there's the flash IC power dissipation, flash IC latch up on excess current, reduced life of heated components (in your console!), the fact that most CMOS devices are usually rated for about ±7.8mA per pin (my worst case estimates [11mA] are higher than this), and most important: the fact that every engineer I deal with at work knows this is a bad design decision.
I usually here the same counter argument: well my everdrive works fine so where's the problem? Why haven't all everdrives caught fire yet?
The answer is in sample size and statistics (like any MTBF calculation). Will all Everdrives fail - no. What I expect is that there haven't been enough everdrives produced for a substantial analysis to be made. This may cause (and I'm throwing numbers for the sake of argument here) 10% failures in the short-term and reduce the component life of the Flash IC, CPLD and console's LDO by several years. Is that acceptable, for you to judge I guess...
TL;DR
Everdrives without level translators are bad electrical design, else good job.
http://pdf.datasheetcatalog.com/datashe ... s/9195.pdf
Concretely, specifications are provided by the manufacturer for a reason - to ensure reliable system performance across ALL production units. In the case of the M29W160EB flash chip, an important spec to look at is Vio max on page 19: listed as Vcc+0.6V. Notice also they don't specify a maximum power dissipation or a maximum current per pin in the datasheet because they don't expect anyone to make a bad enough design to dump excess current intentionally into the chip! BTW, I've actually taken the time to contact the FAE (Field Applications Engineer) of several flash producing companies (Microchip and Macronix) and discussed the 5V -> 3.3V issue, they both replied "OMG DON'T DO THAT!" when I mentioned adding a series resistor as a simple solution. Of course I already knew this as should any educated engineer.
Let's break this down:
- Vcc is spec'd at 3.3V
- +0.6V is the voltage required to activate the input's clamping diode
- Notes (1,2) specify that the maximum votlage may overshoot Vcc + 2V during transition (i.e. signal edge) for less than 20ns
Exposure to Absolute Maximum Rating conditions for extended periods may affect device reliability. These are stress ratings only and operation of the device at these or any other conditions above those indicated in the Operating sections of this specification is not implied.
So really what they're telling you is to STAY AWAY from the maximum ratings at all costs.
Now, electrically, what is happening is this, and we will focus on Rser which on Everdrives is 100ohms. When the 5V output is low (0V), life is wonderful and everyone is happy. When the 5V is high (5V) is where problems arise. Under normal circumstances, the console would be driving into a 5V input and very little current would flow between the output (console) and input (cartridge). However, when the console is driving into a 3.3V Everdrive funny things happen. Firstly, the top clamping diode will turn on when the input's voltage exceeds 3.3V+0.6 (3.9V) which leaves approximately 1.1V across 100ohms giving 11mA flowing into the clamping diode - so that's 11mA per input worst case. Best case, the console's outputs are weak and provide 4.25V (MC68000 datasheet) and thus we have 0.35V across 100ohms giving 3.5mA per input. Let's settle for the middle for a fair analysis - 7.25mA.
Let's now consider that the flash IC, at the very minimum, has all data pins and most address pins connected to the console; that's 16 data + 20 address lines. Because they are always connected to the console, the clamping diodes are always being activated even during internal cycles. Therefore, let's multiply our value of 7.25mA per input by 36 (data and address lines) = 261mA. The keen ones here will point out that the data and address lines are not always high, OK, let's be conservatinve and say they are 25% duty cycle, so, on average, we have 261mA/4 = 65.25mA excess current. Not only in the flash IC, but also 65.25mA excess being supplied by the console's very un-efficient linear voltage regulators. For the un-electronically educated, an additional 65.25mA through the console's (let's assume Genesis) 7805 LDO equals an additional 261mW (P = V*I) of heat dissipated which is approximately 25% of its rated maximum (let's not forget it's already taxed and powering the rest of the console! else the 32X or Sega CD would not need their own power supplies).
That's just the console power dissipation aspect, there's the flash IC power dissipation, flash IC latch up on excess current, reduced life of heated components (in your console!), the fact that most CMOS devices are usually rated for about ±7.8mA per pin (my worst case estimates [11mA] are higher than this), and most important: the fact that every engineer I deal with at work knows this is a bad design decision.
I usually here the same counter argument: well my everdrive works fine so where's the problem? Why haven't all everdrives caught fire yet?
The answer is in sample size and statistics (like any MTBF calculation). Will all Everdrives fail - no. What I expect is that there haven't been enough everdrives produced for a substantial analysis to be made. This may cause (and I'm throwing numbers for the sake of argument here) 10% failures in the short-term and reduce the component life of the Flash IC, CPLD and console's LDO by several years. Is that acceptable, for you to judge I guess...
TL;DR
Everdrives without level translators are bad electrical design, else good job.
What does db stand for? Well that's an excellent question...
http://www.db-electronics.ca
http://www.db-electronics.ca
-
- Very interested
- Posts: 86
- Joined: Fri Sep 25, 2015 4:16 pm
Re: Interfacing CMOS 3.3V logic
Thank you for a very comprehensive look at this issue. I hope this can provide a good reference for developers of hardware for these old systems going forwards.
All the cheapo 3.3v Neo-Geo multi-carts slowly killing the SNK ASICs over time are just as unnerving...
My Mega Everdrive looks like it has level translators going to the FPGA, but not the RAM that emulates ROM in some places. Hope I can get my UMDK soon! In my MD, I've replaced the LDOs with drop-in 5V switcher replacements, so at least the consumption issue is aided a little. I'm mostly concerned about damage to the console's harder-to-replace parts. Fortunately, I don't think much MD custom hardware interfaces directly with the cartridge. The CPU and voltage regulators are replaceable. The system arbiter and VDP on the other hand present bigger concerns.
All the cheapo 3.3v Neo-Geo multi-carts slowly killing the SNK ASICs over time are just as unnerving...
My Mega Everdrive looks like it has level translators going to the FPGA, but not the RAM that emulates ROM in some places. Hope I can get my UMDK soon! In my MD, I've replaced the LDOs with drop-in 5V switcher replacements, so at least the consumption issue is aided a little. I'm mostly concerned about damage to the console's harder-to-replace parts. Fortunately, I don't think much MD custom hardware interfaces directly with the cartridge. The CPU and voltage regulators are replaceable. The system arbiter and VDP on the other hand present bigger concerns.
-
- Very interested
- Posts: 89
- Joined: Mon Feb 24, 2014 6:04 pm
- Location: Kapuskasing, Ontario, Canada
- Contact:
Re: Interfacing CMOS 3.3V logic
I was not aware of this, but it certainly fits my point exactly.mikejmoffitt wrote:All the cheapo 3.3v Neo-Geo multi-carts slowly killing the SNK ASICs over time are just as unnerving...
What does db stand for? Well that's an excellent question...
http://www.db-electronics.ca
http://www.db-electronics.ca
-
- Very interested
- Posts: 2440
- Joined: Tue Dec 05, 2006 1:37 pm
- Location: Estonia, Rapla City
- Contact:
Re: Interfacing CMOS 3.3V logic
All the current that is burned off is supplied by all the outputs from those ASICs driving them, so it goes both ways. And in case of those NeoGeo carts, there's a ton of chips in parellel so it makes everything far worse.
If you're gonna use resistors you'll want some 470ohm ones, more is gonna get iffy because signal shape is gonna get poor and you may experience bad data, especially when there's more chips on those lines.
If you're gonna use resistors you'll want some 470ohm ones, more is gonna get iffy because signal shape is gonna get poor and you may experience bad data, especially when there's more chips on those lines.
Mida sa loed ? Nagunii aru ei saa
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
http://www.tmeeco.eu
Files of all broken links and images of mine are found here : http://www.tmeeco.eu/FileDen
-
- Very interested
- Posts: 89
- Joined: Mon Feb 24, 2014 6:04 pm
- Location: Kapuskasing, Ontario, Canada
- Contact:
Re: Interfacing CMOS 3.3V logic
And slow signal slew rate equals unnecessary power dissipation so really there's no way around it...TmEE co.(TM) wrote:If you're gonna use resistors you'll want some 470ohm ones, more is gonna get iffy because signal shape is gonna get poor and you may experience bad data, especially when there's more chips on those lines.
What does db stand for? Well that's an excellent question...
http://www.db-electronics.ca
http://www.db-electronics.ca
Re: Interfacing CMOS 3.3V logic
Thanks for taking the time putting up this very detailled answer, db-electronic.
So, to summarize, using resistor series as voltage divider creates a load on the cartridge port which results in a slight increase of the current going through not only cartridge but also console board parts, thus increasing heat dissipation and reducing component lifetime. Is that correct?
Those numbers (11 mA per pin, 260 mW in total) seems so low at first glance though, I would never have thought this could break the components specifications and damage them in the long run
So, to summarize, using resistor series as voltage divider creates a load on the cartridge port which results in a slight increase of the current going through not only cartridge but also console board parts, thus increasing heat dissipation and reducing component lifetime. Is that correct?
Those numbers (11 mA per pin, 260 mW in total) seems so low at first glance though, I would never have thought this could break the components specifications and damage them in the long run
-
- Very interested
- Posts: 89
- Joined: Mon Feb 24, 2014 6:04 pm
- Location: Kapuskasing, Ontario, Canada
- Contact:
Re: Interfacing CMOS 3.3V logic
11mA is a lot of current for a single pin, given that most 74HC series parts are in the 7.8mA per pin range.
As for power, it's always relative to package size. 1/4 watt is low for a light-bulb, but pretty significant for a TSOP-48 smt component.
As for power, it's always relative to package size. 1/4 watt is low for a light-bulb, but pretty significant for a TSOP-48 smt component.
What does db stand for? Well that's an excellent question...
http://www.db-electronics.ca
http://www.db-electronics.ca
-
- Very interested
- Posts: 86
- Joined: Fri Sep 25, 2015 4:16 pm
Re: Interfacing CMOS 3.3V logic
For single-direction communication, actually, isn't a voltage divider acceptable to bring a 5V signal to 3.3V using a suitable ratio? It's the single-resistor series drop that presents problems.