Question about the 74LVC245s

Topics relating to PALs, CPLDs, FPGAs, and other PLDs used for the support or creation of 65-family processors, both hardware and HDL.
Post Reply
User avatar
Yuri
Posts: 371
Joined: 28 Feb 2023
Location: Texas

Question about the 74LVC245s

Post by Yuri »

I've been working on a small converter board for this Cyclone V FPGA board I have so that I might try and experiment with making my own PPU with it.
(Also may try making an attempt at my own Paula type sound system with it)

The thing I've run into (unsurprisingly) is that the FPGA is a 3.3V device and I'm running my 6502 at 5V CMOS levels.

The board has a GPIO header using a 40 pin IDC connector, and near as I can tell it would not be happy with me shoving 5V logic down that way.

With the 74LVC245s, the data sheet in several places says it is quite happy to go from 5V down to 3.3.
What isn't clear to me is if/how you go back from a 3.3V to 5V.

I thought I had read in the datasheet that it used the level of the DIR pin to figure this out, but now that I've gone back and reread the PDF, I don't see that, so I'm guessing I just imagined it.

Anyhow, I have attached a PDF of the circuit I'm trying to build; it'd be helpful if someone could clarify this for me.
Attachments
Iris65.pdf
(440.67 KiB) Downloaded 122 times
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Question about the 74LVC245s

Post by Dr Jefyll »

Hi, Yuri. No, that chip operates from a single power supply (in the range 1.65 V to 3.6 V), and it can't output a voltage higher than its own power supply. However, it is able to tolerate input voltages that exceed the supply. That's why it's able to convert down but not up.

For further info and alternative solutions, see the attached document.

-- Jeff
Attachments
Selecting the Right Level-Translation Solution scea035a.pdf
(313.3 KiB) Downloaded 139 times
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
BigEd
Posts: 11463
Joined: 11 Dec 2008
Location: England
Contact:

Re: Question about the 74LVC245s

Post by BigEd »

In brief though, isn't the story that it mostly doesn't matter? When a 5V device sees 3.3V on an input, it will interpret it as a logic 1? With only a few exceptions.
barnacle
Posts: 1831
Joined: 19 Jan 2004
Location: Potsdam, DE
Contact:

Re: Question about the 74LVC245s

Post by barnacle »

Generally, yes. Or you could use 74lvc4245 https://www.ti.com/general/docs/supppro ... 74lvc4245a which is bidirectional between 5v and 3v3 with two voltage rails.
User avatar
AndrewP
Posts: 368
Joined: 30 Aug 2021
Location: South Africa

Re: Question about the 74LVC245s

Post by AndrewP »

Seconding barnacle I use the 74LVC4245 to up-translate from TTL levels to the 65xx's 5V CMOS levels. You could use a pair of them (or an 74LALVC164245) if you need to up-translate the clock, interrupts, BE, RDY etc... too.

You could also use something like a 74ABT245. Or a FCT or any similar 74xxT245 chips as they have TTL inputs but much greater than 2.4V logic one outputs ... typically greater then 4.5V from what I've measured. It's worth noting if you're using them for data lines then the 3.3V device on the other side must be 5V tolerant (unlike if you're using an LVC4245).

Lastly, as what BigEd has said, LVC swings pretty close to 3.3V so you'll probably be fine in hobbyist conditions.
fachat
Posts: 1123
Joined: 05 Jul 2005
Location: near Heidelberg, Germany
Contact:

Re: Question about the 74LVC245s

Post by fachat »

The 74lvc4245 makes sense for bidirectional lines.

I've used 74hct244 and 74hct245 (with fixed direction) to level up from 3.3V to 5V. They have TTL inputs, so happily accept 3.3V high as TTL high as well.

See schematics for example here https://github.com/fachat/csa_ultracpu

André
Author of the GeckOS multitasking operating system, the usb65 stack, designer of the Micro-PET and many more 6502 content: http://6502.org/users/andre/
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Question about the 74LVC245s

Post by Dr Jefyll »

BigEd wrote:
In brief though, isn't the story that it mostly doesn't matter? When a 5V device sees 3.3V on an input, it will interpret it as a logic 1? With only a few exceptions.
Yes, that's usually alright, and is a point worth remembering. But unfortunately the chip Yuri suggested isn't rated to run at 5V.

And the fact we're dealing with bidirectional signals (for the data bus) raises other gotchas. For example, during a read operation an 'HCT or 'AHCT245 operating from a 5V supply can quite readily accept 3.3V inputs from the FPGA and pass them at 5V levels to the CPU. Less advisably, even an 'HC or 'AHC245 (no 'T') could probably do the same. But when the direction reverses for a write operation, the chip will input 5V levels and also output 5V levels back to the 3.3V FPGA... :|

For these situations, the '4245 has extra pins so it can accept both a 3V and a 5V supply, allowing it to output 3V signals to one bus and 5V signals to the other.

-- Jeff
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Martin A
Posts: 197
Joined: 02 Jan 2016

Re: Question about the 74LVC245s

Post by Martin A »

I used the LVC244 to down shift 5v from a Z80 to a cyclone II FPGA.

Going the other way used an HCT245 with the direction locked because that was what I had in stock. The HCT244 would have been just as good.

Both parts are through hole, easier for prototyping.
User avatar
Yuri
Posts: 371
Joined: 28 Feb 2023
Location: Texas

Re: Question about the 74LVC245s

Post by Yuri »

Dr Jefyll wrote:
BigEd wrote:
In brief though, isn't the story that it mostly doesn't matter? When a 5V device sees 3.3V on an input, it will interpret it as a logic 1? With only a few exceptions.
Yes, that's usually alright, and is a point worth remembering. But unfortunately the chip Yuri suggested isn't rated to run at 5V.

And the fact we're dealing with bidirectional signals (for the data bus) raises other gotchas. For example, during a read operation an 'HCT or 'AHCT245 operating from a 5V supply can quite readily accept 3.3V inputs from the FPGA and pass them at 5V levels to the CPU. Less advisably, even an 'HC or 'AHC245 (no 'T') could probably do the same. But when the direction reverses for a write operation, the chip will input 5V levels and also output 5V levels back to the 3.3V FPGA... :|

For these situations, the '4245 has extra pins so it can accept both a 3V and a 5V supply, allowing it to output 3V signals to one bus and 5V signals to the other.

-- Jeff
Yea, the LVC245 was what seemed like the prevailing wisdom (such as it is) on the net, but when I was looking at it questions came up in my head. I'm glad I asked now.
BigEd wrote:
In brief though, isn't the story that it mostly doesn't matter? When a 5V device sees 3.3V on an input, it will interpret it as a logic 1? With only a few exceptions.
Yes and no. If you're working with TTL it does (as per the document linked by Dr. Jefyll). 3.3V on CMOS however is not sufficient to make a high level signal. The document states that the HTC parts are TTL level logic, but output CMOS signals; so that is one solution.

I was thinking that there was a part like 4245, but I could not for the life of me remember what it was.

Thanks for the feed back!
Post Reply