Karl,
I think the reason is that P0.2 and P0.3 are I2C pins and have an
open drain characteristic. Working as outputs they are able to
output a strong 0, but a weak 1 only. Let the pullup connected to
VCC and set the pins to 0 or 1. You should get the correct logic
levels then.
Regards
Martin
www.arm-emulator.com
--- In lpc2000@yahoogroups.com, "Karl Olsen" <kro@...> wrote:
>
> ---- Original Message ----
> From: "blasteriokas" <blasteriokas@...>
> To: <lpc2000@yahoogroups.com>
> Sent: Saturday, February 11, 2006 11:32 AM
> Subject: [lpc2000] Trouble with LPC2148 P0.2 and P0.3 pins
>
> > I am having problems with P0.2 and P0.3 pins.
> > The trouble is that I can't define them as outputs. I have wrote
a
> > small program:
> >
> > #include <LPC214x.H>
> > void main(void)
> > {
> > PINSEL0 = 0;
> > IODIR0 = 0xFFFC;
> > IOPIN0 = 0x00FC;
> > PCON = 1; // IDLE mode
> > }
> >
> > When program is executed, on pins P0.4..15 is logical '1', but on
> > these P0.2 and P0.3 - nothing. I connected a pull-up resistor to
Vcc -
> > pins does not refuse it, so, I think, these two pins works like
> > inputs. But WHY?
>
> Read the pin descriptions in the datasheet or manual, including
the Show quoted textHide quoted text
> footnotes. They are open drain.
>
> Karl Olsen
>