6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sat Nov 23, 2024 2:54 am

All times are UTC




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Makig an I/O card
PostPosted: Fri Jul 26, 2013 9:54 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 3:13 pm
Posts: 67
I can go for either a 6551 ACIA or a 6522 VIA, but does anyone have a good tutorial on using these for an I/O card

_________________
JMP $FFD2


Top
 Profile  
Reply with quote  
 Post subject: Re: Makig an I/O card
PostPosted: Fri Jul 26, 2013 10:42 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
James_Parsons wrote:
I can go for either a 6551 ACIA or a 6522 VIA, but does anyone have a good tutorial on using these for an I/O card

The two have very different functions. The '22 has a lot of general-purpose I/O bits and two timer/counters and a synchronous-serial port, whereas the '51 ACIA (asynchronous communications interface adapter) is mostly for RS-232. I have an RS-232 primer at http://wilsonminesco.com/RS-232/RS-232primer.html which puts some emphasis on the '51. The 6502 primer has plenty of info on both, and its final page, the potpourri page, has circuits on how to do lots of different things with the '22 in particular. Some of the ideas in the 6502 primer are presented in a rather abbreviated, rattled-off approach in the "Tip of the Day" topic here on the forum.

Go ahead and use both. In fact, you may want more than one of each.

_________________
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: Makig an I/O card
PostPosted: Fri Jul 26, 2013 11:15 pm 
Offline
User avatar

Joined: Wed Jul 10, 2013 3:13 pm
Posts: 67
I plan to use both :D

_________________
JMP $FFD2


Top
 Profile  
Reply with quote  
 Post subject: Re: Makig an I/O card
PostPosted: Sun Aug 11, 2013 1:00 am 
Offline

Joined: Sun Jul 28, 2013 12:59 am
Posts: 235
A minor bit of thread necromancy here, but...

GARTHWILSON wrote:
I have an RS-232 primer at http://wilsonminesco.com/RS-232/RS-232primer.html which puts some emphasis on the '51.

Oh, very nice. I'm going to have to read that a couple more times now that it's been pointed out. Some feedback:

In the section "INTRODUCTION TO RS-232", paragraph 11, "synchrnous" should be "synchronous" (the one where the initial "s" is bold).

With the recent report of WDC 65c51 chips being defective, the 16550 UART becomes more tempting (my first Mouser order was just prior to that thread, and included 65c51 chips, my second Mouser order included 16550 chips, as I had found a page on 6502.org about interfacing a couple of them to a 6502 system, and figured that even without such a page I could probably figure out something that would work).

Also, devices such as the "OSEPP(tm) FTDI breakout board" provide easy access from a host machine via USB, but have different interfacing requirements on the target side ("TTL" outputs at 5v or 3v3 as selected by a jumper) and would presumably be somewhat popular with the Arduino crowd. I half expect that it's meant to be wired directly to the UART, but I'm planning to check before actually wiring anything up. At any rate, it seems a straightforward way to interface a modern PC (sans serial ports) to custom hardware with less fuss than a full RS-232 level converter such as the MAX232 or similar and mounting a DB9 or DB25 connector or making up a ribbon cable to attach to a pin header.

-- Alastair Bridgewater


Top
 Profile  
Reply with quote  
 Post subject: Re: Makig an I/O card
PostPosted: Sun Aug 11, 2013 5:52 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
nyef wrote:
In the section "INTRODUCTION TO RS-232", paragraph 11, "synchrnous" should be "synchronous" (the one where the initial "s" is bold).

Fixed. Thanks.

Quote:
With the recent report of WDC 65c51 chips being defective, the 16550 UART becomes more tempting (my first Mouser order was just prior to that thread, and included 65c51 chips, my second Mouser order included 16550 chips, as I had found a page on 6502.org about interfacing a couple of them to a 6502 system, and figured that even without such a page I could probably figure out something that would work).

I've used, and like, the 14-pin-DIP SPI-interfaced MAX3100 UART. It's IrDA compatible too if that helps any. The 3110 IIRC is the same thing with line drivers and receivers built in.

_________________
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: Makig an I/O card
PostPosted: Sun Aug 11, 2013 6:44 am 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8507
Location: Midwestern USA
nyef wrote:
With the recent report of WDC 65c51 chips being defective, the 16550 UART becomes more tempting (my first Mouser order was just prior to that thread, and included 65c51 chips, my second Mouser order included 16550 chips, as I had found a page on 6502.org about interfacing a couple of them to a 6502 system, and figured that even without such a page I could probably figure out something that would work).

While I was designing my POC unit I built in two TIA-232 channels, one to communicate with the console and the other to communicate with the UNIX box on which I develop software. It was a case of using two 16550s (and eating up a lot of board real estate) or a single NXP 2692. Also, the 16550 is a bit of a pain to program when compared to the 2692, which settled any doubts I had.

Adapting the 2692 to the 65xx bus was trivial and I used a single MAX-238 for both ports. Both ports can simultaneously run at 115.2 Kbps CBAT. The current version of POC (1.1) is using a 26C92.

_________________
x86?  We ain't got no x86.  We don't NEED no stinking x86!


Top
 Profile  
Reply with quote  
 Post subject: Re: Makig an I/O card
PostPosted: Sun Aug 11, 2013 9:57 am 
Offline

Joined: Mon Aug 05, 2013 10:43 pm
Posts: 258
Location: Southampton, UK
This is a bit of a random question but does anyone have any good suggestions for adding an SPI bus to an 8 bit circuit? There are various ways to bit bang the signals using any random parallel IO IC but an all in one hardware solution would be good. I used the Philips PCF8584 to add I2C to my 6809 circuit and it works very well. I'm after something similar for SPI so I can interface SD cards etc.

One solution I have seen used involves using the synchronous serial port on a 6522 VIA, but this only gives you half of an SPI.

_________________
8 bit fun and games: https://www.aslak.net/


Top
 Profile  
Reply with quote  
 Post subject: Re: Makig an I/O card
PostPosted: Sun Aug 11, 2013 11:30 am 
Offline

Joined: Mon Mar 25, 2013 9:26 pm
Posts: 183
Location: Germany
Just take a look at Daryl's SPI Page: http://sbc.rictor.org/65spi.html
He has created a 65xx bus compatible SPI chip and sells it for about $10.
Mario.

_________________
How should I know what I think, until I hear what I've said.


Top
 Profile  
Reply with quote  
 Post subject: Re: Makig an I/O card
PostPosted: Sun Aug 11, 2013 3:11 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8544
Location: Southern California
Aslak3 wrote:
This is a bit of a random question but does anyone have any good suggestions for adding an SPI bus to an 8 bit circuit? There are various ways to bit bang the signals using any random parallel IO IC but an all in one hardware solution would be good. I used the Philips PCF8584 to add I2C to my 6809 circuit and it works very well. I'm after something similar for SPI so I can interface SD cards etc.

One solution I have seen used involves using the synchronous serial port on a 6522 VIA, but this only gives you half of an SPI.

Another problem with using the VIA's synchronous-serial port for SPI is that it won't do all the SPI modes. The fastest-operating and lowest-overhead solution is Daryl's 65SPI chip mentioned above. It is a genuine 65-bus-compatible SPI I/O IC. Bit-banging I²C and SPI on the VIA are very easy though, especially if you take advantage of certain bit assignments. I tell about it on the potpourri page of the 6502 primer, at http://wilsonminesco.com/6502primer/pot ... ITBANG_I2C and http://wilsonminesco.com/6502primer/pot ... ITBANG_SPI, with links there also to working code.

_________________
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  
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: Google [Bot] and 25 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: