To answer your question and your concern,
Yes, you can monitor that circuit then switch to an output without over driving it.
To answer your question and your concern,
Yes, you can monitor that circuit then switch to an output without over driving it.
Louie
I believe most pic16's and PIC18's have a 20mA source or sink limit so a resistor on the pin would not be required.
So FromTheCockpit's diagram above will work, though you will not get 5V to feed the LED so you'll need to trim the LED's resistor if you want a brighter LED.
Also on that note... an LED consumes more than 20mA (~33mA at desired voltage i believe) so... you may not need a resistor on the LED. Instead, if you up the voltage divider resistance values ~ 2K each the LED would not come on but you would still have your /2 voltage divider.
What are you trying to accomplish with this circuit?
Is the objective to have the LED on dimly and be able to confirm it has not failed, then be able to have the PIC turn it on brightly or off completely?
Is the PIC also powered by 5V?
If so, R3 does not serve any purpose...
Last edited by Charlie; - 15th August 2013 at 10:30.
Bookmarks