Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

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

Re: pic output port



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.



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


Usenet.com



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