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.

有帮助吗?

解决方案

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.

其他提示

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.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top