Pull Up Resistor Value at GPIO of LPC2138 MCU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Pull Up Resistor Value at GPIO of LPC2138 MCU

3,387 Views
jitender_kumar
Contributor I

Pull Up resistor value for GPIO pins of LPC2138 Microcontroller.

0 Kudos
15 Replies

2,877 Views
berndsirozynski
Contributor III

Hello
if I understood correctly,

the problem occured after that long time, so i dont think that it is a pullup problem
Maybe 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 LPC1768
in 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.2
P0.3
P0.14
on 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

Bernd

0 Kudos

2,877 Views
jitender_kumar
Contributor I

Ok Thanks for suggestion 

0 Kudos

2,877 Views
jitender_kumar
Contributor I
Dear JITENDER K,
Internally the pull-ups/downs are not resistors, but current sources (with non-linear behavior). Since the current source delivers typically 55 µA, the effective resistor would be 3.3V/55µA = 60 kOhm. With a pull-down enable, i would advice an external pull-up of around 1k5 to always guarantee a "1" read at the input pin.
 
 
The pull-up guarantees that our pins see a high level when left floating as inputs. They might not be sufficient to guarantee a "1" for external hardware! In that case, an external pull-up may be needed.
Have a nice day!
 
To update this case, please reply to this email.
 
Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
 
Best regards,
Sol
Technical Support
NXP

Hello ,

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 ?

Thanks & Regards

Jitender

0 Kudos

2,877 Views
jitender_kumar
Contributor I
Dear JITENDER K,
Internally the pull-ups/downs are not resistors, but current sources (with non-linear behavior). Since the current source delivers typically 55 µA, the effective resistor would be 3.3V/55µA = 60 kOhm. With a pull-down enable, i would advice an external pull-up of around 1k5 to always guarantee a "1" read at the input pin.
 
 
The pull-up guarantees that our pins see a high level when left floating as inputs. They might not be sufficient to guarantee a "1" for external hardware! In that case, an external pull-up may be needed.
Have a nice day!
 
To update this case, please reply to this email.
 
Thank you for your interest in NXP Semiconductor products and
for the opportunity to serve you.
 
Best regards,
Sol
Technical Support
NXP SemiconductpastedImage_2.jpg

As per reply on mail from NXP,

Hello Sir/Mam,
Its mean that 1K ohm resistor of pull up is enough for LPC2138 MCU?
Before that I was calcualting Pull resistor value as 
VCC = 3.3 V, Maximum sink current is 4 mA. 
SO I am considering maximum sink current 1 mA.
So Pull Up resistor value  = R = V/I = 3.3/1mA = 3.3 kohm 
Is this is right ?
 
I am interfacing LPC2138 with different ICs.
Problem is that LPC2138 pins gets fail after use 1-2 months.
I am trying to find the root cause of the problem
 
1. P1.31       -------- OUTPUT ------- TO DRIVE ULN2803 IC
2. P0.23      ---------OUTPUT ------ TO DRIVE SN65LVDS IC
3. P1.26,P0.3 ------INPUT ------ SENSING OUTPUT OF LM339 IC
 
 
Point is that either LPC2138 is not capable to drive these IC . SO gets fail after use of some days or there are any other mistake.
 
I am attaching circuit. Please check & suggest.

Thanks & Regards

 
0 Kudos

2,877 Views
jitender_kumar
Contributor I

pastedImage_1.png

I am using attached circuit in one project.

Problem is:

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.

0 Kudos

2,877 Views
bernhardfink
NXP Employee
NXP Employee

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?

Regards,

Bernhard.

0 Kudos

2,877 Views
jitender_kumar
Contributor I

WAITING FOR REPLY IF YOU CAN SUGGEST

0 Kudos

2,877 Views
jitender_kumar
Contributor I

Hello Sir

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.

0 Kudos

2,877 Views
jitender_kumar
Contributor I

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.

Remarks:

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.

Please suggest.

0 Kudos

2,877 Views
jitender_kumar
Contributor I

Hello

Thanks for Reply.

I have checked datasheet. 

[6]"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.

Question is:

(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

0 Kudos

2,877 Views
bernhardfink
NXP Employee
NXP Employee

(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.

Regards,

Bernhard.

0 Kudos

2,877 Views
jitender_kumar
Contributor I

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.

0 Kudos

2,877 Views
bernhardfink
NXP Employee
NXP Employee

As I see in the data sheet:                                                                                 Min               Typ            Max

pastedImage_1.png

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?

Regards,

Bernhard.

0 Kudos

2,877 Views
bernhardfink
NXP Employee
NXP Employee

The pull-up resistor’s value typically ranges from 60 k to 300 k.

See Data Sheet of LPC2138 on page 12.

https://www.nxp.com/docs/en/data-sheet/LPC2131_32_34_36_38.pdf 

0 Kudos

2,877 Views
jitender_kumar
Contributor I

Hello

Thanks for Reply.

I have checked datasheet. 

[6]"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.

Question is:

 

(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

0 Kudos