6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Jun 02, 2024 2:01 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: SPI MISO Mixed Voltage
PostPosted: Mon Aug 07, 2017 4:35 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
Just want to double check something with y'all.

Namely, I've got an SPI MISO line going into VIA input pin PB7, which is connected to two SPI devices. One device is 5V, the other 3.3V. The VIA (and most of the system) are on 5V.

My concerns are twofold:

1. According to the VIA datasheet, to be recognised as a logic high the signal must be Vdd X 0.8... 5V x 0.8 = 4V which is 0.7V too high for 3.3V. Now, I believe that that the VIA datasheet is conservative in many of its numbers, and -normally- CMOS inputs can cope with logic highs as low as 2.7V with Vdd=5V, so I suspect that actually it'll work with 3.3V=High fine, but I want to see if anyone has any experience? If it won't, then I need to translate the 3.3V up to 5V.

2. When the 5V device is selected, the 3.3V device will tristate its MISO pin. I'm therefore believe that the 5V won't get into the 3.3V device and blow up its internals, but again I'm not certain. Unfortunately the datasheet for the 3.3V device does not specify if it is 5V tolerant when tristated.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 07, 2017 4:55 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
It would help if you specify the devices so everybody can take a look at the datasheets.

1. 80% Vdd seems quite high. I have used 8 bit AVRs at 5V specified to have a high threshold at 40 - 60% Vcc with 3.3V logic levels and that worked.

2. A 3.3V device is only 5V tolerant when the upper clamp diode of an input pin is omitted. Otherwise you are charging 5V through the diode into the 3.3V power rail! You should be able to detect the diode with a DVM (Pin -->|-- Vdd).

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 07, 2017 5:03 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
VIA: W65C22S
5V Device: FM25W256
3.3V Device: NHD-2.7-12864UMY3 (specifically the MF_SO pin)

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 07, 2017 5:25 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8448
Location: Southern California
It's not guaranteed to work. I would remedy that with a section of a 74HCT125 tri-state buffer. Mouser thru-hole choices are shown here, and data sheet at http://www.ti.com/lit/gpn/sn74hct125 .

_________________
http://WilsonMinesCo.com/ lots of 6502 resources
The "second front page" is http://wilsonminesco.com/links.html .
What's an additional VIA among friends, anyhow?


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 07, 2017 6:47 pm 
Offline

Joined: Sat Jul 28, 2012 11:41 am
Posts: 442
Location: Wiesbaden, Germany
You probably noticed that you can run the SPI-RAM also at 3.3V, but that is not helpfull if you need to run the W65C22S at 5V. The display is definitely not 5V tolerant. I would recommend a proper logic converter like below.
Attachment:
voltage_converter.png
voltage_converter.png [ 34.91 KiB | Viewed 1315 times ]

_________________
6502 sources on GitHub: https://github.com/Klaus2m5


Top
 Profile  
Reply with quote  
PostPosted: Mon Aug 07, 2017 8:14 pm 
Offline
User avatar

Joined: Tue Oct 25, 2016 8:56 pm
Posts: 360
Yea, I had a feeling that the screen wouldn't cope with 5V, even when tristated. Nevermind, I just won't use the Font ROM. I didn't really need it anyway, it just seemed a shame not to hook it up since it was there.

_________________
Want to design a PCB for your project? I strongly recommend KiCad. Its free, its multiplatform, and its easy to learn!
Also, I maintain KiCad libraries of Retro Computing and Arduino components you might find useful.


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

All times are UTC


Who is online

Users browsing this forum: Google [Bot], Paganini and 21 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: