6502.org Forum  Projects  Code  Documents  Tools  Forum
It is currently Sun Nov 10, 2024 8:35 pm

All times are UTC




Post new topic Reply to topic  [ 11 posts ] 
Author Message
PostPosted: Thu Sep 22, 2016 5:58 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
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:
+5V ---diode--|----->IRQ (65C22S)
              |----->IRQ (65C02)
+5V ---3kOhm--|----->IRQ (6551)
              v
             GND

or like this:
Code:
+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


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 22, 2016 8:06 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
Welcome!

like this:
Code:
+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

_________________
In 1988 my 65C02 got six new registers and 44 new full-speed instructions!
https://laughtonelectronics.com/Arcana/ ... mmary.html


Last edited by Dr Jefyll on Thu Sep 22, 2016 8:10 pm, edited 1 time in total.

Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 22, 2016 8:09 pm 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8539
Location: Southern California
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?


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 3:32 am 
Offline
User avatar

Joined: Sat Dec 07, 2013 4:32 pm
Posts: 246
Location: The Kettle Moraine
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.

Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 4:05 am 
Offline
User avatar

Joined: Fri Aug 30, 2002 1:09 am
Posts: 8539
Location: Southern California
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?


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 11:33 am 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
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:
+5v---3kOhm-----|<|------ IRQ out (WDC65C22S)
             |----------- IRQ in (WDC65C02)
             |----------- IRQ out (R6551)


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 3:20 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
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:
+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


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 5:10 pm 
Offline

Joined: Thu Sep 15, 2016 1:52 pm
Posts: 60
Location: UK
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.


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 5:18 pm 
Offline
User avatar

Joined: Fri Dec 11, 2009 3:50 pm
Posts: 3367
Location: Ontario, Canada
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


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 6:57 pm 
Offline
User avatar

Joined: Sun Dec 29, 2002 8:56 pm
Posts: 460
Location: Canada
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.

_________________
http://www.finitron.ca


Top
 Profile  
Reply with quote  
PostPosted: Fri Sep 23, 2016 8:00 pm 
Offline
User avatar

Joined: Thu May 28, 2009 9:46 pm
Posts: 8481
Location: Midwestern USA
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.

Attachment:
File comment: Vishay Low-Signal Schottky Diodes
schottky_lo_pwr_sd103a-105077.pdf [78.31 KiB]
Downloaded 83 times

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


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC


Who is online

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