Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

<-- __Chronological__ --> <-- __Thread__ -->

Re: pic output port



"Michael" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Wolfgang Mahringer wrote:
> >
> > Hi Tony,
> >
> > Tony wrote:
> > > i want to turn on an npn switching transistor from an output port of a
pic
> > > 16F84. my question is do i need a resistor between the npns' base and
the
> > > port of the pic or can i turn it on directly?
> >
> > In addition to what the other posters said, you _can_ omit the base
> > resistor if (and only if) you configure the port as having
> > "weak pullups" and switch the port with the TRIS bit.
> >
> > TRIS bit set means input = pullup to Vcc = NPN will be on
> > TRIS bit clear AND PORT bit clear means "output low", NPN will be off.
> >
> > But take care you always have a 0 in the corresponding PORT output
latch!
> >
> > HTH
> > Wolfgang
>
>
> But doesn't a port pin's weak pullup get disconnected whenever that pin
> is made OUTput?  Seems to me I read it in the spec. sheet.  Not positive
> though.  If true, the pin ... and the xstr's base ... will float.

Output pins never float! It will only float if you make it an INput without
a pullup. One warning about using this trick is that the pullup may be too
weak to switch fast. But if you're not worried about the speed then this
will save you a resistor.

Peter





<-- __Chronological__ --> <-- __Thread__ -->


Usenet.com



Please check out one of the premium Usenet Newsgroup Service Providers below for access to Usenet.