6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 10:05 pm

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Wed Oct 31, 2007 11:45 am 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
How feasible is it to use one port of a 6522 (e.g. 8 data lines + CA1/CA2 or CB1/CB2) to create a directional connection to a microcontroller?

I originally intended two use both ports to communicate (one for input, one for output) with hardware handshaking but I'm now wondering if I could get away with only using one port and reconfigure it on the fly.

The microcontroller will be running firmware to access a filing system on either a SD/MMC card, or more likely, some Disc-On-Chip devices. The data passed thru the 6522 will instruct the microcontroller which operation is required followed by the arguments.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 31, 2007 2:33 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
Anything is possible. You will have to work out the handshaking so you don't cause contention on the bus. You may need to use a few IO pins from the other port to facilitate the handshaking. More specs would allow for a better answer.

This sounds interesting... care to share more details. Is this something like the the uALFAT?

http://www.ghielectronics.com/products.php

Daryl


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 31, 2007 4:43 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
Microchip have recently released the C source for a FAT16 driver for 18/24/33F devices (which I have the development tools for) and I acquired a large number of 48MB Disk-On-Chip devices (look up MD2202-D48) from eBay for next to nothing so I thought I'd combine the two things.

I'd have to write the code to drive the interface to the 6522 and the Disk-On-Chip but I don't think thats much code, certainly less than writing a complete filing system in 6502.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 31, 2007 5:22 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 9:02 pm
Posts: 1748
Location: Sacramento, CA
Since both the PIC and the 65C22 have bi-directional IO's, you can certainly build a bi-directional bus. Also, since you are in control of the PIC interface, you can design the handshaking for both ends.

That will be a good project. Sounds like it could be a great file system.

Daryl


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 31, 2007 5:24 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8546
Location: Southern California
Do you really need the data to go so fast that a serial interface (even if you had to bit-bang it) won't do? It sure makes construction simpler.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Wed Oct 31, 2007 8:14 pm 
Offline
User avatar

Joined: Tue Mar 02, 2004 8:55 am
Posts: 996
Location: Berkshire, UK
I was thinking of putting together something like this to add into my system. Two Disk-On-Chips with 18F4620 controller and two octal d-type flipflops to latch the address.
Image

My homebrew system is based on 1Mhz Rockwell chips I salvaged a long time ago. Its designed as a set of 160mm by 100mm cards.

The CPU card looks like this. The PLD is used to create a bus signal when the target address is either zero page (used to disable the ROM) or the I/O page.
Image
The memory card supports 64K of RAM and a disableable 4K ROM.
Image
Designed but not yet built is a dual 6522 IO module.
Image

I'm also working on a PIC based USB CDC interface so my system can be connected to a PC and well appear as a COM port that you can connect to with HyperTerminal. Again I was going to communicate with this through one of the VIAs. It may also draw its power from the USB.

_________________
Andrew Jacobs
6502 & PIC Stuff - http://www.obelisk.me.uk/
Cross-Platform 6502/65C02/65816 Macro Assembler - http://www.obelisk.me.uk/dev65/
Open Source Projects - https://github.com/andrew-jacobs


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: No registered users and 58 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: