6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Thu Nov 21, 2024 9:29 pm

All times are UTC




Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Mon Apr 11, 2022 11:15 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8543
Location: Southern California
gfoot wrote:
Yes, but watch out for that bus holding device - it will weakly drive the bus to retain its last state, if nothing else is driving it more strongly. This could interfere with what you're doing as well. It might be weak enough that it doesn't matter.

Fortunately the maximum current there is only 20µA low, and 9µA high, so pretty minimal.

_________________
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: Tue Apr 12, 2022 7:53 am 
Offline
User avatar

Joined: Tue Apr 03, 2018 2:10 pm
Posts: 125
Thanks for the feedback guys.

In case you're at all curious, what I'm implementing here is a mass storage device for my 6502 machine. And my disk drive of choice is a Raspberry Pi Zero 2 W. I'm using Port A of the 6522 as an eight-bit parallel data bus and the other port for control lines.

So far, typing LOAD on the 6502 will request a file (always the same file thus far) from the Pi. At the moment, it sends only the first byte, because that's as far as I've got. Everything is bit-banged.

Why not implement an SPI interface and use an SD card or a CF card or some such? I felt like designing a solution and a protocol all my own because that's what constitutes fun to me. This approach means that I can create a program on any computer I like and drop it into a folder on the RPi over the network. No removing/replacing of cards.

Yes, my solution might be slow, flaky and inefficient, but it will be mine dammit!

_________________
I like it when things smoke.
BlogZolatron 64 project


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 12, 2022 8:57 am 
Offline

Joined: Fri Jul 09, 2021 10:12 pm
Posts: 741
I get it, sometimes you need to kind of invent a problem to make an excuse to build something or write some code!

In your position with full freedom to design both ends of the interface I'd probably have been more inclined to make the data lines unidirectional, at least as a first pass, as it would dodge a lot of the buffering issues - you could have made your interface open-drain at both ends, like the floppy disc interface is, which means nobody needs to care much what voltage the other side of the interface is using. Each signal is either pulled low, or it's not; and the receiving side does the pull-up to whatever voltage it needs to register high.

But it sounds like you've already got it working now so that's great.


Top
 Profile  
Reply with quote  
PostPosted: Tue Apr 12, 2022 9:42 am 
Offline
User avatar

Joined: Tue Apr 03, 2018 2:10 pm
Posts: 125
Just to add, I now have the load routine working and it's capable of loading a 56-byte program in a mere fraction of a fortnight.

_________________
I like it when things smoke.
BlogZolatron 64 project


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 15, 2022 1:30 pm 
Offline
User avatar

Joined: Tue Aug 11, 2020 3:45 am
Posts: 311
Location: A magnetic field
If possible, uni-directional level conversion is preferable.

speculatrix on Sat 2 Apr 2022 wrote:
I did also wonder about using a 3V3 Zener attached between each line and ground.


That is a safe option, especially if excessive voltage may occur. A 0.5V Zener or similar may be useful for negative voltage.

_________________
Modules | Processors | Boards | Boxes | Beep, Beep! I'm a sheep!


Top
 Profile  
Reply with quote  
PostPosted: Fri Apr 22, 2022 8:50 am 
Offline
User avatar

Joined: Tue Apr 03, 2018 2:10 pm
Posts: 125
For the sake of completeness, I thought I'd mention where I ended up with this.

For the control signals, I'm using simple resistor voltage dividers (2k2 and 3k3 resistors), even for the 3.3V signals coming from the Raspberry Pi to the 65C22.

I was doing the same for the bidirectional data bus. But it was going to mean a lot of resistors on the final PCB. However, I finally got my hands on the 74LVC4245. This is bidirectional, with the direction being selected via a DIR pin. I hooked up a spare signal from the 6522 to this and it works great!

Full details here and here.

_________________
I like it when things smoke.
BlogZolatron 64 project


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 21 posts ]  Go to page Previous  1, 2

All times are UTC


Who is online

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