6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Jul 02, 2024 11:17 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Wed Jan 10, 2018 12:30 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10838
Location: England
Nearby, I wondered if it would be good to have a sticky thread about the various possible approaches, and the pitfalls, in interfacing 5V devices with modern 3V3 devices.

This thread, then, is seeking input from those in the know, as to what techniques they have used or seen, and what they like or don't like about them. Links to previous discussions, posts, or answers elsewhere on the web would be appreciated!

If we get some good materials together, one or other of us can write a good head post for a new thread, which maybe Garth will feel is worth making sticky. But even if not, it will be easy to search for it. Of course, I'll link to that thread, if and when it exists, from this head post.

This was my thought:
Quote:
It almost feels like we need a sticky thread on 3.3V interoperation. There are very fast bidirectional level shifters available (see OHO's products) and there's at least one 74 series family which can be used to bridge the gap. In a case like this, if the 6502 writes to an octal latch then the Prop will have plenty of time to read the value. Another approach we see is using a CPLD for combination glue and level shifting.


Top
 Profile  
Reply with quote  
PostPosted: Wed Jan 10, 2018 12:37 pm 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10838
Location: England
There are some DIP parts specifically for level shifting:
- 74AHCT125 - Quad Level-Shifter (e.g. here.)
- 74LVC245 - Breadboard Friendly 8-bit Logic Level Shifter (e.g. here.)

See also this previous thread:
- How do we handle the loss of 5V CPLDs?
which mentions
Quote:
The FPGA modules from OHO (called GODIL and GOP) include SMD level converters to provide 5V compatibility - might be worth looking into. They are very wide, but not cheap. They are bidirectional - there's an enable input but no direction input.
74CB3T16211, 24-way, about £3, http://www.ti.com/lit/ds/symlink/sn74cb3t16211.pdf
The 16-bit wide 74ALVC164245 might be useful, and is about half the price - it's directional so you need a control to say which direction you're driving in.

Edit to add: Michael has successfully used TI's 4-bit level shifter TXB0104PWR which costs about £1 and has a 7.4ns propagation delay. (SMD)


Also in that thread, pointers to Xilinx' 5V tolerant CPLDs, such as the XC9536XL, and to Altera, Atmel and Lattice parts.


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 27, 2018 7:09 am 
Offline

Joined: Thu Jan 16, 2003 12:55 pm
Posts: 64
Location: Indianapolis
Still looking for input?

In addition to 74LVC, some other 5V-tolerant families are VHC, AHC, LCX, and LVT.

If you need 5V outputs, there are '8T' parts like 74LVC8T245. It's a '245 but with dual power supplies, so you can output 5V on one side.

There is a type of bidirectional level translator where the direction is automatically sensed by the chip. FXMA108, and NVT2008 are a couple of the 8 bit wide ones.

GreenPAK chips by Silego (now Dialog) are really neat. They can operate at 5V (they have dual-supply ones too). Compared to CPLDs there are very few LUTs, DFFs, or I/Os. But they have additional hardware like a counters, oscillator, analog comparators, etc. The config memory is OTP, they're intended to be factory programmed. But they are RAM based, and on the i2c ones you can reconfigure them in-circuit. I've been having some fun with these.


Top
 Profile  
Reply with quote  
PostPosted: Mon May 14, 2018 11:25 pm 
Offline

Joined: Fri Sep 18, 2015 5:01 am
Posts: 20
If you are interfacing with legacy 5V TTL and such, I recommend the dual-voltage devices like SN74LVC8T245DGVR and others in that family. I have also used the 245 variant that is a 3.3V device with 5V tolerant I/O, and they can't take any abuse from the 5V side in case of things like glitches and such.

I have also messed with the "auto-sense" level shifters, but for bi-directional buses I'm not sure how well they work. I never got a good feeling from them.


Top
 Profile  
Reply with quote  
PostPosted: Tue May 15, 2018 5:24 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1003
Location: Canada
If you only need it for 1 or 2 lines and don't need blinding speed, you can make a bidirectional signal level translator with a little MOSFET like a 2N7000. I did a brief write-up on this a while back.
Attachment:
LLT.jpg
LLT.jpg [ 23.36 KiB | Viewed 3986 times ]


Attachments:
Signal Level Translation.doc [198.5 KiB]
Downloaded 154 times

_________________
Bill
Top
 Profile  
Reply with quote  
PostPosted: Wed May 16, 2018 12:58 am 
Offline

Joined: Fri Sep 18, 2015 5:01 am
Posts: 20
Bill, what happens if you tri-state one side of that circuit? What does the output on the other side do?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 16, 2018 7:32 am 
Offline
User avatar

Joined: Wed Mar 01, 2017 8:54 pm
Posts: 660
Location: North-Germany
There are pullups one either side of the MOSFET. How can you tristate that?


Top
 Profile  
Reply with quote  
PostPosted: Wed May 16, 2018 12:57 pm 
Offline
User avatar

Joined: Fri Dec 12, 2008 10:40 pm
Posts: 1003
Location: Canada
Yes, they are only pull-ups, not totem poles. Like any line (/IRQ 0r /NMI for 6502 examples) that is pulled up with a resistor this line can be driven to whatever state you like, so the use of such a circuit is fine on a 3-state line. 3-state is only required for lines that have active (totem pole) pull-ups.

Just think about it for a while.

Here is an example: Lets say one side goes high-z so that the other side can take control of the line, then both sides will be pulled high until the controlling side asserts the line one way or the other. No conflict occurs.

_________________
Bill


Top
 Profile  
Reply with quote  
PostPosted: Wed May 16, 2018 7:34 pm 
Offline

Joined: Tue Jan 23, 2018 2:55 pm
Posts: 43
Few remarks on avoiding the active level translators:
1. MOST of inputs of MOST of 5V ICs accept TTL levels, which meand that they are happy to be fed with 3.3V outputs. MOST is the keyword here. Especially in NMOS microprocessors clock inputs may require close-to-5V drive. It's always a good idea to lokk at the datasheet.
2. Some 3.3 V ICs accept 5V input levels at MOST of their inputs - this is the case of STM32 MCUs I use in my SDC_One design.
3. MOST of 3.3V ICs are quite happy with input "level translation" with just series resistors 3k..10k between 5V logic output and 3.3 V logic input. No magic here - most ICs have parasitic diodes and in most of them the allowed current is quite reasonable - form 50 uA to few mA - check the datasheet for Iihmax or "injection current". Not all the vendors specify these parameters.
4. It's possible to produce 5V output from 3.3V microcontroller with 5V-tolerant pins - by setting the 5V-tolerant output to open drain mode and pulling it up externally with 1k5..4k7. That's what I do in SDC to feed the clock signal to NMOS Z80. With 1k5 it works up to approx 5 MHz.
5. Another trick: In a non-noisy environment (like on the desk), no RS232 level transceivers are needed to connect a microcontroller to a PC. If the uC has the option of switching the UART pins polarity, TxD may directly feed the RS232 data input and 47k resistor is enough to "translate" RS232 output levels to uC's RxD input. An important note: with 3.3V - powered uC you can safely do this trick only with NON-5V- tolerant inputs. A 5V-tolerant one may be destroyed, at least in theory. In practice, the trick works equally well with all inputs.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron