Reply by Harold Hallikainen September 19, 20082008-09-19
On quite a few pics, RA4 is an open drain output that can be taken above
Vdd. However, that only gets you one pin, and the voltage is still not
very high (11V or so, I think). Though I have not used them, there is also
an HV series of PICs that run on up to 15V. One of the ports typically
goes all the way to the high Vdd (up to 15V). I see four such PIC16
devices at
http://www.microchip.com/ParamChartSearch/chart.aspx?branchID02&mid&lang=en&pageIdt
.

Harold

--
FCC Rules Updated Daily at http://www.hallikainen.com - Advertising
opportunities available!

Reply by rtstofer September 19, 20082008-09-19
You can fake open collector outputs by setting the pin state to 0 and
controlling the pin direction. If the pin is an output, it will pull
to Vss. It the pin is an input, it will float.

This does not get past the problem of voltage on the pin. If you use
a series resistor to limit the pin current, you won't be able to
switch the transistor.

How much can it possibly cost to just leave the switching transistors
in place?

Since you probably PWM the lower transistors, you could also use an
opto-isolator on the upper transistors and provide a benefit by
protecting the PIC. Whether this will work depends entirely on the
gain of the PNP devices. Optos just can't handle much emitter current.

Richard

Reply by "John J. McDonough, WB8RCR" September 19, 20082008-09-19
PICs are CMOS devices, so there are no collectors to be open. However,
there are open-drain outputs which are functionally similar, perhaps a
little better. Check the datasheet for the particular PIC you are using.
Unfortunately, the PIC cannot tolerate voltages abouve Vdd on any pins. But
there is a loophole -- most PIC pins are diode protected, and if you manage
the current, you can put some pretty impressive voltages on them. Graze
through some of the app notes. I'm not sure you can use outputs that way,
but there are app notes that involve 115 VAC on PIC inputs. There are also
a lot of app notes around H bridges, especially for dsPICs (some of which
are specifically designed for motor control).

72/73 de WB8RCR http://www.qsl.net/wb8rcr
didileydadidah QRP-L #1446 Code Warriors #35

----- Original Message -----
From: "Staiger"
To:
Sent: Friday, September 19, 2008 9:56 AM
Subject: [piclist] Open collector outputs
> I'm pretty new to PICs, so if I've made a silly mistake, please forgive
> me!
>
> Do any PICs have "open collector" type output ports? I'd like to use the
> ports to switch some transistors which operate at a higher voltage than
> the
> PIC's Vdd.
>
> The example I have in mind is using four output ports to control an 'H'
> bridge (for a bi-directional motor). The upper transistors in the 'H' are
> PNP power transistors, and are switched on by pulling the gate down to
> ground (through a resistor, obviously), and switched off by removing the
> ground and letting the gates float up to Vcc via pull-up resistors.
>
> With traditional electronics I've used open collector drivers for
> switching
> voltages higher than Vdd, but I couldn't find a PIC with open collector
> outputs. As far as I can understand, the PIC output ports will "drive" a
> logic 0 or a logic 1, but of course the PIC's logic 1 is not high enough
> to
> switch off the upper transistors in an H bridge if the bridge operates at
> higher than Vdd.
>
> For now I'm using the PIC to drive some switching transistors, which
> themselves provide the "open collector" function for driving the power
> transistors. Obviously I'd like to eliminate these extra transistors if
> possible.
>
> I've got this feeling I'm missing something obvious: I can't be the first
> person to want open collector ports on a PIC. Could anyone elucidate?
>
> Thanks,
>
> SteveT
>
>
> to unsubscribe, go to http://www.yahoogroups.com and follow the
> instructions
Reply by Staiger September 19, 20082008-09-19
I'm pretty new to PICs, so if I've made a silly mistake, please forgive me!

Do any PICs have "open collector" type output ports? I'd like to use the
ports to switch some transistors which operate at a higher voltage than the
PIC's Vdd.

The example I have in mind is using four output ports to control an 'H'
bridge (for a bi-directional motor). The upper transistors in the 'H' are
PNP power transistors, and are switched on by pulling the gate down to
ground (through a resistor, obviously), and switched off by removing the
ground and letting the gates float up to Vcc via pull-up resistors.

With traditional electronics I've used open collector drivers for switching
voltages higher than Vdd, but I couldn't find a PIC with open collector
outputs. As far as I can understand, the PIC output ports will "drive" a
logic 0 or a logic 1, but of course the PIC's logic 1 is not high enough to
switch off the upper transistors in an H bridge if the bridge operates at
higher than Vdd.

For now I'm using the PIC to drive some switching transistors, which
themselves provide the "open collector" function for driving the power
transistors. Obviously I'd like to eliminate these extra transistors if
possible.

I've got this feeling I'm missing something obvious: I can't be the first
person to want open collector ports on a PIC. Could anyone elucidate?

Thanks,

SteveT