6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Tue Sep 24, 2024 5:22 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: NMOS to 3.3v
PostPosted: Fri Oct 18, 2013 2:46 am 
Offline

Joined: Fri Sep 20, 2013 4:35 pm
Posts: 32
Hi Gang,

I am attempting to interface my NMOS 6522 to a 4GB MicroSD card. I purchased a TI TXB0104 to convert between 5V and 3.3V. However, I'm seeing some strange behavior. I stick the multi meter on one of the 3.3V outputs on the A side. The corresponding B side is connected to a 6522 port that has been configured as an output (high bit in the DDR) and is low (low bit in ORB). I read 0 volts on the 3.3 side - good. Then, I toggle it high by writing a 1 bit to ORB. It goes to 1.65 volts. Odd. I then remove the multi meter probe from the output pin and put it back (changing nothing else) and suddenly it reads 3.3V - good.

I also see a similar behavior if I look at the 6522's pins using a logic analyzer. After sending some clocks, the clock line appears to be 'stuck low'. If I remove and reconnect the probe it has somehow gone high.

I'm not sure exactly what's going on here, but I suspect it has something to do with why the card won't respond to my commands. I am considering a different strategy for interfacing the NMOS 6522 to the 3.3V SD card. I scrounged some old posts and found Andre Fachat's method along with this one: http://www.ele.uva.es/~jesus/6502/perif_schem.pdf With the latter, he is just using voltage dividers (although different values for MOSI, SCK, and CS). I read somewhere else that a 3.3V output is enough to be considered a TTL "high", so that explains the direct connection on this circuit.

What's your favorite method for making the transition?

On the software side, I am bringing CS high, writing out 10 $FF bits using Garth's code, dropping CS, sending CMD0 (0x400000000095), and receiving nothing but $FF back for the next 256 frames. Also confirmed that the SD card's DO is high after such operations.


Top
 Profile  
Reply with quote  
 Post subject: Re: NMOS to 3.3v
PostPosted: Fri Oct 18, 2013 4:42 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8514
Location: Southern California
I haven't used NMOS since 1985 to know for sure, but I think it won't pull up high enough to hurt your 3.3V part even if you connect it directly. If it can pull up higher, it won't be enough to turn on the 3.3V part's input-protection diodes and give them anywhere near enough current to hurt them. Do measure it though, and see what you get.

The other thing is that it kind of sounds like you don't have the ground connection on the voltage converter IC.

_________________
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  
 Post subject: Re: NMOS to 3.3v
PostPosted: Fri Oct 18, 2013 5:17 am 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Quote:
it won't be enough to turn on the 3.3V part's input-protection diodes and give them anywhere near enough current to hurt them.
Hmm... With this setup, any current passing through the protection diodes will tend to raise the 3.3V supply. So, in addition to measuring input current, it's best to also watch the voltage of the 3.3V supply -- and/or put a Zener there. That said, I agree it seems unlikely that you'll run into a problem, since NMOS outputs don't source much current.

-- 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  
 Post subject: Re: NMOS to 3.3v
PostPosted: Tue Oct 22, 2013 2:38 am 
Offline

Joined: Fri Sep 20, 2013 4:35 pm
Posts: 32
Got it working. Two possible culprits:

1) The ground issue that Garth suggested. I found a wobbly ground post.
2) Not enough current from the NMOS 6522 to drive the TXB0104. On the 3rd re-reading of the datasheet, I found a single sentence stating that it needed 2mA. The 6522 datasheet says it can source between 200-1000uA.

I added a 74LS367 buffer between the 6522 and the TXB0104, resoldered the wobbly post and voila - I am getting SPI responses. Now to unravel that blasted SD card protocol! :-)


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 29 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: