A discussion group for the PICMicro microcontroller. Also called the Microchip PIC, this list is dedicated to the use and abuse of this fine, simple, microcontroller. Close to topic posts are welcome, ie. general electronics.
Getting at least 5V@15mA output from RA4 pin of PIC16F72 - Jason Hsu - May 28 17:26:33 2008
The output load consists of an LED in series with a current-limiting
330 ohm resistor. At the time I decided on the PIC16F72, I didn't
realize that pin RA4 had such special, strange properties. So I
hadn't planned on adding a buffer or voltage follower to take care of
this.
How do I get the full 5V@15mA from the RA4 pin of PIC16F72? Is there
ANY alternative to a buffer or voltage follower?
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - Eirik Karlsen - May 28 18:41:30 2008
Jason,
No, although a pin is rated at 20mA that current comes at a significan voltage drop.
Use a buffer, simplest is to add a bipolar transistor in emitter follower
config... base directly to port pin, and 330R and LED in the emitter.
In this config you'll get about 4.2V out. Using a PNP instead takes
at least one more resistor and you'll probably get only 0.2V more.
To get the full 5V takes a PMOS transistor.
Jason Hsu wrote:
> The output load consists of an LED in series with a current-limiting
> 330 ohm resistor. At the time I decided on the PIC16F72, I didn't
> realize that pin RA4 had such special, strange properties. So I
> hadn't planned on adding a buffer or voltage follower to take care of
> this.
>
> How do I get the full 5V@15mA from the RA4 pin of PIC16F72? Is there
> ANY alternative to a buffer or voltage follower?
--
*******************************************
VISIT MY HOME PAGE:
LAST UPDATED: 23/08/2003
*******************************************
Regards
Eirik Karlsen

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - Jason Hsu - May 28 19:11:17 2008
One solution is to manipulate the corresponding bit in TRISA and thus
control whether RA4 has a low or high impedance to ground. Then I use
either a pullup resistor to 5V or pulldown resistor to 0V.
Does anyone here know what the impedance values are? Where in the
datasheet can I look up this information? This affects the proper
value of the pullup/pulldown resistor.
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - Jason Hsu - May 28 19:36:26 2008
What about moving the 330 ohm resistor + LED from between RA4 and
ground to between RA4 and 5V and then manipulating the corresponding
TRISA bits? The arrangement would be:
+5V supply->LED->330 ohms->RA4
Setting TRISA,4 to 1 (high impedance) would mean 5V at RA4. Setting
TRISA,4 to 0 (low impedance) would mean 0V at RA4. This sounds
simpler than adding a transistor.
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - rtstofer - May 28 22:21:06 2008
--- In p...@yahoogroups.com, "Jason Hsu"
wrote:
>
> One solution is to manipulate the corresponding bit in TRISA and thus
> control whether RA4 has a low or high impedance to ground. Then I use
> either a pullup resistor to 5V or pulldown resistor to 0V.
>
> Does anyone here know what the impedance values are? Where in the
> datasheet can I look up this information? This affects the proper
> value of the pullup/pulldown resistor.
>
Why not just measure it? Turn on the LED (pull it to ground through the
uC) and measure the pin voltage.
For the 16F877x, there is a graph of Vol vs Iol: Figure 18-18. At 25
deg. C and 15 mA, the pin voltage is about 0.35V. It varies
considerably over temperature and current. There will be a similar
graph for your device.
If you are just turning on an LED, why do you care about 15 mA or 10
mA? They will both be visible. I routinely design for 10 mA or even
less (see below). There is no point in heating the chip just to get a
slight gain in brightness.
For what it's worth, Param D080 specs the sink current at 8.4 mA and
Param D090 specs the source current at -3.5 mA. This is where the chip
is designed to run, or at least where it is tested. I try to stay
below 8 mA sink.
Richard
------------------------------------
to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - Onestone - Jun 10 20:08:19 2008
Why do you need to drive the LED so hard? If the LED is simply a visual
indicator it can be driven at just a couple of mA and then duty cycle
controlled. On a RED LED, for example, a duty cycle of 500usecs on vs
25msecs off at 1.2mA is perceived by the eye as being continuously on.
The fact that you missed the pin characteristics is one of the simple
things I was tyring to point out to you in my post on career choice.
Al
Jason Hsu wrote:
>The output load consists of an LED in series with a current-limiting
>330 ohm resistor. At the time I decided on the PIC16F72, I didn't
>realize that pin RA4 had such special, strange properties. So I
>hadn't planned on adding a buffer or voltage follower to take care of
>this.
>
>How do I get the full 5V@15mA from the RA4 pin of PIC16F72? Is there
>ANY alternative to a buffer or voltage follower?
>------------------------------------
>
>to unsubscribe, go to http://www.yahoogroups.com and follow the instructions

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )
Re: Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - np np - Jun 10 20:09:01 2008
Why not buffer the LED with a transistor ?
You could easily get 15ma then.
----- Original Message ----
From: Jason Hsu
To: p...@yahoogroups.com
Sent: Thursday, 29 May, 2008 12:36:19 AM
Subject: [piclist] Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72
What about moving the 330 ohm resistor + LED from between RA4 and
ground to between RA4 and 5V and then manipulating the corresponding
TRISA bits? The arrangement would be:
+5V supply->LED- >330 ohms->RA4
Setting TRISA,4 to 1 (high impedance) would mean 5V at RA4. Setting
TRISA,4 to 0 (low impedance) would mean 0V at RA4. This sounds
simpler than adding a transistor.
__________________________________________________________
Sent from Yahoo! Mail.
A Smarter Email http://uk.docs.yahoo.com/nowyoucan.html

(You need to be a member of piclist -- send a blank email to piclist-subscribe@yahoogroups.com )