Yahoo Groups archive

Lpc2000

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

Message

Re: [lpc2000] PINSEL Queries

2006-05-31 by Tom Walsh

suyash wrote:

>Hi all,
>
>I am using ARM LPC2106, I have following doubts about the 
>configuration of PINSEL0 and PINSEL1.
>
>1)where exactly should I define it in the initialsation?
> In common system initialisation or at the eac and every periphral 
>(ex. UART0 or SPI etc.) initialisation.
>
>2) suppose I want to use a single pin as multipurpose functioning, so 
>how do I have to take care of PINSELn.
>will it be always overwritten everytime or else we need to mask it 
>and then modify it(for retaining its previous status).
>
>  
>
As the others have said, your choice.

I am driving a buzzer with the PWM5, and the buzzer circuit requires 
that PWM5 to be low (0 volts) when not in use.  So, I initially program 
PWM5 as an output pin with IODIR, set it with IOCLR.  Next, I program 
the PWM0 for my frequency, and I toggle the P0.21 function bit in the 
PINSEL1 between GPIO and PWM5.

TomW


-- 
Tom Walsh - WN3L - Embedded Systems Consultant
http://openhardware.net, http://cyberiansoftware.com
"Windows? No thanks, I have work to do..."
----------------------------------------------------

Attachments

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.