Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 4 of 4

Thread: 74hct245 3.3 to 5v level shifting

  1. #1

    74hct245 3.3 to 5v level shifting

    I am working on a project to replace a z80 based controller board on a large studio mixing console.

    I have a fully functioning replacement using an arduino mega2560 rev 3. Now I move to building a production board and I want to use a teensy 4.1. apart from the speed and memory gains, the main thing for me is the native usb midi.

    I read a post here where paul stoffregen says it is ok to use 74hct245 octal bus tranceivers to bridge the 3.3v logic lines to 5v. The original z80 board from the 80s uses 245 chips to act a bus buffers and a direction switch on the data bus - perfect. I have made a schematic and pcb layout based on these concepts and I get to wondering if I have all bases covered before I go and order some PCBs.

    In my circuit, I use 3 74HCT245 to connect my address. data and system bus lines to the console (exactly as the z80 was). the Z80 was on a Eurocard which slots neatly into a 10 way backpane. I found the correct connector and a kicad template for eurocard.

    The eurocard allows connection to other boards via 8bit data bus and related address / control lines. I am yet to fully explore this. It uses 2x 7hHC688 comparators on the address lines, and another 74HCT245 for the databus.

    The eurocard also provides 5v power from the console. Nice clean power - so I am definitely using that. I will obviously cut the trace on the 4.1 to isolate the USB power.

    I am a bit confused on whether I should step down using the teensys 3.3v pin to power the rest of the voltage lines on my new card, or leave everything powered at 5v. Paul talked about using these 245 chips - and I cant find the post anymore.

    So can I stick to 5v on the board for my circuit - will this be OK for the teensy 4.1 pins? they are only connected to to these chips, or to headers to go off to switch panels and displays via ribbon cables with power for the displays and switches.

    Here is my schematic:

    schematic for pjrc forum.pdf.
    Last edited by snowsh; 11-22-2021 at 01:07 AM.

  2. #2
    Senior Member
    Join Date
    Jul 2020
    Posts
    1,368
    The Teensy 4's will be destroyed by 5V on any pin. To convert from 5V to 3V3 I'd recommend families like 74LVC and 74LCX which run at 3.3V
    but have 5V tolerant inputs.

    A bidirectional bus driver like the 245 is not going to be useful communicating between different voltages since it always outputs
    the same voltage. Perhaps a 74HCT244 going from 3V to 5V out, and a 74LVC244 going the other way - the OE pins of each will
    respond to 3V logic.

  3. #3
    Quote Originally Posted by MarkT View Post
    The Teensy 4's will be destroyed by 5V on any pin. To convert from 5V to 3V3 I'd recommend families like 74LVC and 74LCX which run at 3.3V
    but have 5V tolerant inputs.

    A bidirectional bus driver like the 245 is not going to be useful communicating between different voltages since it always outputs
    the same voltage. Perhaps a 74HCT244 going from 3V to 5V out, and a 74LVC244 going the other way - the OE pins of each will
    respond to 3V logic.
    I still havent found the post where paul explains more, but here is somthing:

    https://forum.pjrc.com/threads/68108...739#post287739

    Teensy LC has a 5V buffer chip built in, connected to pin 17. The best way to use this buffer is leave pin 17 unused by your program (the pin defaults to a low power disabled state), and connect the data signals from pin 24 (or any other supported pin) to pin 17. Then connect the WS2812 LEDs to the 5V signal output.

    For Teensy 3.x, a separate 5V buffer chip should be used. Unidirectional buffer chips like 74HCT245 and 74AHCT125 are best. Do NOT use these mosfet transistor level shifters. They are far too slow for WS2812 LED data.

  4. #4
    found it:
    https://forum.pjrc.com/threads/25549...evel-converter

    Quote Originally Posted by PaulStoffregen View Post
    Why would an AND gate not function as a level shifter?

    It's got the same TTL level thresholds (worst case high > 2.0V, worst case low < 0.8V). The HCT08 output is specified at 4 mA currents instead of 6 mA, but it's still a true 5V push-pull drive that's plenty strong enough for a line (through a series termination resistor) to the LED strip.

    Both chips have the same TTL level logic input circuit (a specific ratio of mosfet sizes: an oversized N-channel so the logic threshold is nominal 1.6 instead of 2.5), some logic inside the chip involving multiple inputs which ultimately turns on a mosfet transistors connected to the output pin. Even though the '245 is depicted as a pair of buffers, inside the chip is it certainly implemented as several logic gates based on the 3 input signals which create 2 internal logic signals that drive the 2 big mosfet transistors connected to the output pin.
    I suppose in this case Paul is talking about using it in one direction only? In which case the 245 will be OK for my address / control lines... what about the bi directional data bus?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •