6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Apr 27, 2024 8:22 pm

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
PostPosted: Mon Feb 26, 2024 2:16 am 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
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 19 times
Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 3:13 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
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 25 times

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 8:38 am 
Offline
User avatar

Joined: Thu Dec 11, 2008 1:28 pm
Posts: 10793
Location: England
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 8:51 am 
Offline

Joined: Mon Jan 19, 2004 12:49 pm
Posts: 660
Location: Potsdam, DE
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 10:04 am 
Offline
User avatar

Joined: Mon Aug 30, 2021 11:52 am
Posts: 251
Location: South Africa
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 1:34 pm 
Offline

Joined: Tue Jul 05, 2005 7:08 pm
Posts: 990
Location: near Heidelberg, Germany
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/


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 3:42 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3346
Location: Ontario, Canada
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


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 6:02 pm 
Offline

Joined: Sat Jan 02, 2016 10:22 am
Posts: 197
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.


Top
 Profile  
Reply with quote  
PostPosted: Mon Feb 26, 2024 6:19 pm 
Offline
User avatar

Joined: Tue Feb 28, 2023 11:39 pm
Posts: 133
Location: Texas
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!


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 11 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: