OUTPUT pic 16f877a

Discussion in 'The Projects Forum' started by Hedalen, Aug 8, 2011.

  1. Hedalen

    Thread Starter Member

    Dec 5, 2010
    19
    0
    can someone tell me which current i maximal can take from a pic 16f977a?
     
  2. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    This information will be in the datasheet located here http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf
    Give it a try and find out by yourself. But if you need more help. Or need to confirm your data please post again. From the top of my head. I think it is about 20 mA pr pin. But not at all output pins at once. The total is output current is lower. By the way we have a better forum for that kind of problems here http://forum.allaboutcircuits.com/forumdisplay.php?f=17 Better audience there
     
    Last edited: Aug 8, 2011
  3. Hedalen

    Thread Starter Member

    Dec 5, 2010
    19
    0
    i have try to find it in the datasheet, but could not find it
    so maximal 1 led on a output??
     
  4. t06afre

    AAC Fanatic!

    May 11, 2009
    5,939
    1,222
    Take a look at page 173 in the data sheet. But yes one 20 mA LED is the max. However we can help with a solution to this
     
  5. Hedalen

    Thread Starter Member

    Dec 5, 2010
    19
    0
    with a driver??
    like which one?

    sorry, but i am a starter
     
  6. gerty

    AAC Fanatic!

    Aug 30, 2007
    1,153
    304
    We can help you, but you have to tell us what you want to do. If it's to drive a bunch of leds, we need to know what type, how much current they need, and of course how many.
     
  7. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    Open datasheet.. Go to page 173 (actually page 175 of the PDF).. Read the 6 parts that say "Maximum output current ....." and figure out which one applies to your application.
    Chances are the answer is 25 mA
     
  8. Hedalen

    Thread Starter Member

    Dec 5, 2010
    19
    0
    okay, i live in Norway and many times the power supply goes down
    now i want to make many leds in the new floor, so that we can see where we have to walk to come in the direction of forexample the living room.
    it was my idea to set a trycolor led close to the doors and blue leds on the other places, to be short, it was the question if i can set some leds parallel or that i have to use a output port for every led
     
    Last edited: Aug 8, 2011
  9. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    You can operate quite a number of LEDs from a microcontroller if you use what is called a logic-level N-channel power MOSFET as a switch that is controlled by your uC's I/O pins. For your situation, a MOSFET would be much better than a typical transistor, because it is controlled by voltage instead of by current. Once you turn it on or turn it off, it stays on/off without any additional current needed to maintain that state.

    Do you have an idea of how many LEDs you would like to control per I/O pin?
     
  10. mcgyvr

    AAC Fanatic!

    Oct 15, 2009
    4,770
    970
    There is really no point in using a microcontroller for this application unless you want fancy patterns (chasing lights,etc...) ..More detail needed.
     
  11. Hedalen

    Thread Starter Member

    Dec 5, 2010
    19
    0
    it will be atleast 5 normal blue and 6 rgb leds
     
  12. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    So, you want 5 normal blue and 6 RGB LEDs on a single I/O pin? :confused:
    That really doesn't make a lot of sense; normal RGB LEDs have a common anode or common cathode, and three more terminals; one each for red, green and blue. You COULD control all three RGB inputs using one I/O pin, but the resulting output would be white - you might as well just use white LEDs and save yourself the extra wiring hassles.

    If you want to be able to control the individual RGB LED colors, you will need at least 3 I/O pins. It is better to get common anode LEDs, because it is easier to drive them using NPN transistors or N-ch MOSFETs than it is to drive common cathode RGB's using PNP transistors or P-ch MOSFETs.

    The RGB LEDs will need current limiting resistors on the 3 RGB pins, but not on the common pins. If you try to use just 1 resistor on the common anode or cathode, you will have problems. We can't tell you what values you will need until you give us your supply voltage, and the complete LED specifications, best provided by a datasheet.

    You need to tell us if you want them to be individually controlled; for example having the RGB LEDs on three I/O pins to control all the RGB's at once, and another I/O pin to control all of the blue LEDs at once; or if you want to control more LEDs individually, etc.
     
    Last edited: Aug 9, 2011
  13. Hedalen

    Thread Starter Member

    Dec 5, 2010
    19
    0
     
  14. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    I don't know what you are asking for now.
     
Loading...