EmbeddedRelated.com
Forums

LPC2468 Internal Pull-up Enable

Started by "Harshad (Madhav)" October 1, 2012
Hello,

I want to Enable Internal Pull-ups for Some of the Pins of
Ports. Register PINMODEx is used to Enable Pull-ups on Perticular Pin.
I have loaded PINMODE with 0x00000000 but Still not able to get High Level
on perticular pin. Is there any other Register effecting PINMODE
functionality? I have already set PINDIR as Input.

Regards,


An Engineer's Guide to the LPC2100 Series

As far as I know it should work. Did you already get a blinker led working, just to confirm that you software is actually running.

Please also note that there are two PINMODE registers per port, each pin has two bits. This can be a bit confusing at times.

--
Kevin
--- In l..., "Harshad (Madhav)" wrote:
>
> Hello,
>
> I want to Enable Internal Pull-ups for Some of the Pins of
> Ports. Register PINMODEx is used to Enable Pull-ups on Perticular Pin.
> I have loaded PINMODE with 0x00000000 but Still not able to get High Level
> on perticular pin. Is there any other Register effecting PINMODE
> functionality? I have already set PINDIR as Input.
>
> Regards,
>
>

Hi,

--- In l..., "Harshad (Madhav)" wrote:
>
> I have loaded PINMODE with 0x00000000 but Still not able to get High Level
> on perticular pin.
>

Do you mean you expect to see 3.3V, but you measure only around 2.2V?

This would be the expected result! The internal pull-ups are not resistors, but current sources with non-linear V/I characteristic.
Their purpose is to ensure a high level for the LPC input, and 2.0V (TTL compatible) is enough for that.

The LPC2468 data sheet doesn't have the details, so please refer to the LPC1788 data sheet (equivalent in this respect), Fig.14/15 in Rev 4. You can also find the details in the LPC2468 IBIS model.

Regards,
Rolf

--- In l..., "Kevin" wrote:
>
> As far as I know it should work. Did you already get a blinker led working, just to confirm that you software is actually running.
>
> Please also note that there are two PINMODE registers per port, each pin has two bits. This can be a bit confusing at times.
>
> --
> Kevin
> --- In l..., "Harshad (Madhav)" wrote:
> >
> > Hello,
> >
> > I want to Enable Internal Pull-ups for Some of the Pins of
> > Ports. Register PINMODEx is used to Enable Pull-ups on Perticular Pin.
> > I have loaded PINMODE with 0x00000000 but Still not able to get High Level
> > on perticular pin. Is there any other Register effecting PINMODE
> > functionality? I have already set PINDIR as Input.
> >
> > Regards,
> >
> >
> >
> @Kevin,

Yes I am able to Blink the LED. IO is working fine as Output.
And I have set PIMODE2,PIMODE3, PIMODE4, PIMODE5 with 0x00000000 So Pull-up enabled on each Pin.

--- In l..., "rolf_meeser" wrote:
>
> Hi,
>
> --- In l..., "Harshad (Madhav)" wrote:
> >
> > I have loaded PINMODE with 0x00000000 but Still not able to get High Level
> > on perticular pin.
> > Do you mean you expect to see 3.3V, but you measure only around 2.2V?
>
> This would be the expected result! The internal pull-ups are not resistors, but current sources with non-linear V/I characteristic.
> Their purpose is to ensure a high level for the LPC input, and 2.0V (TTL compatible) is enough for that.
>
> The LPC2468 data sheet doesn't have the details, so please refer to the LPC1788 data sheet (equivalent in this respect), Fig.14/15 in Rev 4. You can also find the details in the LPC2468 IBIS model.
>
> Regards,
> Rolf
>

@Rolf,

Thanks for reply. Yes I expect 3.3V or 2.2V it should be High level but in this case it remains in LOW level only. When I give externally 3.3V then according to My program LED goes ON but it goes OFF when I removed that external High logic even though Pull-up is enabled.

How much current do you require from the pin to turn the LED on? The
pullups
are implemented as a small current source, and if you require more current
than
they can deliver, the input will pull low.

Mike
-----Original Message-----
From: l... [mailto:l...]On Behalf
Of koolhallmark
Sent: Monday, October 01, 2012 9:32 PM
To: l...
Subject: [lpc2000] Re: LPC2468 Internal Pull-up Enable

--- In l..., "rolf_meeser" wrote:
>
> Hi,
>
> --- In l..., "Harshad (Madhav)"
wrote:
> >
> > I have loaded PINMODE with 0x00000000 but Still not able to get High
Level
> > on perticular pin.
> > Do you mean you expect to see 3.3V, but you measure only around 2.2V?
>
> This would be the expected result! The internal pull-ups are not
resistors, but current sources with non-linear V/I characteristic.
> Their purpose is to ensure a high level for the LPC input, and 2.0V (TTL
compatible) is enough for that.
>
> The LPC2468 data sheet doesn't have the details, so please refer to the
LPC1788 data sheet (equivalent in this respect), Fig.14/15 in Rev 4. You can
also find the details in the LPC2468 IBIS model.
>
> Regards,
> Rolf
>

@Rolf,

Thanks for reply. Yes I expect 3.3V or 2.2V it should be High level but in
this case it remains in LOW level only. When I give externally 3.3V then
according to My program LED goes ON but it goes OFF when I removed that
external High logic even though Pull-up is enabled.

--- In l..., "Michael Anton" wrote:
>
> How much current do you require from the pin to turn the LED on? The
> pullups
> are implemented as a small current source, and if you require more current
> than
> they can deliver, the input will pull low.
>
> Mike
> -----Original Message-----
> From: l... [mailto:l...]On Behalf
> Of koolhallmark
> Sent: Monday, October 01, 2012 9:32 PM
> To: l...
> Subject: [lpc2000] Re: LPC2468 Internal Pull-up Enable
> --- In l..., "rolf_meeser" wrote:
> >
> >
> >
> > Hi,
> >
> > --- In l..., "Harshad (Madhav)"
> wrote:
> > >
> > > I have loaded PINMODE with 0x00000000 but Still not able to get High
> Level
> > > on perticular pin.
> > >
> >
> > Do you mean you expect to see 3.3V, but you measure only around 2.2V?
> >
> > This would be the expected result! The internal pull-ups are not
> resistors, but current sources with non-linear V/I characteristic.
> > Their purpose is to ensure a high level for the LPC input, and 2.0V (TTL
> compatible) is enough for that.
> >
> > The LPC2468 data sheet doesn't have the details, so please refer to the
> LPC1788 data sheet (equivalent in this respect), Fig.14/15 in Rev 4. You can
> also find the details in the LPC2468 IBIS model.
> >
> > Regards,
> > Rolf
> > @Rolf,
>
> Thanks for reply. Yes I expect 3.3V or 2.2V it should be High level but in
> this case it remains in LOW level only. When I give externally 3.3V then
> according to My program LED goes ON but it goes OFF when I removed that
> external High logic even though Pull-up is enabled.
>
@Michael,
I want to use the Pin as Input Pin and By default It should be High and on Key press it goes LOW and I am going to process my function once it goes LOW.

So is it not possible to set Pull-up for pin I am using as Input?

Please note that the pullup is very weak, typical 50uA.
Depending on what is connected it might be to weak.
Have you tried to measure at a floating pin (with pullup on)?

--- In l..., "koolhallmark" wrote:
>
> --- In l..., "Michael Anton" wrote:
> >
> > How much current do you require from the pin to turn the LED on? The
> > pullups
> > are implemented as a small current source, and if you require more current
> > than
> > they can deliver, the input will pull low.
> >
> > Mike
> >
> >
> > -----Original Message-----
> > From: l... [mailto:l...]On Behalf
> > Of koolhallmark
> > Sent: Monday, October 01, 2012 9:32 PM
> > To: l...
> > Subject: [lpc2000] Re: LPC2468 Internal Pull-up Enable
> >
> >
> >
> >
> > --- In l..., "rolf_meeser" wrote:
> > >
> > >
> > >
> > > Hi,
> > >
> > > --- In l..., "Harshad (Madhav)"
> > wrote:
> > > >
> > > > I have loaded PINMODE with 0x00000000 but Still not able to get High
> > Level
> > > > on perticular pin.
> > > >
> > >
> > > Do you mean you expect to see 3.3V, but you measure only around 2.2V?
> > >
> > > This would be the expected result! The internal pull-ups are not
> > resistors, but current sources with non-linear V/I characteristic.
> > > Their purpose is to ensure a high level for the LPC input, and 2.0V (TTL
> > compatible) is enough for that.
> > >
> > > The LPC2468 data sheet doesn't have the details, so please refer to the
> > LPC1788 data sheet (equivalent in this respect), Fig.14/15 in Rev 4. You can
> > also find the details in the LPC2468 IBIS model.
> > >
> > > Regards,
> > > Rolf
> > >
> >
> > @Rolf,
> >
> > Thanks for reply. Yes I expect 3.3V or 2.2V it should be High level but in
> > this case it remains in LOW level only. When I give externally 3.3V then
> > according to My program LED goes ON but it goes OFF when I removed that
> > external High logic even though Pull-up is enabled.
> >
> @Michael,
> I want to use the Pin as Input Pin and By default It should be High and on Key press it goes LOW and I am going to process my function once it goes LOW.
>
> So is it not possible to set Pull-up for pin I am using as Input?
>

@k_erkens,

Yes I have measured voltage after Enabling Pull-ups on Pin. And Pin is working as Input. So In Code it's not read as HIGH but it reads pin as LOW only.

--- In l..., "Kevin" wrote:
>
> Please note that the pullup is very weak, typical 50uA.
> Depending on what is connected it might be to weak.
> Have you tried to measure at a floating pin (with pullup on)?
>
> --- In l..., "koolhallmark" wrote:
> >
> >
> >
> > --- In l..., "Michael Anton" wrote:
> > >
> > > How much current do you require from the pin to turn the LED on? The
> > > pullups
> > > are implemented as a small current source, and if you require more current
> > > than
> > > they can deliver, the input will pull low.
> > >
> > > Mike
> > >
> > >
> > > -----Original Message-----
> > > From: l... [mailto:l...]On Behalf
> > > Of koolhallmark
> > > Sent: Monday, October 01, 2012 9:32 PM
> > > To: l...
> > > Subject: [lpc2000] Re: LPC2468 Internal Pull-up Enable
> > >
> > >
> > >
> > >
> > > --- In l..., "rolf_meeser" wrote:
> > > >
> > > >
> > > >
> > > > Hi,
> > > >
> > > > --- In l..., "Harshad (Madhav)"
> > > wrote:
> > > > >
> > > > > I have loaded PINMODE with 0x00000000 but Still not able to get High
> > > Level
> > > > > on perticular pin.
> > > > >
> > > >
> > > > Do you mean you expect to see 3.3V, but you measure only around 2.2V?
> > > >
> > > > This would be the expected result! The internal pull-ups are not
> > > resistors, but current sources with non-linear V/I characteristic.
> > > > Their purpose is to ensure a high level for the LPC input, and 2.0V (TTL
> > > compatible) is enough for that.
> > > >
> > > > The LPC2468 data sheet doesn't have the details, so please refer to the
> > > LPC1788 data sheet (equivalent in this respect), Fig.14/15 in Rev 4. You can
> > > also find the details in the LPC2468 IBIS model.
> > > >
> > > > Regards,
> > > > Rolf
> > > >
> > >
> > > @Rolf,
> > >
> > > Thanks for reply. Yes I expect 3.3V or 2.2V it should be High level but in
> > > this case it remains in LOW level only. When I give externally 3.3V then
> > > according to My program LED goes ON but it goes OFF when I removed that
> > > external High logic even though Pull-up is enabled.
> > >
> > @Michael,
> > I want to use the Pin as Input Pin and By default It should be High and on Key press it goes LOW and I am going to process my function once it goes LOW.
> >
> > So is it not possible to set Pull-up for pin I am using as Input?
>