You don't need a drive transistor. Depending on how your code is written the output might not be toggling when you have the LED hooked up because it is going to limit your output voltage of RB0 to approximately 0.7 to 2V depending on the LED. Remember an LED is a diode and after your reach the threshold voltage it looks like a short circuit. What you need to do it to put a resistor in series with the LED to limit the current and allow RB0 to rise to it's full voltage. Try a 1k resistor to start.
Also, you should always have a 10k resistor from MCLR to +5V to prevent any issues or spurious resets
Main Topics
Browse All Topics





by: nobusPosted on 2009-03-08 at 04:13:36ID: 23828806
i think you should put a driver transistor on the output of the chip, to supply the current for the LED