Question

How can I configure one pin for input and another for the output?

If I am not wrong this could be done with GPIO registers that controlls device pins that are not connected to peripherical functions.

Was it helpful?

Solution

Look in UM10360.PDF, Chapter 9: GPIO. There you can find the description for the FIOxDIR direction registers, as well as the reigisters for querying, setting and clearing GPIO pins.

I also strongly recommend looking at the CMSIS Standard Peripherial Driver Library that NXP offers for 175x/176x, look in microcontroller support documents. Edit: There are lots of sample code in this Library.

OTHER TIPS

https://github.com/dwelch67

I have a number of lpc based examples. You are looking for the IODIR register, depending on the port and flavor of LPC, there are now what they call fast I/O registers. a one in a bit location means that pin is an output, a zero an input.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top