Electronics > Beginners
Combining Open Drain and Totem Pole Outputs
(1/1)
sci4me:
I have a 65c02-based computer built up on a breadboard. Recently I tried to connect the 65c51 ACIA's interrupt line to the processor's IRQ line (which already had the IRQ line from the 65c22 VIA connected) and discovered that it wouldn't work. I quickly learned that the 65c22 I have has a totem pole output configuration whereas the 65c51 has an open drain output. In the datasheet for the 65c22, it says that I can place a low-voltage diode in series with the IRQ signal to use the chip with a system doing wire ORing on the IRQ lines to the processor.

I'd appreciate it if someone could elaborate on what exactly this means. Which direction should the diode go? How do I choose an appropriate diode? Would I want a Schottky diode? (It says <0.5V) Why does using a diode like this work?

Thanks!
rstofer:
Somewhere on the IRQ' (IRQB apparently means IRQ bar or what I am calling IRQ prime) line there is a pull-up resistor.  Any of a multiple of  open collector or open drain outputs can pull the signal low.  As near as I can tell from the datasheet, the signal needs to get within 0.4V of Vss to be considered logic 0.  A standard diode won't get anywhere near that low so Schottky is the way to go.  I'm still not convinced that the totem pole output plus the forward drop of the diode will get as low as 0.4V.

I am not used to the idea that the switching threshold values are so close to the power rails.

Page 24:

http://datasheets.chipdb.org/Western%20Design/W65C02S.pdf

https://www.allaboutcircuits.com/textbook/digital/chpt-3/logic-signal-voltage-levels/

newbrain:

--- Quote from: sci4me on March 13, 2019, 03:13:46 pm ---the 65c22 I have has a totem pole output configuration whereas the 65c51 has an open drain output.

--- End quote ---
So it seems you have a W65C22S?

The datasheet requires the diode to be "forward biased when IRQB is low": this means the cathode must be on the 65C22 side.

Explanation (see attached picture):
Case HH:
When the IRQB output of the 65C22 is at High level, and nothing else is pulling the IRQB input line low, both sides of the the diode will be at Vcc: the cathode thanks to M2 conducting, the anode due to the pull-up resistor R. No current will flow through the diode.
The IRQB line is High.

Case HL:
When the IRQB output of the 65C22 is at High level, and another peripheral is pulling the IRQB input line low, the cathode will be at Vcc (M2 on) while the anode will be at about 0V. The diode is reverse polarized and no current will flow.
The IRQB line is Low.

Case LL:
IRQB out at Low level: M1 is conducting, and another peripheral is pulling the IRQB line low. As for the HH case, both sides of the diode are at the same potential and no current will flow.
The IRQB line is Low.

Case LH:
IRQB output is Low: M1 is conducting, and nothing else is pulling the IRQB input line low. The cathode is now at 0 V, and the anode is connected to Vcc through the pull-up resistor: the diode is now forward polarized, and a current equal to (Vcc - Vdrop)/R will flow through it.
The IRQB line is now at Vdrop potential, if that is low enough (Shottky diodes are usually better in this respect than regular ones) it will be interpreted as a Low level.

A Shottky diode usually has got a lower voltage drop than a regular one, but as rstofer says the signal might be marginal.
The datasheet is slight confusing, as it report in the same cell both Vss+0.4 and Vdd x 0.3. The latter value would be much more lenient.

@rstofer: thanks for interpreting the 'B', it was clearly on all active Low signals, but I was really puzzled about what it could stand for!
rstofer:

--- Quote from: newbrain on March 13, 2019, 04:27:26 pm ---The datasheet is slight confusing, as it report in the same cell both Vss+0.4 and Vdd x 0.3. The latter value would be much more lenient.

--- End quote ---

I am much more familiar with threshold voltage of 0.3*Vdd for logic low and something like 0.7*Vdd for logic high.  This clearly allows room for the diode drop plus the MOSFET drop inside the peripheral.

I didn't spend a whole lot of time on the datasheet nor did I search for app notes or other projects using the chipset.  The threshold voltages, as published, seem problematic for open collector (open drain) bus type applications.

If I couldn't get the diode drop approach to work, I might use a couple of CMOS Schmidt Triggers in series to control the signal.  I would get much wider thresholds and still be able to drive IRQB.  The ST would be the only signal connected directly to IRQB.

David Hess:
A silicon switching diode like the 1N4148 will usually work but like rstofer says, the forward voltage drop of the diode is marginal for TTL levels.  A schottky diode or germanium diode like the 1N270 is better.

An NPN transistor configured in common base mode with the base connected to the +5 volt supply through a 10 kilohm resistor and the emitter connected directly to the totem-pole output can operate as an essentially zero forward voltage drop diode in this application.  Or a low threshold voltage MOSFET can be used the same way.
Navigation
Message Index
There was an error while thanking
Thanking...

Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod