Pushing the 3.3V<->5V envelope - Page 1
Forum section: electronics / projects

author: rea5245
author_rank: Frequent Contributor
timestamp: November 21, 2019, 03:28:22 pm
content: I want to interface a 6502 to a modern microcontroller, a PIC32MZ. The PIC32 has some 5V tolerant pins, but not enough. Instead of using a level shifter, my idea is to run the PIC32 at 3.6V (which is allowed by spec) and wire it directly to the 6502. I've measured some voltages on the 6502's data and address lines and they seem to go no higher than 3.5 or 3.6V. Meanwhile, the "absolute maximums" spec for the PIC32 says that input pins can handle Vdd+0.3V.It sounds like I can get away with this. Am I playing with fire, or am I OK?Thanks,Bob

author: Chris_Walch
author_rank: Contributor
timestamp: November 21, 2019, 03:32:50 pm
content: You could use a 3.3V variant of the 6502https://www.westerndesigncenter.com/wdc/documentation/w65c02s.pdf

author: rea5245
author_rank: Frequent Contributor
timestamp: November 21, 2019, 03:44:21 pm
content: This is vintage hardware. It already has a 5V 6502 and lots of 5V support chips.- Bob

author: Chris_Walch
author_rank: Contributor
timestamp: November 21, 2019, 03:56:49 pm
content: Outputing signals from the PIC to the 6502 should work as the threshold seems to be around 2.4V.The output stages of the CMOS 6502 variants pull the signals quite close to the supply voltage.So connecting an 5V output of the 6502 to the PIC input might cause problems.

author: james_s
author_rank: Super Contributor
timestamp: November 21, 2019, 03:59:48 pm
content: I'd probably use some resistors in series with the lines, I've used that technique before as a quick hack and it worked fine.

author: rea5245
author_rank: Frequent Contributor
timestamp: November 21, 2019, 04:31:11 pm
content: Quote from: Chris_Walch on November 21, 2019, 03:56:49 pmThis is a SYM-1 using a Synertek 6502 implemented in "N channel, silicon gate, depletion mode technology". (Would that be NMOS?)- Bob

author: Chris_Walch
author_rank: Contributor
timestamp: November 21, 2019, 04:53:17 pm
content: The Synertek 6502 ist NMOS, so you could try the hack suggested by james_s.Or level shifting with diodes, zeners, etc.

author: rea5245
author_rank: Frequent Contributor
timestamp: November 21, 2019, 04:57:19 pm
content: Quote from: Chris_Walch on November 21, 2019, 04:53:17 pmBut is it even necessary? My voltage readings suggest the 6502's outputs are 3.6V or less. If true, that should be fine for a microcontroller running at 3.6V. Or am I missing something? Do NMOS outputs peak at 0.7 * Vdd?- Bob

author: Chris_Walch
author_rank: Contributor
timestamp: November 21, 2019, 05:10:06 pm
content: On the SYM-1 all the RAMs and ROMs are directly connected to the CPUs address and data bus, so there's quite a load.The level on these lines really depends on the number of chips connected.If the level ist down to 3.6V then it could be ok to connect a PIC directly.

author: SiliconWizard
author_rank: Super Contributor
timestamp: November 21, 2019, 05:10:38 pm
content: Quote from: rea5245 on November 21, 2019, 04:57:19 pmAccording to the datasheet:http://www.6502.org/documents/datasheets/synertek/synertek_sy6500_microprocessors.pdfthe output HI level is 2.4V min. They don't state a max value, but I'd venture the typical value likely depends significantly on each individual CPU and of course, the load. The fact they don't is itself an indication it shouldn't be assumed at any specific level IMO. It could likely get above 3.6V on some chips. Could also vary with temperature... Designing based on a measurement, and not on rated specs, is generally not a good idea. If this is a one-off project strictly, and you're sure you will never use any other machine that the one you measured it on, that may be acceptable (up to you), although again it may depend on temperature and may get much higer as temperature rises?, but in general, it wouldn't be.I think adding series resistors, like james_s suggested, would be a reasonably safe approach with minimal added cost. It will additionally be better for EMI!

author: Chris_Walch
author_rank: Contributor
timestamp: November 21, 2019, 05:25:24 pm
content: You could remove all the RAM, ROM and IO chips from their sockets and measure the CPU signals.That should give you an idea of the maximum level.

author: Siwastaja
author_rank: Super Contributor
timestamp: November 21, 2019, 06:02:07 pm
content: Quote from: rea5245 on November 21, 2019, 04:57:19 pmThe actual output voltage is likely dependent on unit variation and operating temperature, so I'd add some series resistance to limit current into the PIC's protection diodes in case the voltage does end up even just a little bit over Vccpic+0.3V. Adding some 220ohms likely won't slow down the IO too much, but limits the current below 1mA even if the output voltage rises up to around 4.1V.