Pic minimum IO input current

Status
Not open for further replies.

rocky79

Member level 5
Joined
Sep 20, 2010
Messages
83
Helped
1
Reputation
2
Reaction score
0
Trophy points
1,286
Visit site
Activity points
1,903
Hello,

I am using the PIC16LF1503 at 2.5v. What is the minimum input current for a digital and analogue input? to work correctly
I was looking at the electrical specs:
For a digital input, the closest that I found is the min weak pull up current on page 293 which is 25uA at 3.3v. Please confirm if it's correct

I am not sure what would the min A2D input current would be.

Thank you !
 

The pins are voltage driven not current driven. For digital pins spec you need to use is D060 on the same page. For analog inputs (if you have the pin configured in analog mode) the figures are on page 129 in figure 15-4. At DC it is essentially the same as in digital mode but the current will increase slightly with frequency due to the charging of the sample and hold capacitor.

The 25uA weak pull-up current is a reference to the internal current source between VDD and the pin when it is configured as an input and the pull-up is turned on. It is a measure of how much current you have to take from the pin in order to make it go low, not how much it draws to make it go high.

Brian.
 

Thanks for the reply Brian. I thought the input on the pic16 is TTL and the output is a CMOS ( I am still learning, I could be wrong) See below.

(Reference on Pg2: https://ww1.microchip.com/downloads/en/DeviceDoc/31009a.pdf)
However I am still not clear why the leakage current parameter D060 would have to do with the minimum current needed to drive the input in digital/analog mode. Could you please elaborate? Thanks again
 
Last edited:

The TTL/ST reference is to the voltage levels needed to drive it. A mixed bipolar and MOS device would be difficult to fabricate and I believe all the PIC devices are MOS throughout.

The inputs are voltage driven, they don't need a current source to operate them and for most practical purposes they don't need any current to drive them except enough to charge the capcitance of the pin. They will however leak a very tiny amount of current due to silicon impurities and that is what the D060 refers to. You will note that the current is extremely low, typically only 25nA and rises to 1uA at maximum temperature due to silicon becoming 'leakier' as temperature increases. This equates to a typical input resistance of 200,000,000 Ohms. The MCLR pin has slightly higher, although still very small, leakage because it has the internal programming circuits connected to it as well as the normal functions.

Brian.
 
Great explanation Brian, however I still have one question.
since the input gates are voltage driven then having a very large pullup resistor that can supply lets say 25nA to the pin should be enough.
however you said to make the pin go low the pin needs 25uA to be drawn from it? but we just said it's voltage driven?
I guess I still don't understand the 25uA weak pull current on a voltage driven gates. ( shouldn't be 25nA ?)
 
Last edited:

No, you are confusing input leakage with the internal pull-up current source. I'll try to explain:

Input leakage is the current drawn by an input pin when you drive it to a logic high level. Think of it as the reading you would get if you connected a current meter between VDD and an input pin. Ideally it would be zero but there is always a small current 'the leakage' caused by impurities in the silicon that lets a little flow through.

The pull-up current is intentional and you can turn it on or off under program control. It is a facility added by the manufacturer so you can make a pin default to a high state if nothing is driving it. As a consequence, to make the pin go to a logic low state you have to overcome the 'pull-up', pulling the pin down by drawing current out of it through an external connection. Think of it as the current you would measure if you connected a current meter between the pin and VSS and had the pull-up turned on. Note that a pin with nothig driving it and it's pull-up disabled draws such small current that it will pick up static levels around it and it's logic level would be unpredictable.

Note that there is a huge difference between 25nA and 25uA (1,000 times) even though both are quite small.

Brian.
 
Thank you very much Brian, it's very clear now.
So if I want to pull an input pin high and draw as little power as possible then It's better to use an external resistor in the megaohms range ( nano-microamps current) rather than using the internal pull up resistor which draws a typical 100uA current. Is that correct?
Thanks again!
 

Yes but in reality the value of the resistor is best kept low (~10K) for several reasons:

1. As the pin draws negligible current the value doesn't really matter. The same current will be drawn by the pin even if you short it directly to VDD but that would make it difficult to drive it to a logic low!

2. Often the external resistor is also an active part of the circuit driving the pin so it's value would be chosen to suit the application.

3. If you use a very high value resistor the internal capacitance of the pin will have to charge through it so there will be a delay before it reaches logic high level. The delay will be short but possibly long enough for the PIC to execute several instructions.

4. To some extent the resistor acts like a 'drain' to take away charges and signals conducted to the pin through wiring capacitance and by magnetic coupling. The higher the resistor value the less successful it will be at doing that so the pin becomes more susceptible to picking up interference.

The internal pull-up doesn't draw more than a few nA if the pin is at logic high level. The pull-up current is to the lift the pin to logic high level, once its there the only current will be the 25nA input leakage. The 25uA current is how much the internal pull-up circuit can produce, not how much it actually consumes. The 25uA figure is to let you know how much can flow OUT of the pin when it is configured as an input AND the pull-up is enabled, in other words how much your external circuit needs to draw from the pin to bring the pin voltage down to logic low level.

Brian.
 
Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…