Yahoo Groups archive

Lpc2000

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

Thread

P0.2 & P0.3 problems

P0.2 & P0.3 problems

2004-12-19 by nevelian

Hi,

I want to use P0.2 (SCL) & P0.3 (SDA) as GPIO, and are using the 
following code;

        PINSEL0 = 0x00000005;                               
	PINSEL1 = 0;
	IODIR = 0xFFFFFFFF;
	IOSET = 0xFFFFFFFF;

According to the datasheet I should have setup P0.0 & P0.1 as Uart 
pins and the rest as GPIO.

The UART works, as do GPIO P0.4 - P0.31, but why aren't P0.2 & P0.3 
outputing high (or do they need pullups)?

Rob

Re: [lpc2000] P0.2 & P0.3 problems

2004-12-19 by Robert Adsett

At 03:23 AM 12/19/04 +0000, you wrote:
>The UART works, as do GPIO P0.4 - P0.31, but why aren't P0.2 & P0.3
>outputing high (or do they need pullups)?

They do need pull-ups.

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

Re: [lpc2000] P0.2 & P0.3 problems

2004-12-19 by Markus Meng

Hi,

I2C normally needs pullup's regardless of the implementation ...

Markus

nevelian schrieb:
> 
> Hi,
> 
> I want to use P0.2 (SCL) & P0.3 (SDA) as GPIO, and are using the 
> following code;
> 
>         PINSEL0 = 0x00000005;                               
> 	PINSEL1 = 0;
> 	IODIR = 0xFFFFFFFF;
> 	IOSET = 0xFFFFFFFF;
> 
> According to the datasheet I should have setup P0.0 & P0.1 as Uart 
> pins and the rest as GPIO.
> 
> The UART works, as do GPIO P0.4 - P0.31, but why aren't P0.2 & P0.3 
> outputing high (or do they need pullups)?
> 
> Rob
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 

-- 
Mit freundlichen Gr\ufffdssen
Markus Meng

************************************************************************
** Meng Engineering        Telefon    056 222 44 10                   **
** Markus Meng             Natel      079 230 93 86                   **
** Bruggerstr. 21          Telefax    056 222 44 34                   **
** CH-5400 Baden           Email      markus.meng@... **
**                         Web        www.meng-engineering.ch         **
************************************************************************
** You cannot create experience. You must undergo it. Albert Camus    **

Re: [lpc2000] P0.2 & P0.3 problems

2004-12-19 by Leighton Rowe

How necessary is it for me to use pullups while implementing P0.3 as EINT1?

Markus Meng <meng.engineering@...> wrote:Hi,

I2C normally needs pullup's regardless of the implementation ...

Markus

nevelian schrieb:
> 
> Hi,
> 
> I want to use P0.2 (SCL) & P0.3 (SDA) as GPIO, and are using the 
> following code;
> 
>         PINSEL0 = 0x00000005;                               
>       PINSEL1 = 0;
>       IODIR = 0xFFFFFFFF;
>       IOSET = 0xFFFFFFFF;
> 
> According to the datasheet I should have setup P0.0 & P0.1 as Uart 
> pins and the rest as GPIO.
> 
> The UART works, as do GPIO P0.4 - P0.31, but why aren't P0.2 & P0.3 
> outputing high (or do they need pullups)?
> 
> Rob
> 
> 
> 
> 
> 
> 
>  
> Yahoo! Groups Links
> 
> 
> 
>  
> 
> 
> 
> 

-- 
Mit freundlichen Gr�ssen
Markus Meng

************************************************************************
** Meng Engineering        Telefon    056 222 44 10                   **
** Markus Meng             Natel      079 230 93 86                   **
** Bruggerstr. 21          Telefax    056 222 44 34                   **
** CH-5400 Baden           Email      markus.meng@... **
**                         Web        www.meng-engineering.ch         **
************************************************************************
** You cannot create experience. You must undergo it. Albert Camus    **




Yahoo! Groups SponsorADVERTISEMENT


---------------------------------
Yahoo! Groups Links

   To visit your group on the web, go to:
http://groups.yahoo.com/group/lpc2000/
  
   To unsubscribe from this group, send an email to:
lpc2000-unsubscribe@yahoogroups.com
  
   Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service. 



		
---------------------------------
Do you Yahoo!?
 Yahoo! Mail - You care about security. So do we.

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

Re: [lpc2000] P0.2 & P0.3 problems

2004-12-19 by Robert Adsett

At 06:41 AM 12/19/04 -0800, you wrote:
>How necessary is it for me to use pullups while implementing P0.3 as EINT1?

That would be as an input, yes?  It that case it would depend on the drive 
circuit producing your input.  Certainly nothing else is going to 
bring/hold it high.

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

Re: [lpc2000] P0.2 & P0.3 problems

2004-12-19 by Markus Meng

I remember that I read somewhere, that you need a PU anyway,
even if you do not use it for I2C. This implies that the
output is always kind of 'open-drain'.

For input only application it depends on the external driver.
However adding a resistor that can be omitted if not necessary
is not a 'big deal' ...

Markus

Leighton Rowe schrieb:
> How necessary is it for me to use pullups while implementing P0.3 as EINT1?
> 
> Markus Meng <meng.engineering@...> wrote:Hi,
> 
> I2C normally needs pullup's regardless of the implementation ...
> 
> Markus
> 
> nevelian schrieb:
> 
>>Hi,
>>
>>I want to use P0.2 (SCL) & P0.3 (SDA) as GPIO, and are using the 
>>following code;
>>
>>        PINSEL0 = 0x00000005;                               
>>      PINSEL1 = 0;
>>      IODIR = 0xFFFFFFFF;
>>      IOSET = 0xFFFFFFFF;
>>
>>According to the datasheet I should have setup P0.0 & P0.1 as Uart 
>>pins and the rest as GPIO.
>>
>>The UART works, as do GPIO P0.4 - P0.31, but why aren't P0.2 & P0.3 
>>outputing high (or do they need pullups)?
>>
>>Rob
>>
>>
>>
>>
>>
>>
>> 
>>Yahoo! Groups Links
>>
>>
>>
>> 
>>
>>
>>
>>
> 
> 

-- 
Mit freundlichen Gr\ufffdssen
Markus Meng

************************************************************************
** Meng Engineering        Telefon    056 222 44 10                   **
** Markus Meng             Natel      079 230 93 86                   **
** Bruggerstr. 21          Telefax    056 222 44 34                   **
** CH-5400 Baden           Email      markus.meng@... **
**                         Web        www.meng-engineering.ch         **
************************************************************************
** You cannot create experience. You must undergo it. Albert Camus    **

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.