Usenet.com

www.Usenet.com

Group Index

Comp Thread Archive from Usenet.com

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

Re: pic output port



On Wed, 3 Dec 2003 16:57:53 -0000, the renowned "moocowmoo"
<[EMAIL PROTECTED]> wrote:

>
>"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.

There isn't much current from the weak pullups (50uA minimum, but not
even 100% tested). If you're using a forced beta of 10-20, that means
1mA drive at most. Also, if the output gets changed to high (by
electrical noise, for example) there will be a lot of current flowing
out of the output pin into the base. I'd put the $0.001 resistor and
get ~5% control over base current rather than 10:1.. 

Best regards, 
Spehro Pefhany
-- 
"it's the network..."                          "The Journey is the reward"
[EMAIL PROTECTED]             Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog  Info for designers:  http://www.speff.com



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


Usenet.com



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