Page 1 of 1
Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Thu Sep 22, 2016 5:58 pm
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
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Thu Sep 22, 2016 8:06 pm
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
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Thu Sep 22, 2016 8:09 pm
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 .
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 3:32 am
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'')
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 4:05 am
by GARTHWILSON
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.
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.
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 11:33 am
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)
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 3:20 pm
by Dr Jefyll
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.
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 5:10 pm
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.
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 5:18 pm
by Dr Jefyll
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!

Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 6:57 pm
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.
Re: Connecting WDC65C02, WDC65C22S and Rockwell R6551 IRQ
Posted: Fri Sep 23, 2016 8:00 pm
by BigDumbDinosaur
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.