• AVR Freaks

Hot!What are Sink/Source currents for PIC12LF1572

Author
Philbot
New Member
  • Total Posts : 15
  • Reward points : 0
  • Joined: 2009/07/20 05:23:16
  • Location: 0
  • Status: offline
2019/07/27 16:48:49 (permalink)
0

What are Sink/Source currents for PIC12LF1572

I tried searching through the manual, and looking up family specs, but I can't seem to find the min Source Sink currents for Port A pins on this device.
 
I'm used to 25mA on regular PICs, but I'm not seeing that on this PIC.
Are there significant differences with the LF families?
 
A pointer to the place where this info is located would be appreciated.
 
Phil.
#1

13 Replies Related Threads

    mbrowning
    USNA79
    • Total Posts : 1511
    • Reward points : 0
    • Joined: 2005/03/16 14:32:56
    • Location: Melbourne, FL
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 17:13:52 (permalink)
    +1 (1)
    Datasheet as usual is where to look. Section 26.1 has ABSOLUTE max beyond which damage may occur. Table 26-4 has details on IO specifications. Unfortunately no Voh/Ioh and Vol/Iol charts.

    As to your question on min currents, minimum is zero of course.

    Go Navy! Beat Army!
    #2
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 17:40:28 (permalink)
    +1 (1)
    Philbot
    I'm used to 25mA on regular PICs, but I'm not seeing that on this PIC.

    You are working right on the ABSOLUTE MAXIMUM edge then.
    In that case, you would need to be aware of the 200mA max per combined GPIO ports as well.
    That's not saying the pin CAN supply that current, it's saying it's YOUR JOB to ensure you never exceed this current.
    Of course you won't be seeing valid logic output levels at these sort of currents. I assume it's just to drive LEDs.

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #3
    Philbot
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2009/07/20 05:23:16
    • Location: 0
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 17:51:23 (permalink)
    0
    You have hit nail on the head re: no Voh, Ioh curves.
     
    I'm running off two AAA batteries, so fresh batteries give me about 3V, but mid life, it may be as low as 2.7V
    I have a Blue LED with a voltage drop of 2.7V @ 10mA so I was planning on a choosing a series resistor for a dependable 7 mA.
     
    For one reason or another I chose a 22 Ohm resistor, expecting more than enough current with fresh batteries.
    What I ended up with was 2.67V out of the port pin, 2.6V across the LED, and only 3.3 mA through the LED.
    Other non-loaded output pins were running at 2.96V
     
    So, I figured I must be pulling more current than expected from the output pin.
     
    At this point the thought did occur to me that perhaps I should have used the port pin as a current sink, instead of a source, but I mistakenly thought that only mattered on TTL logic.
     
    So, this is when I started delving into the spec sheet to determine what currents I should have expected without significant output voltage drops.  And I came up with zip....
     
    Note: I also have a 1.9V RED LED on an output, with a 100 ohm resistor I get 5mA current with 2.4V on the output pin.
     
    It would be really nice to have an actual spec for these outputs so I could know what to expect.  Even if it was a generic electrical spec for the family of devices.
     
    My only clue is that the output H voltage drop is specified at 0.7V at 3mA where as the Output Low voltage is specified at 0.6V at 6mA.  So, clearly it sinks current better than it sources it.
     
    It also begs the question, do I even need a current limit resistor with green and blue LEDs.
     
    So I think I've done my due diligence....
    Does anyone have an actual chart showing how these outputs are meant to perform?
    post edited by Philbot - 2019/07/27 18:02:49
    #4
    Philbot
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2009/07/20 05:23:16
    • Location: 0
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 18:12:02 (permalink)
    0
    ric
    You are working right on the ABSOLUTE MAXIMUM edge then.

     
    Don't panic...  I'm not actually working at the 25mA limit.  I'm down in the 5-10mA range, but I was expecting that this would be sourced easily without significant output voltage drop. 
     
    I know it's MY JOB to control the currents, which is why I was looking for I/V output characteristics.
    I was really trying to find out if I got less voltage sag when Sinking current vs Sourcing it, and how big the difference was.  
    #5
    Philbot
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2009/07/20 05:23:16
    • Location: 0
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 18:18:23 (permalink)
    +1 (1)
    Weird Coincidence..
     
    One reply to my post was from Melbourne Florida, the other was from Melbourne Australia....
     
    And....  I've been to both places...
    #6
    jtemples
    عُضْوٌ جَدِيد
    • Total Posts : 11287
    • Reward points : 0
    • Joined: 2004/02/13 12:31:19
    • Location: Southern California
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 18:43:09 (permalink)
    +1 (1)
    And....  I've been to both places...

     
    Me too...
    #7
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 18:50:24 (permalink)
    +2 (2)
    jtemples
    And....  I've been to both places...

     
    Me too...

    Didn't cya.
    Any pics to prove it happened? :)
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #8
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/07/27 18:54:54 (permalink)
    +1 (1)
    Philbot
    ...
    At this point the thought did occur to me that perhaps I should have used the port pin as a current sink, instead of a source, but I mistakenly thought that only mattered on TTL logic.

    Low side drivers are still better than high side in CMOS.
     

    Note: I also have a 1.9V RED LED on an output, with a 100 ohm resistor I get 5mA current with 2.4V on the output pin.

    Lot more voltage headroom in a RED LED.
     

    My only clue is that the output H voltage drop is specified at 0.7V at 3mA where as the Output Low voltage is specified at 0.6V at 6mA.  So, clearly it sinks current better than it sources it.

    Indeed.
     

    It also begs the question, do I even need a current limit resistor with green and blue LEDs.

    From memory, you can treat the driver a bit like a 100R resistance, so at 3.3V Vdd you might get away with it.
     

    Does anyone have an actual chart showing how these outputs are meant to perform?

    Presumably Microchip do, but neglected to publish them. Lodging a support ticket MIGHT get access to them.
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #9
    Philbot
    New Member
    • Total Posts : 15
    • Reward points : 0
    • Joined: 2009/07/20 05:23:16
    • Location: 0
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/08/20 12:23:46 (permalink)
    0
    3 week follow up.
     
    I received a note from Microchip about 2 weeks after I posted an information request, basically telling me that there is no datasheet or chart that defines the output characteristics of the port pins on this device.
     
    In the end, I switched to using the outputs in Current Sink mode, with series current limiting resistors that provided about 10 mA through each LED.  I ran each LEDs using a PWM output, with inverted output, and Open Drain turned on.
     
    I would have left this thread there, except for ANOTHER interesting revelation I had regarding the output.
     
    Subject:  SLEEP current too high on PIC12LF1572
     
    I was struggling to determine why my final design did not seem to be dropping to a very low current when I put it in SLEEP mode.  With everything off, and only the Interrupt on Change running on the RA3 input with a weak pull-up, I was still seeing 100uA of current when I put the chip in SLEEP mode (powered by 3V battery).
     
    I spent a day testing, trying to figure out what I needed to turn off to get the current down.
    In the end I discovered that it was the Open Drain outputs used to light the LEDs that were killing me.  Prior to disabling the open drain feature, I had ensured that the PWM was disabled, and I was setting the outputs high as a simple digital output BEFORE going into SLEEP mode..
     
    While testing voltages while in Sleep, I was confused as to why the output pins were not at 3V (they seemed to Follow the LED voltage drop).  Until I remembered that I had opted for Open Drain outputs.  When I turned off that setting for the three LEDs, my SLEEP current went down from 65 mA to < 1 mA (in the noise of my measuring device).
     
    Once again, I went to try and track down what the leakage current through the Open Drain output should be when set "high" (or essentially OFF) but there is nothing in the data-sheet (AGAIN).
     
    So, word to the wise.......  don't assume anything with this chip's outputs.  If it's not in the data-sheet, you better test it thoroughly before finalizing your design :)
     
     
    post edited by Philbot - 2019/08/20 12:25:39
    #10
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/08/20 13:14:25 (permalink)
    +1 (1)
    Open drain, output=high really means the pin is floating.
    That means the INPUT buffer is not in a good low power state.
    If possible, drive low instead.
    For those pins that support analog input, putting the input into analog mode will reduce the current.
    ("Analog mode" really means "digital input buffer disabled")
     
     
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #11
    PStechPaul
    Super Member
    • Total Posts : 2381
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/08/20 15:12:29 (permalink)
    +1 (1)
    You can drive a white or blue LED from a PIC having a 3V supply by adding a diode and capacitor to form a charge pump:
     


     
    #12
    ric
    Super Member
    • Total Posts : 23598
    • Reward points : 0
    • Joined: 2003/11/07 12:41:26
    • Location: Australia, Melbourne
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/08/20 15:15:24 (permalink)
    +1 (1)
    If you're having trouble understanding Paul's suggestion:
    "V2" represents the power supply
    "V1" represents the GPIO output pin on the PIC.
    (There really should be a resistor of about 100 ohms in series with C1 for a more real-world simulation of the PIC output...)
     

    I also post at: PicForum
    Links to useful PIC information: http://picforum.ric323.co...opic.php?f=59&t=15
    NEW USERS: Posting images, links and code - workaround for restrictions.
    To get a useful answer, always state which PIC you are using!
    #13
    PStechPaul
    Super Member
    • Total Posts : 2381
    • Reward points : 0
    • Joined: 2006/06/27 16:11:32
    • Location: Cockeysville, MD, USA
    • Status: offline
    Re: What are Sink/Source currents for PIC12LF1572 2019/08/20 15:25:28 (permalink)
    0
    There is 100 ohms parasitic series resistance in V1. The actual performance is a bit different from what I originally posted, as I had left the drive as 5 volts peak. The image should update if you refresh the browser. The problem with such a charge pump is that there will always be some voltage applied to the LED, and thus some current. Using a silicon diode in place of the Schottky might take care of that.

     
    #14
    Jump to:
    © 2019 APG vNext Commercial Version 4.5