interrupt problem...
interrupt problem...
Can somebody tell me what is wrong with this? VIA_IRQ is from a WD65C22 (S variant), ACIA_IRQ is from an MC68B50P and IRQ is connected to the WD65C02's interrupt pin. If I jumper either of the irqs to the output of the inverter then that interrupt goes thru to the processor. As wired, the IRQ line is permanently high. I have replaced both the hc00 and hc04 and metered the traces for continuity all's good but still no worky... I'm at a loss of what else could be wrong with this. Any ideas?
- Attachments
-
- interrupts.png (4.03 KiB) Viewed 756 times
Re: interrupt problem...
If you need a pullup on the VIA IRQ, you might well also need one on the ACIA IRQ. If the point is that these are open-collector, then they need a pullup.
But by the same token, if they are open-collector, they can both be directly connected to the IRQ input, and share a single pullup. The point of open-collector is that the device's output pin is only able to drive low, or not drive at all. Tying two together, with a pullup, makes an AND gate.
But by the same token, if they are open-collector, they can both be directly connected to the IRQ input, and share a single pullup. The point of open-collector is that the device's output pin is only able to drive low, or not drive at all. Tying two together, with a pullup, makes an AND gate.
Re: interrupt problem...
Thank you BigEd, from memory I remembered it as being "TTL compatible". Going back to the data-sheet after your reply I saw that it was "TTL compatible, open-drain (no internal pullup)". So I added a 3.3k resistor on the back of the pcb to pin 10 and 5v and now it's working fine.
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: interrupt problem...
lenzjo wrote:
Can somebody tell me what is wrong with this? VIA_IRQ is from a WD65C22 (S variant), ACIA_IRQ is from an MC68B50P and IRQ is connected to the WD65C02's interrupt pin. If I jumper either of the irqs to the output of the inverter then that interrupt goes thru to the processor. As wired, the IRQ line is permanently high. I have replaced both the hc00 and hc04 and metered the traces for continuity all's good but still no worky... I'm at a loss of what else could be wrong with this. Any ideas?
In the future, please post schematics in monochrome.
The 65C22S has a totem-pole IRQ output, hence does not require a pullup resistor. On the other hand, the 68B50 is open-drain and does require a pullup. Recommended value is 3.3K.
Also, if you use a positive-AND, such as a 74xx08, instead of the NAND followed by the inverter, your circuit will be more responsive to IRQs (two gate delays with your present arrangement vs. one), which may be important with a UART such as the 6850, as it has no FIFOs.
Last edited by BigDumbDinosaur on Mon May 24, 2021 7:28 pm, edited 2 times in total.
x86? We ain't got no x86. We don't NEED no stinking x86!
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: interrupt problem...
BigEd wrote:
The point of open-collector is that the device's output pin is only able to drive low, or not drive at all. Tying two together, with a pullup, makes an AND gate.
Actually, it is the equivalent of an OR gate, which is why such an arrangement is referred to as "wired-OR".
x86? We ain't got no x86. We don't NEED no stinking x86!
- barrym95838
- Posts: 2056
- Joined: 30 Jun 2013
- Location: Sacramento, CA, USA
Re: interrupt problem...
BigDumbDinosaur wrote:
BigEd wrote:
The point of open-collector is that the device's output pin is only able to drive low, or not drive at all. Tying two together, with a pullup, makes an AND gate.
Actually, it is the equivalent of an OR gate, which is why such an arrangement is referred to as "wired-OR".
Got a kilobyte lying fallow in your 65xx's memory map? Sprinkle some VTL02C on it and see how it grows on you!
Mike B. (about me) (learning how to github)
Mike B. (about me) (learning how to github)
Re: interrupt problem...
Mike, what you say is necessary, but not sufficient for an AND. If either is low, the result is 0. However, if both are low the result is also 0. The defining characteristic of an AND is that it is 1 only if both inputs are 1.
Logical AND:
Logical OR:
If we are dealing with negative logic, wired OR is pulled up normally, and drops low if any (or both) of the inputs go low:
Negative logic OR:
Which looks a lot like positive logic AND, doesn't it? As they used to say in the Soviet Union at the end of televised children's competitions always ending in a tie, 'friendship wins'.
Logical AND:
Code: Select all
A B OUTPUT
=============
0 0 0
0 1 0
1 0 0
1 1 1
Code: Select all
A B OUTPUT
=============
0 0 0
0 1 1
1 0 1
1 1 1
Negative logic OR:
Code: Select all
A B OUTPUT
=============
0 0 0
0 1 0
1 0 0
1 1 1
In theory, there is no difference between theory and practice. In practice, there is. ...Jan van de Snepscheut
Re: interrupt problem...
BigDumbDinosaur wrote:
lenzjo wrote:
Also, if you use a positive-AND, such as a 74xx08, instead of the NAND followed by the inverter, your circuit will be more responsive to IRQs (two gate delays with your present arrangement vs. one), which may be important with a UART such as the 6850, as it has no FIFOs.
Re: interrupt problem...
How about using two diodes and a resistor to form a diode gate, instead of 74xx gates? Timing parameters are not important in this case - CPU cycle is an order of magnitude longer than any gate delays.
Re: interrupt problem...
I'm crap at analog electronics stuff so I didn't even think about that 
- BigDumbDinosaur
- Posts: 9425
- Joined: 28 May 2009
- Location: Midwestern USA (JB Pritzker’s dystopia)
- Contact:
Re: interrupt problem...
gbm wrote:
How about using two diodes and a resistor to form a diode gate, instead of 74xx gates? Timing parameters are not important in this case - CPU cycle is an order of magnitude longer than any gate delays.
A standard silicon diode (e.g., 1N4152) should not be used due to its forward drop. A small-signal Schottky should be used. Only the 65C22's IRQ output would have to be so isolated.
x86? We ain't got no x86. We don't NEED no stinking x86!