IRQ with the 65c22S instead of the 65c22N (with 2692A)
Posted: Mon Apr 08, 2013 7:35 am
Mouser sent me the wrong type of VIA 65c22, the S version instead of the N version. I ordered an N, the invoice says N, the little label on the anti-static bag says N, the chip has an S printed on it. Argh.
So after my initial attack of huffy-puffy righteous annoyance, I re-read the data sheet for the 65c22 (which was not really helpful) and then Garth's texts on the matter (http://6502.org/tutorials/interrupts.html, http://wilsonminesco.com/6502primer/IRQconx.html, and viewtopic.php?f=1&t=1953&p=16482&hilit=65C22S#p16482, which were). Now I'm wondering if this is not a Good Thing. If I understand the differences correctly, the S totem-pole interrupts are slightly faster, but need a bit more glue logic. The other interrupt source in the computer is a 2692A DUART, which has an open-drain output that needs to be pulled up by a resistor. Adapting Garth's drawing (of the circuit, not the cartoons, never the cartoons), I'm thinking the logic would look something like this:
As for the actual implementation, here is where I would be grateful for guidance. Since I'm going to use a bunch of 74HC132 NAND gates in the design anyway (which come with those nice Schmitt triggers), I was thinking of NANDing instead of ANDing, and then feeding that signal back on itself in a second NAND gate to invert it the way we need it. Something like this:
However, that means we go through the chip twice. Data sheet tells me that this would cost a 2 x 11 ns delay. I have no feeling at all if this is a lot. It doesn't really seem that way, given I'm aiming for a 1 MHz clock, with anything above that "nice to have". Still, would it be worth including a "real" AND chip and saving those 11 ns? More generally, how long of a delay in the glue logic should make me worry?
Thanks.
So after my initial attack of huffy-puffy righteous annoyance, I re-read the data sheet for the 65c22 (which was not really helpful) and then Garth's texts on the matter (http://6502.org/tutorials/interrupts.html, http://wilsonminesco.com/6502primer/IRQconx.html, and viewtopic.php?f=1&t=1953&p=16482&hilit=65C22S#p16482, which were). Now I'm wondering if this is not a Good Thing. If I understand the differences correctly, the S totem-pole interrupts are slightly faster, but need a bit more glue logic. The other interrupt source in the computer is a 2692A DUART, which has an open-drain output that needs to be pulled up by a resistor. Adapting Garth's drawing (of the circuit, not the cartoons, never the cartoons), I'm thinking the logic would look something like this:
As for the actual implementation, here is where I would be grateful for guidance. Since I'm going to use a bunch of 74HC132 NAND gates in the design anyway (which come with those nice Schmitt triggers), I was thinking of NANDing instead of ANDing, and then feeding that signal back on itself in a second NAND gate to invert it the way we need it. Something like this:
However, that means we go through the chip twice. Data sheet tells me that this would cost a 2 x 11 ns delay. I have no feeling at all if this is a lot. It doesn't really seem that way, given I'm aiming for a 1 MHz clock, with anything above that "nice to have". Still, would it be worth including a "real" AND chip and saving those 11 ns? More generally, how long of a delay in the glue logic should make me worry?
Thanks.