Logic Level Converters

yorkshire_spam

Active member
vacBacker
Credits
765CR
Has anyone got any experience using logic level converters eg. bi-directional 3.3v<->5v ?

I'm wondering how they perform in terms of switching times and stuff like that?

Cheers Sam
 

GadgetFreak

Active member
vacBacker
Feedback
7 (100%)
Credits
963CR
I recently did a prototype with the TXB0104's, they work, but I had issues with oscillation. It seemed that the way I was needing to use them could cause a cyclic triggering of the direction. They support signals down to 10ns.
I am probably going to do a temporary fix and use some of the MCP23017 with SPI bus and use a TXC0104 to handle the 3.3v<->5v level shift for the SPI bus. Though this will limit the speed I can drive the digital io at.
 

John Bennett

Senior Member
vacBacker
Feedback
10 (100%)
Credits
5,332CR
Have you looked at the SN74LVC4245ADWR ?
I was going to use that for a board (I shelved) as it seemed very convenient and the times were down in the single-digit nanoseconds for stuff, I think.
 

GadgetFreak

Active member
vacBacker
Feedback
7 (100%)
Credits
963CR
The 74LVC245's work well but are limited as all 8 lines only have a single direction control pin. For my use I need to be able to change any of upto 40 lines individually.
 

John Bennett

Senior Member
vacBacker
Feedback
10 (100%)
Credits
5,332CR
Ah, fair enough.
I don't know of a universal solution, I think you're down to basing the design on the criteria required:

Is it a fixed circuit or something that interfaces to a variety of devices?

Does it need to drive 5V CMOS or just TTL?

How fast do you want to read/write the pins?

How fast do you want to switch direction?

Do you want independent pin direction control?

What's the current drive requirement?
 

yorkshire_spam

Active member
vacBacker
Credits
765CR
I was thinking of "porting" the Arduino ICT tester to a Teensy or similar, so converting the logic levels would be a major part of that.
 

John Bennett

Senior Member
vacBacker
Feedback
10 (100%)
Credits
5,332CR
I should get into those Arduino ICTs - look very useful.

Are there strict timing requirements? I thought the code stepped through addresses in a fairly leisurely manner, rather than emulating a CPU at real-time.
 

yorkshire_spam

Active member
vacBacker
Credits
765CR
John Bennett said:
I should get into those Arduino ICTs - look very useful.

Are there strict timing requirements? I thought the code stepped through addresses in a fairly leisurely manner, rather than emulating a CPU at real-time.

The arduino ICT does just that - ignores the UUT clock (mostly) and just runs through addressing etc. The issue with that is where the UUT does "clever" things with the clock cycles to allow other circuits access to the bus/memory when the CPU is busy. Syncing to the UUT clock at that point is needed and can be achieved in a limited sense with the Arduino. The Arduino just doesn't have the processing Oooomph to emulate in real time. A Teensy might though!

Arduino Mega 2560 - 8 bit Microcontroller@16MHz

Teensy 3.6: 32 bit 180 MHz ARM Cortex-M4

Logic levels is the key.... as the sketch code used on the Arduino can be recompiled to execute on the Teensy (so I've been led to believe)
 

John Bennett

Senior Member
vacBacker
Feedback
10 (100%)
Credits
5,332CR
Very interesting
smiley16.gif


I use the XMC4xxx series micros a bit and I remember looking at bus interfacing. Despite the CPU being 144 MHz and similar MIPS, I couldn’t switch pins beyond 1MHz (with timing precision dying well before that). I assumed it was down to the internal limitations of the GPIO unit and the internal peripheral bus timings.
So interesting if other CPUs fare better.
 

John Bennett

Senior Member
vacBacker
Feedback
10 (100%)
Credits
5,332CR
Crikey, that does look pretty quick. I’ll have to have another look in case I missed something with the XMC, but I think I checked the assembler to make sure it was optimal. I didn’t just do a 50% square wave though as that doesn’t give you the full picture - maybe of was 1MHz where my pulse sequence deteriorated into just a square wave. Not much headroom for doing operations at those speeds anyway.
I hope you get something working with the teeny.
 

John Bennett

Senior Member
vacBacker
Feedback
10 (100%)
Credits
5,332CR
Might just be that the teeny is better than the XMC though
smiley4.gif

Seeing how fast it can read and then write a pulse is a good test. You can see if it’s consistent too, or if the GPIO clock is jittering it around. Probably not if they can approach 100MHz with the above tests though!

John Bennett2020-11-08 11:20:11
 

GadgetFreak

Active member
vacBacker
Feedback
7 (100%)
Credits
963CR
I have used Teensy's a lot. In fact the project I mentioned is using a Teensy 4.1 which clocks at 600Mhz. You can do direct port access and get some reliable fast bit flipping.

I had also thought about the ICT on a Teensy as you could do so much more with all that extra speed. It would be great to have it actually be able to run the CPU and give feedback.
 
Top