This example shows the programming to route a signal.
Route Signal Through MIO
Routing a signal through an MIO can be a two-step process.
- Configure the MIO pin (required)
- Select between the PMC and LPD MIOs (not always required)
Configure I/O Buffer for Input
The I/O buffer attributes are listed in Output Buffer Control Registers.
The steps to configure the input for LPD MIO pin 18 include:
- Select the MIO (PMC or LPD) using LPD_MIO_Sel (0: PMC MIO).
- Route the signal through the MIO using the MIO_PIN_18 register.
- Disable the output driver. Write a 1 to the MIO_Bank2_Tristate [PIN_18_TRI] bit.
- Select the CMOS input (not Schmitt). Write 0 to the BANK_RX_SCHMITT [18] bit.
- Enable the weak internal pull-up resister. Write 1 to the BANK_PU [18] bit.
- Set the output drive to 2 mA. Write 0 to the BANK_SEL_DRV0 [18] and BANK_SEL_DRV1 [18] bits.
- Select a slow slew rate. Write 0 to BANK_SEL_SLEW [18].