[Q]Are resistors enough for converting SNES 5V signal to 3V

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
[Q]Are resistors enough for converting SNES 5V signal to 3V
by on (#128648)
While i am waiting for my parts to arrive from china for the MBC project, i am doing some research on some stuff on the SNES.

So, I was doing research on whether i could just put a 29L3211 into a cart with the same pinout and if there is going to be any damage to either the cart or the flash chip that does absolutely not support voltage higher than 3,8V. I came across a thread that mentions that it will not last long until the chip is going to malfunction due to the overvoltage on its inputs.


I came across the solution of using some kind of logic level converter to convert SNES 5V signal to 3,3V signal of the flash, but this would involve a heavy rewiring job.

Wouldnt resistors do the job for level converting? I thought of a voltage divider with 100ohm and 200ohm resistors to get about 3,3V from a 5V source. The connection would be like this:

AddressOut 5Vsource---100ohmResistor---AddressIn 3,3V(flash Chip)---200ohmResistor---GND

->Between the resistors would then be the 3,3V Out which connects to the addressinput of the flash chip.
I thought of using SMD resistors with Form factor 0603, which could easily fit on a soldering pad on a pcb.


Thanks in advance for anyone who is able to help.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128652)
A voltage divider will take care of the signals going from SNES -> 3.3V devices, but from what I have been told the opposite is what can be damaging in the long term to the SNES, and level shifters should be used there.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128655)
mikejmoffitt wrote:
A voltage divider will take care of the signals going from SNES -> 3.3V devices, but from what I have been told the opposite is what can be damaging in the long term to the SNES, and level shifters should be used there.

thanks for the quick answer, but how is it damaging, if the correct voltage is supplied to the 3.3V device?
I mean, from what i know, the only advantage of a level shifter in comparison to the voltage divider is that it will supply the 3,3V device with a higher current as there is near to no loss if using a level shifter, whereas the voltage divider will output only a very little current from the supplied one (correct if i am wrong). i think there should be possibly no damage, also on long term usage.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128663)
The SNES will not be harmed by receiving data from that's at 3V CMOS logic levels.

However, the 3V ROM cannot have its data bus connected to the SNES's 5V data bus without damaging both the ROM (overvoltage) and the SNES (signal line loading), and a voltage divider won't work there because the ROM needs to drive the output strongly (and resistors would prevent that).

Voltage dividers on ROM inputs will draw current from the address lines ALL the time, which is bad. A static current larger than ~1mA from a signal line is Bad and could eventually damage the SNES. 100Ω+200Ω=300Ω ; 5V÷300Ω=17mA. While using substantially larger resistors (say, 3.3kΩ and 6.8kΩ) sounds like it should work, and INL's SNES reproduction board uses it for four of the address lines, some people have warned me off it.

It damages the ROM because all ROMs have overvoltage protection diodes on almost all pins (sometimes not A9 for historical reasons) that go to their Vcc and from ground (so that voltages above Vcc are dumped onto the Vcc rail, and voltages below ground are dumped onto the ground rail). Even if the 3V regulator is good enough to keep the ROM's power rail at 3V, these diodes work out to be the preferred path to power the ROM, and then it will draw the entirety of power needed to power the ROM from the signal lines, damaging the SNES. And, if the current isn't limited by a resistor or level converted, you could exceed the ability of the regulator to control the supply voltage below what the ROM can accept. Finally, not all voltage regulators protect their output against overvoltage.

Another experiment that one occasionally hears about involves just using a resistor array as current limiters, and intentionally using the overvoltage diodes in the ROM at some very low current (say 500µA or less). The diodes are not designed for continuous use, so one of them could eventually fail, and then overvoltage could damage the device.

But even if all that weren't true, the inputs are most likely not made with a technology that is designed to withstand a voltage higher than 3.8V, possibly causing things like dielectric breakdown of the inputs' MOSFET gates.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128667)
lidnariq wrote:
Voltage dividers on ROM inputs will draw current from the address lines ALL the time, which is bad. A static current larger than ~1mA from a signal line is Bad and could eventually damage the SNES. 100Ω+200Ω=300Ω ; 5V÷300Ω=17mA. While using substantially larger resistors (say, 3.3kΩ and 6.8kΩ) sounds like it should work, and INL's SNES reproduction board uses it for four of the address lines, some people have warned me off it.

thanks for the info.
So, if i undestood you correctly, i did just choose too low values for the resistors, so if i were to use let's say 10k and 20k resistors(values i can get easily in 0603 form factor), which would result in a current draw of about 167µA, it should be fine?

the dataIO lines actually do need also a level shifter, because when the game writes to sram, it also sets the voltage on the rom chip, which could do damage the rom, am i right?
what about putting some diodes on the data lines, so this would only allow for voltage to go from rom to snes and preventing the snes to set a voltage on the rom chips dataIOs. this should solve the problem, or am i wrong?
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128670)
SNgamer wrote:
So, if i undestood you correctly, i did just choose too low values for the resistors, so if i were to use let's say 10k and 20k resistors(values i can get easily in 0603 form factor), which would result in a current draw of about 167µA, it should be fine?
At some point the effective resistance becomes large enough that the time constant for the resistor and parasitic capacitance of the input is too large and you'll have timing issues. I don't know where that is, though. That said, you really shouldn't have difficulty getting any size of resistor in 0603s.
Quote:
the dataIO lines actually do need also a level shifter, because when the game writes to sram, it also sets the voltage on the rom chip, which could do damage the rom, am i right?
Yup.
Quote:
what about putting some diodes on the data lines, so this would only allow for voltage to go from rom to snes and preventing the snes to set a voltage on the rom chips dataIOs. this should solve the problem, or am i wrong?
Won't work because the ROM needs to be able to drive its outputs both up and down. You'll really need some kind of IC here, whether a level-shifting octal buffer or one of the GTL2xxx/NVT2xxx transistor clamps.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128673)
OK, now, if I haven't understood something wrong from what you wrote, the resistors on the addresslines can be used, as long as i consider the timing issue (i read that there is a solution for compensating this capacitance defeating the issue).
and for the datalines i would need a levelshifter in order to get it to work properly.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128678)
From what I've read it sounds like you really should use proper level shifting (like a purpose made IC) for all connections between 3.3V and 5V signals. Better safe than sorry you might say.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128694)
A valid approach to the problem, which I myself implemented on a homemade board, is to use 100KOhm resistors in A-1 to A20 going into 29L3211 (22 address lines in byte mode), so you shift 5V (even less since voltage losses in the cartridge edge) to 3V. There aren't timing issues since 29L3211 is asynchronous and adress is latched up far after all address lines are stable (the input latch enable is decoded from /CE and /OE).
The data lines are level-shifted by a 3V-tolerant input octal bus transceiver with tri-state outputs, this way assuring 5V data level reaches the SNES CPU in all data bus lines.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128695)
100Ω as a current limiter in combination with misusing the overvoltage protection diodes intrinsic to a 3V part is definitely abusing the SNES's address bus drivers.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128697)
lidnariq wrote:
100Ω as a current limiter in combination with misusing the overvoltage protection diodes intrinsic to a 3V part is definitely abusing the SNES's address bus drivers.


Not only the SNES, but the 29L3211 input buffers :? I forgot a 'k': they're 100KOhm resistors in order to apply 20uA max to each 29L3211 address pin. That makes now more sense with my above explanation about discarding slew-rate issues, because latch is enabled far after addresses reach their final voltage value.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128705)
magno wrote:
lidnariq wrote:
100Ω as a current limiter in combination with misusing the overvoltage protection diodes intrinsic to a 3V part is definitely abusing the SNES's address bus drivers.


Not only the SNES, but the 29L3211 input buffers :? I forgot a 'k': they're 100KOhm resistors in order to apply 20uA max to each 29L3211 address pin. That makes now more sense with my above explanation about discarding slew-rate issues, because latch is enabled far after addresses reach their final voltage value.

I will probably use the resistors on the Addresslines and a levelshifter on the datalines. This seems to be the safest way of doing it. Now on a special mapper Cart like the SA-1 or the SDD-1, does the Rom run in 16bit mode or in 8bit mode? Would be useful to know, so i can get the proper level shifter.

Anyway, thanks so far for the input.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128709)
I believe SA-1 uses a 16-bit ROM. I think SDD-1 does too.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128711)
MottZilla wrote:
I believe SA-1 uses a 16-bit ROM. I think SDD-1 does too.

Yes, they sure do both use 16bit ROMs, but my question is if they also use the 16bit mode of the ROMs, or if they only use 8bits on their ROM chips. I want to know, if I have to hook up D8-D15 to a levelshifter, or if I can leave them just floating (and connect D15 as A-1).
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128712)
SA1 definitely uses the full 16-bit data bus, I'd assume the SDD1 does as well, otherwise they could easily have just use an 8-bit chip instead.
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128713)
qwertymodo wrote:
SA1 definitely uses the full 16-bit data bus, I'd assume the SDD1 does as well, otherwise they could easily have just use an 8-bit chip instead.

Thanks, then I have to connect two buffers. I think 74HC245 should be suitable for this, or am I wrong?
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128714)
The 74HC family is not; it requires the input be the same logic level it's powered, and I don't think its pins are overvoltage tolerant.
The 74HCT family would work, if powered at 5V, because 3.3V from the ROM is above the TTL logic high threshold.
The 74LCX16244 is one of the better active solutions (3V supply, unidirectional, 16 bit bus).
Re: [Q]Are resistors enough for converting SNES 5V signal to
by on (#128715)
lidnariq wrote:
The 74HC family is not; it requires the input be the same logic level it's powered, and I don't think its pins are overvoltage tolerant.
The 74HCT family would work, if powered at 5V, because 3.3V from the ROM is above the TTL logic high threshold.
The 74LCX16244 is one of the better active solutions (3V supply, unidirectional, 16 bit bus).

Thank you very much for your suggestion, I will then get some of those.