Yahoo Groups archive

Lpc2000

Index last updated: 2026-04-28 23:31 UTC

Thread

GPIO P0.3 problem

GPIO P0.3 problem

2005-06-20 by MattKav

I am trying to use P0.3 as a GPIO, but it doesn't seem to be working.
 I define the bit as:
#define ADC_CS  (1 << 3)
but it doesn't work.  If I change it to:
#define ADC_CS  (1 << 19)
I can toggle it just fine using the exact same code.  P0.2 does not
work either.

I am not using the I2C, but I am using SPI.  I am using Timer0;
however, I am not using the Match.

I have even tried forcing the pin to be GPIO using:
PINSEL0 = PINSEL0 & 0xFFFFFF0F;
but that doesn't work either.

Any suggestions?  (Besides swapping in P0.19 for P0.3.)
Matt

Re: [lpc2000] GPIO P0.3 problem

2005-06-20 by Robert Adsett

At 09:31 PM 6/20/05 +0000, MattKav wrote:
>I am trying to use P0.3 as a GPIO, but it doesn't seem to be working.

P0.2 & P0.3 are IIC pins, they need pull-ups.  Do you have pull-ups on them?

Robert

" 'Freedom' has no meaning of itself.  There are always restrictions,   be 
they legal, genetic, or physical.  If you don't believe me, try to chew a 
radio signal. "  -- Kelvin Throop, III
http://www.aeolusdevelopment.com/

Re: GPIO P0.3 problem

2005-06-20 by Karl Olsen

--- In lpc2000@yahoogroups.com, "MattKav" <mkavalauskas@b...> wrote:
> I am trying to use P0.3 as a GPIO, but it doesn't seem to be
> working.
> I define the bit as:
> #define ADC_CS  (1 << 3)
> but it doesn't work.  If I change it to:
> #define ADC_CS  (1 << 19)
> I can toggle it just fine using the exact same code.  P0.2 does not
> work either.
> 
> I am not using the I2C, but I am using SPI.  I am using Timer0;
> however, I am not using the Match.
> 
> I have even tried forcing the pin to be GPIO using:
> PINSEL0 = PINSEL0 & 0xFFFFFF0F;
> but that doesn't work either.
> 
> Any suggestions?  (Besides swapping in P0.19 for P0.3.)

Maybe add pull-up resistors.
P0.2 and P0.3 can only work as inputs or open-drain outputs, not push-
pull outputs.  This is true even when they aren't configured as I2C.

Karl Olsen

RE: [lpc2000] GPIO P0.3 problem

2005-06-20 by Matthew Kavalauskas

>>I am trying to use P0.3 as a GPIO, but it doesn't seem to be working.

>P0.2 & P0.3 are IIC pins, they need pull-ups.  Do you have pull-ups on
them?

 

Thanks Robert and Karl; I do not have pull-ups.  I finally found the
page in the manual where it states this.  As I have never used I2C, I
did not realize the spec requires the pins to be open drain.

 

Matt



[Non-text portions of this message have been removed]

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.