Yahoo Groups archive

Lpc2000

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

Message

Re: GPIO Port 1 (2132)

2005-07-19 by Dave

--- In lpc2000@yahoogroups.com, "Dave" <dgsomerton@w...> wrote:
> Hello,
> 
>   Some weird things happen when using PORT 1.
> 
> Firstly, make sure the debug and trace functions are disabled.
> 
> 	regVal = PINSEL2;
> 	regVal &= ~((1 << 2) | (1 << 3));
> 	PINSEL2 = regVal;
> 
> Next, set the pins used as outputs to become outputs, and drive their
> outputs high.
> 
> 	regVal = (1 << 31) | (1 << 26) | (1 << 24);
> 	IODIR1 = regVal;
> 	IOPIN1 = regVal;
> 
> Constantly read the pin values and display.
> 
>         port1.26 is always flickering (i.e. on/off) when read.
>         the output does not change, it remains driven high, just the
>         readback from IOPIN1 shows this.
> 
> Further, a circuit to detect switch closures uses 8 bits of port 0 and
> 8 bits of port 1. The inputs to port 1 read as expected, but the
> inputs to port 1 are always 'high'. Can this be explained?
> 
> Dave

Typo:

> 8 bits of port 1. The inputs to port 1 read as expected, but the
> inputs to port 1 are always 'high'. Can this be explained?

 should be

> 8 bits of port 1. The inputs to port 0 read as expected, but the
> inputs to port 1 are always 'high'. Can this be explained?

Dave

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.