Yahoo Groups archive

Lpc2000

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

Message

Re: GPIO problem on Ashling EVBA7 LPC2106

2005-10-22 by rtstofer

--- In lpc2000@yahoogroups.com, "tphatrapornnant" <tp35@l...> wrote:
>
> Hi all,
> 
> I'm using Ashling EVBA7 Philips LPC2100 Evaluation board 
(LPC2106). I 
> got a problem about using GPIO P0.16-P0.31 as general 
input/output. I 
> set some of these pins (P0.16-P0.31) as I did on P0.0-P0.15 pins 
which 
> all were used and worked correctly. For P0.16-P0.31, it didn't 
work. I 
> set pins to be output as the following:
> 
> PINSEL0 &= ~P15;
> IODIR |= P15;
> IOSET = P15; 
> 
> PINSEL1 &= ~P26;
> IODIR |= P26;
> IOSET = P26;   
> 
> Both pins worked correctly on Keil simulator (I toggled both pins 
> with '1' and '0' in while loop) but only P0.15 could toggle on the 
> real H/W.
> 
> Did I forget somethings? Does anyone have a clue?
> 
> Thanks,
> 
> Teera.
>

I'm not really a fan of PINSELx &= ~PIN# - I can't see the bit 
pattern and I doubt that it works.  I much prefer to do a #define 
<bit pattern name> <hex pattern> and then use that to set the bits.

However, I think the real problem is that there is no ~P26 in 
PINSEL1, it should PROBABLY be the same pattern as ~P15.  Each pin 
select register only controls 16 pins.

Richard

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.