2.3.1 Initializing a Signal Routing Port Pin for Synchronous Operation
A signal routing port pin can be initialized when operating in synchronous mode by writing to
the PORTW register when the clock is disabled (CLKEN = 0
). Writing to the PORTW
register writes directly to the flip-flop in the signal routing port pin, creating the synchronous
path between input and output.
The PORTW write operation in a Signal Routing Port is unlike a typical PORTx write operation in a regular I/O port. In a regular I/O port, PORTx write and LATx write perform similar operations – that of writing to the output buffers of the corresponding I/O pin. However, in a Signal Routing Port, PORTW write operation writes to the internal flip-flop of the corresponding signal routing port pin, whereas LATW write operation writes to the LATW register. LATW is one of the many inputs that can be selected using the PORTWINx register as an input to each signal routing port pin separately. See Figure for more information.
0
). If the clock is enabled (CLKEN = 1
), the data bus is
disconnected from the internal flip-flop, and writing to PORTW register will have no effect. See
Figure for more information.