Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Building your first 6502-based project? We'll help you get started here.
Post Reply
jgroth
Posts: 60
Joined: 15 Sep 2016
Location: UK

Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by jgroth »

Hi all,
My first post here in 6502.org (just joined). I've just built a little SBC (project name Pluto :) ) with a 65C02, WDC65C22, 32KB ROM and 32KB RAM. It works just fine.
Now I want to connect a R6551 so I can have serial communication and I want that to be interrupt driven. The R6551 IRQ line is, if I understand correctly, open drain, i.e. you connect a resistor to +5V and the IRQ pin on the 6551 and then to the 6502. The WDC65C22S does not work like that and I don't know how to connect these three so they play nicely together. The datasheet of the WDC65C22S mention a diode between +5V (or GND?) and the IRQ line and then to the CPU? It's a bit confusing to me.
Is it supposed to look like this:

Code: Select all

+5V ---diode--|----->IRQ (65C22S)
              |----->IRQ (65C02)
+5V ---3kOhm--|----->IRQ (6551)
              v
             GND
or like this:

Code: Select all

+5V --3kOhm-|-diode--->IRQ (65C22S)
            |--------->IRQ (65C02)
            |--------->IRQ (6551)
            v
           GND
Either way it feels like the diode will short circuit something.
Please, someone, shed some light over this.

Regards,
Johan
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by Dr Jefyll »

Welcome!

like this:

Code: Select all

+5V ---3kOhm---|<----diode----- 65C22S IRQ pin (output)
               |<-------------- 6551 IRQ pin (output)
               |--------------> 65C02 IRQ pin (input)

The Cathode of the diode (marked by a stripe on one end of the part) goes to the right.
The Anode (sometimes marked by an Arrow) goes to the left. Good mnemonic there, fwiw: arrow, anode :)

cheers,
Jeff
Last edited by Dr Jefyll on Thu Sep 22, 2016 8:10 pm, edited 1 time in total.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by GARTHWILSON »

If your '51 has an open-drain IRQ\ output, use your second diagram (but remove the ground connection). Regardless, don't use the first one. But see the 6502 primer's page on IRQ\ connections, at http://wilsonminesco.com/6502primer/IRQconx.html .
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?
User avatar
KC9UDX
Posts: 246
Joined: 07 Dec 2013
Location: The Kettle Moraine

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by KC9UDX »

Unless I'm seeing things (could be), that second diagram will not work either with the ground connection.

Dr. Jefyll has it correct.

(EDIT darn spell ''correct'')
Last edited by KC9UDX on Fri Sep 23, 2016 5:30 am, edited 1 time in total.
User avatar
GARTHWILSON
Forum Moderator
Posts: 8773
Joined: 30 Aug 2002
Location: Southern California
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by GARTHWILSON »

KC9UDX wrote:
Unless I'm seeing things (could be), that sending diagram will not work either with the ground connection.
Woops, how did I miss that. Yeah, no ground connection! I'll fix my post above.
Quote:
Dr. Jefyll has it correct.
Yes, but to re-clarify, he wrote the arrows to mean interrupt signal direction, but the arrow in the schematic symbol of the diode needs to point toward the W65C22S.
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?
jgroth
Posts: 60
Joined: 15 Sep 2016
Location: UK

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by jgroth »

Thank you all. I think I now know how to connect them. The minus side of the diode (cathode?) goes to the IRQ pin of the WDC65C22S, the anode to the pull up resistor and between the anode and the resistor you connect the IRQ pins of the CPU and the ACIA.

Code: Select all

+5v---3kOhm-----|<|------ IRQ out (WDC65C22S)
             |----------- IRQ in (WDC65C02)
             |----------- IRQ out (R6551)
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by Dr Jefyll »

Quote:
The minus side of the diode (cathode?) goes to the IRQ pin of the WDC65C22S
Yes the cathode of the diode goes to the IRQ pin of the WDC65C22S. But you seem to have it the other way 'round. You want this:

Code: Select all

+5v---3kOhm-----|>|------ IRQ out (WDC65C22S)
             |----------- IRQ in (WDC65C02)
             |----------- IRQ out (R6551)
That's assuming we intend ---|>|---- to show the diode's schematic symbol (also the actual marking on the part). As you see, I've got the Cathode on the right (connected to the 65C22S). The Anode (think "arrow-head") is on the left, connected to the other stuff.

https://en.wikipedia.org/wiki/File:Diode_symbol.svg

Garth's comments and mine are now in agreement. It's true my other diagram included some arrows that indicate signal direction rather than diode marking. Sorry -- that was probably confusing.
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
jgroth
Posts: 60
Joined: 15 Sep 2016
Location: UK

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by jgroth »

I do thank you Dr Jefyll for correcting me (and I do mean that)! :)
So what diode do I need? Would a 1N914 do? Just asking because I got a couple laying about from another project.
User avatar
Dr Jefyll
Posts: 3525
Joined: 11 Dec 2009
Location: Ontario, Canada
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by Dr Jefyll »

jgroth wrote:
Would a 1N914 do? Just asking because I got a couple laying about from another project.
1N914 is okay, or 1N4148, or really almost any "signal diode" (as opposed to rectifier diodes, intended to carry 1 ampere or more; or zener diodes etc). Slightly better if you use a signal diode that's a Schottky type, because the diode itself will introduce less voltage drop in the course of pulling that pullup resistor low. (The pullup will get pulled lower.) But that's a fine point, not an absolute requirement. Have fun! :)
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html
User avatar
Rob Finch
Posts: 465
Joined: 29 Dec 2002
Location: Canada
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by Rob Finch »

Just thought I'd mention that IRQ's which are active low can be gated together with an 'AND' gate. If there's a bunch of IRQ's from multiple devices it might be just as easy as using a bunch of diodes. Open collector outputs still have to be pulled high however.
User avatar
BigDumbDinosaur
Posts: 9425
Joined: 28 May 2009
Location: Midwestern USA (JB Pritzker’s dystopia)
Contact:

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ

Post by BigDumbDinosaur »

Dr Jefyll wrote:
jgroth wrote:
Would a 1N914 do? Just asking because I got a couple laying about from another project.
1N914 is okay, or 1N4148, or really almost any "signal diode" (as opposed to rectifier diodes, intended to carry 1 ampere or more; or zener diodes etc). Slightly better if you use a signal diode that's a Schottky type, because the diode itself will introduce less voltage drop in the course of pulling that pullup resistor low. (The pullup will get pulled lower.) But that's a fine point, not an absolute requirement. Have fun! :)
If the IRQB input behaves in the way described by the data sheet the circuit may not be reliable due to the forward drop of the diode. Best to use a small signal Schottky, such as a Vishay SD103A (see attached). This device has a reverse recovery time of 10ns and is in a DO35 package, so it won't get in the way.
schottky_lo_pwr_sd103a-105077.pdf
Vishay Low-Signal Schottky Diodes
(78.31 KiB) Downloaded 97 times
x86?  We ain't got no x86.  We don't NEED no stinking x86!
Post Reply