Pinout and Remappable pins
From openPicus Wiki
Flyport and FlyportPRO modules pinout is very flexible, it means you can modify it by software:
- Each pin may be changed into a digital GPIO (including Analog inputs -> ADC tutorial)
- Each pin has Internal pull up/pull down resistors
- Most of the pins are remappable so you can transform those pins into: UART, SPI, PWM, External Interrupt and others
|UARTxTX (x is from 1 to 4, 3 for GPRS version)||Output|
|UARTxRX (x is from 1 to 4, 3 for GPRS version)||Input|
|UARTxRTS (x is from 1 to 4, 3 for GPRS version, not enables in default UART initialization)||Output|
|UARTxCTS (x is from 1 to 4, 3 for GPRS version, not enables in default UART initialization)||Input|
|SPICLKOUT (for SPI Master mode, Clock Output Signal)||Output|
|SPI_OUT (Data Output Signal)||Output|
|SPI_SS_OUT (for SPI Master mode, Slave Select Signal)||Output|
|SPI_IN (Data Input Signal)||Input|
|SPI_SS (for SPI Slave mode, Slave Select Signal)||Input|
|EXT_INTx (x is from 2 to 4)||Input|
|RESET_PPS||Clear Output configuration|
- PWM function is not listed here since its assignment needs a specific API (please refer to PWM API or tutorials);.
- Each time you assing a specific output function to a remappable pin, you cannot use IOGet, IOButtonState, nor IOPut functions. The state of the pin is totally controlled by output peripheral.
- To remove this configuration you have to use the RESET_PPS parameter in IOInit function and then initialize again I/O pin as you like.
For example, the pin 14 can be set as Digital input or UART2 TX:
- To set p14 as digital input:
- To set p14 as UART2TX: