20.1.2 Signal Routing Port Input

The input to the Signal Routing Port is selected using the PORTWINx registers. There is a separate PORTWINx register for each pin of the Signal Routing Port. Several core independent peripherals are available as input selections to the multiplexer as shown in the PORTWINx Input Selections table below. In addition to the core independent peripherals, the following inputs are also added to each multiplexer:

  • The corresponding LATWn register bit – allows for software writes to the Signal Routing pin.
  • Input from the immediate next Signal Routing pin RW[n+1] – allows for shift register operation.
  • An external I/O pin – allows physical inputs.
As previously mentioned, one of the input selections available to the PORTWINx register is the LATWn register bit. The LATW register allows the user to write a value to the Signal Routing Port from software. Unlike a typical I/O port, LATW is a separate register from the actual data register as shown in Figure 20-1 block diagram.
Important:
  1. To perform a software write to one of the Signal Routing pins using the LATW register, the PORTWINx register for that Signal Routing pin must select the corresponding LATWn bit as input to the Signal Routing Port.
  2. Reading the LATW register returns the most recently written value to the LATW register and not the actual input to the Signal Routing Port. The actual input to the Signal Routing Port is selected using PORTWINx register and can be read using the PORTW register. This is similar to the standard I/O pins read/write operations.

The following input selection multiplexers are available on this device:

Table 20-1. PORTWINx Input Selections
IN[3:0]PORTWIN0PORTWIN1PORTWIN2PORTWIN3PORTWIN4PORTWIN5PORTWIN6PORTWIN7
111CLC1_OUTCLC2_OUTCLC3_OUTCLC4_OUTCLC1_OUTCLC2_OUTCLC3_OUTCLC4_OUT
110CCP1_OUTPWM1S1P1_OUTPWM2S1P1_OUTCCP1_OUTCCP2_OUTPWM1S1P2_OUTPWM2S1P2_OUTCCP2_OUT
101SPI1_SSSPI1_SDOSPI1_SCKSPI1_SSSPI1_SDOSPI1_SCKSPI1_SDOSPI1_SCK
100TU16A_OUTTU16B_OUTTMR2_OUTTMR4_OUTTU16A_OUTTU16B_OUTTMR2_OUTTMR4_OUT
011CLKREF_OUTHLVD_OUTCLKREF_OUTHLVD_OUTCLKREF_OUTHLVD_OUTCLKREF_OUTHLVD_OUT
010RC0RC1ReservedRC3RC4RC5RC6(1)RC7(1)
001RW1RW2RW3RW4RW5RW6RW7RW0
000LATW0LATW1LATW2LATW3LATW4LATW5LATW6LATW7
Note:
  1. 20-pin devices only. Reserved on 14-pin devices.