Sign in

username:

password:



Not a member?

Search piclist



Search tips

Subscribe to piclist



piclist by Keywords

12F675 | 16F628 | 16F84 | 16f877 | 16F877A | 16F88 | 18F458 | ADC | AVR | Bootloader | CAN | CCS | CRC | EAGLE | EEPROM | ICD | ICSP | IDE | JDM | LED | Macros | Microchip | MPLAB | PCB-CAD | PIC10F | Pic12f675 | PIC16F84 | PIC16F84A | PIC16F877 | PIC18 | PIC18F452 | PicBasic | PICC | PICSTART | PWM | RS-485 | RS232 | SMT | SPI | UART | USART | USB | Wireless | Wisp628 | Xilinx

Discussion Groups

Discussion Groups | Piclist | Re: Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72

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.

Re: Re: Getting at least 5V@15mA output from RA4 pin of PIC16F72 - Eirik Karlsen - May 29 5:29:17 2008


Jason,
you asked for 5V out (source) at high current, and there is just no way of doing that.

If you just want the LED to light up it is probably more common to do as you suggest and
sink instead (LED anode to +5V). No need to do the math very accurately, just select a
resistor that gives 'good' brightness, and check the current. Use lowest acceptable current...
there is little difference in brightness between 5-10mA, and 20mA. Try with 8mA, should
be good enough in most cases, especially if you're using a low current / high brightness LED.
Jason Hsu wrote:

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

--
*******************************************
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 )