Pinout and Remappable pins

From openPicus Wiki
Jump to: navigation, search

Contents

Introduction

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

Remappable pins

You can change pin configuration even at runtime. To do this you can use the IOInit(...) function
First of all please check carefully the FlyportPRO pinout or Flyport pinout.


IOInit() parameters

Remappable functionalities Type
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

Programming tips:

  • 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.


Example

For example, the pin 14 can be set as Digital input or UART2 TX:

  • To set p14 as digital input: IOInit(p14, in);
  • To set p14 as UART2TX: IOInit(p14, UART2TX);
Personal tools
Namespaces

Variants
Actions
START HERE
DEVELOPMENT
HARDWARE INFO
RESOURCES
PHASED OUT
Toolbox