Pull Up resistor value for GPIO pins of LPC2138 Microcontroller.
The pull-up resistor’s value typically ranges from 60 kΩ to 300 kΩ.
See Data Sheet of LPC2138 on page 12.
Thanks for Reply.
I have checked datasheet.
"5 V tolerant pad with built-in pull-up resistor providing digital I/O functions with TTL levels and hysteresis and 10 ns slew rate control. The pull-up resistor’s value ranges from 60 k to 300 k."
This is built in pull up resistor value for Port 1 i.e. P1.16 to P1.31.
But there are no internal pull up for Port 0.
(1) Is Port 0 is internal pull up?
(2) If Yes, What is the internal pull up resistor value of Port0 ?
(3) If No, What is recommended external pull up resistor value for Port0 ?
Thanks & Regards
(1) P0.31 has an internal pull-up as well as P1.16 to P1.25
(3) If you use P0.0 to P0.30 as GPIO, then you could apply any type of external pull-up you like when the pin is configured as input. If configured as output, then you must take care of the drive strength of the pin. We specify that the pin can drive 4mA, so if you apply a 1k external pull-up you are in spec. But the question is, if you really need this static current through the pull-up when the port is driven to LOW.
AS I See in dataheet
Ioh Current is = 4mA
Iol Current is = 4mA
Source & Sink Current of pins of LPC2138 is 4mA (Maximum) as given.
Can we use 10 K ohm resistor to pull up the pin. Is it will operate.
As I see in the data sheet: Min Typ Max
Driven to HIGH: at VDD-0.4V the pin will deliver at least -4mA. But it can be more.
Driven to LOW: at 0.4V the pin will deliver at least 4mA. But it can be more
This means that if you drive more than 4mA, then the high voltage could fall below 2.9V or rise above 0.4V.
Is 10kOhm enough: I don't know if this is enough for your application. What's the purpose of an external pull-up on a pin which is configured as output?
I am using attached circuit in one project.
1.I am using P0.23 (Output Pin) to drive SN65LVDS Ic, But this pin fails after after time. I am not finding the exact root cause of the problem?
2.P1.31 (Output Pin) to drive ULN2003, But this pin fails after after time. I am not finding the exact root cause of the problem?
3.P0.3 & P1.26 as (input). But again same failure problem.
I think it may be due to improper pull up resistor value. Please suggest.
330Ohm as pull-up on an output generates a static current of 10mA in case the output is driven to LOW. If there is no special reason for such a high load, then make it a 10kOhm.
The connection on P1.31 could be a problem, because you pull the 3.3V output up to a 5V domain. I have to think about any side effects.
For P0.3 and P1.26 it doesn't matter, you could connect it directly to 3.3V or to GND, the input doesn't care. 330Ohm here most likely doesn't make sense, but it does not affect in any way the physical structure of the input.
What means "fail after time"? How does the fail look like and what's the time period?
Can you measure voltages above 5V on these pins during normal operation?
According to your suggestion, Connection is ok ?
1. Fail Time period may be 1 month if we use regularly it in 5-6 hours.
These pins goes to permanently low state (0 v). As i checked with CRO.
Waiting for Reply. I have shared my circuit with you. Please suggest what I am doing wrong in this circuit.
As per your remarks:
(1) 330Ohm as pull-up on an output generates a static current of 10mA in case the output is driven to LOW.
But LPC2138 has 4 mA Sink current. So may be this 330 ohm value is wrong here?
We have to use the resistance which can limit current upto 4 mA.
So if we use 3.3K ohm resistor. That this static current will be 1 mA. This may be ok for safety of pin?
Because with 10 k ohm resistance, this current will be limit to 33 uA.
(2) The connection on P1.31 could be a problem, because you pull the 3.3V output up to a 5V domain. I have to think about any side effects.
Remarks: 5V pull up may be reason for fail of this pin. Fail means permanently 0V. So we have to drive the ULN2003 Current driver IC with this pin. SO we can directly connect this pin with ULN2003 without pull up.
(3) P0.3 & P1.26 (input) has same case. May be this is due to 10 mA static current. As it is Pull up with 330 ohm resistor. I have not observed any 5V on these pins. But these pins goes to permanently low voltage stage and doesn't operate. So if we pull up with 3.3 K ohm then static current will be 1 mA. safe limit for mCU.
WAITING FOR REPLY IF YOU CAN SUGGEST
As per reply on mail from NXP,
Thanks for Replying on mail regarding pull up resistor value.
As Source & sink current of LPC2138 is 4 mA (maximum).
May you please suggest me what is the safe limit which you can source from LPC2138 ?
Helloif I understood correctly,
the problem occured after that long time, so i dont think that it is a pullup problemMaybe you have a Software problem with a 32 Bit Timer overflow ?If you use an 32 Bit Timer with any increment 1ms it overflows in 49 Days.if it is an signed overflow the proplem occures after 25 days.I have found this problem in some delay functions. On the next reset it works for the next 49 or 25 days.
that's just an idea...
The pullup problem (current source) i have dicussed with NXP at march 2011 with the LPC1768in my medical device external Mosfets were killed, because the Gate Voltage direkt to the processor pins was only 2,1 Volt, but i need more then 3 Volt. So the RDSon resistor goes very high and killed the Mosfets.But this problems occurred only in reset state and Breakpoints before switching these pins to output.
in your controller, the data sheet says: there are 3 pins with open drain pins (no pullup)P0.2P0.3P0.14on these pins you need always external pullups
The value 3K3 for external pullups, i think this is a good choice with 1mA at 3,3 Volt
Ok Thanks for suggestion
Retrieving data ...