lpc1343 GPIO PULL UP Problem

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

lpc1343 GPIO PULL UP Problem

615 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hakansefau on Wed Apr 23 02:09:59 MST 2014
Hello everyone,

I use lpc1343 mcu. How can i do all pins(or some pins) are in put? And how can i do this input, pull-up?

GPIOSetDir(1, 8, 0); // is it true? does it input P1.8 ? IF its true how can i set pull-up?

Thanks

Labels (1)
0 Kudos
3 Replies

537 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by nxp_apps on Thu May 01 11:52:37 MST 2014
Hi,

If a pin is configured as GPIO input, a write to the GPIODATA register has no effect on the pin level.
A read of the GPIODATA register returns the current state of the pin.

Also, additional information for you is masked read operation:
If the address bit associated with the GPIO data bit is HIGH, the value is read.
If the address bit is LOW, the GPIO data bit is read as 0: Reading a port DATA register yields the state of port pins 11:0 ANDed with address bits 13:2.
Please see masked read operation in the user manual (in particular Figure 15).

Hope this helps.

Thanks.

nxp_support
0 Kudos

537 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by hakansefau on Wed Apr 23 09:31:43 MST 2014
Hi mc,

Okay, but why cant read any digital input? I read just P3.0, P2.0, P1.0 ? When i do digital low(0V) its work but just 3 pins?
0 Kudos

537 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by mc on Wed Apr 23 06:05:00 MST 2014
Hi hakansefau,
When device boots up, all GPIO port pins, by default come in input pull up mode.
0 Kudos