SCPS277B November 2022 – November 2023 TCAL6408
PRODUCTION DATA
The Input Port register (register 0) reflects the incoming logic levels of the pins, regardless of whether the pin is defined as an input or an output by the Configuration register. The input port register is read only. Writes to this register have no effect. The default value (X) is determined by the externally applied logic level. Before a read operation, a write transmission is sent with the command byte to indicate to the I2C device that the Input Port register will be accessed next.
BIT | I-7 | I-6 | I-5 | I-4 | I-3 | I-2 | I-1 | I-0 |
DEFAULT | X | X | X | X | X | X | X | X |
The Output Port register (register 1) shows the outgoing logic levels of the pins defined as outputs by the Configuration register. Bit values in this register have no effect on pins defined as inputs. In turn, reads from this register reflect the value that is in the flip-flop controlling the output selection, not the actual pin value.
BIT | O-7 | O-6 | O-5 | O-4 | O-3 | O-2 | O-1 | O-0 |
DEFAULT | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
The Polarity Inversion register (register 2) allows polarity inversion of pins defined as inputs by the Configuration register. If a bit in this register is set (written to '1'), the corresponding port pin polarity is inverted. If a bit in this register is cleared (written to a '0'), the corresponding port pin's original polarity is retained.
BIT | P-7 | P-6 | P-5 | P-4 | P-3 | P-2 | P-1 | P-0 |
DEFAULT | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
The Configuration register (register 3) configures the direction of the I/O pins. If a bit in this register is set to 1, the corresponding port pin is enabled as an input with a high-impedance output driver. If a bit in this register is cleared to 0, the corresponding port pin is enabled as an output.
BIT | C-7 | C-6 | C-5 | C-4 | C-3 | C-2 | C-1 | C-0 |
DEFAULT | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
The output drive strength registers control the output drive level of the P port GPIO buffers. Each GPIO can be configured independently to the desired output current level by two register control bits. For example, Port P7 is controlled by register 41 (bits 7 and 6), port P6 is controlled by register 41 (bits 5 and 4), and so on. The output drive level of the GPIO is programmed 00b = 0.25x drive strength, 01b = 0.5x drive strength, 10b = 0.75x drive strength, or 11b = 1x for full drive strength capability.
BIT | CC-3 | CC-3 | CC-2 | CC-2 | CC-1 | CC-1 | CC-0 | CC-0 |
DEFAULT |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
BIT | CC-7 | CC-7 | CC-6 | CC-6 | CC-5 | CC-5 | CC-4 | CC-4 |
DEFAULT |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
The Input latch register enables and disables the input latch feature of the P port GPIO pins. This register is effective only when the pin is configured as an input port. When an input latch register bit is 0, the corresponding input pin state is not latched. A state change in the corresponding input pin generates an interrupt. A read of the input register clears the interrupt. If the input goes back to its initial logic state before the input port register is read, then the interrupt is cleared.
When an input latch register bit is set to 1, the corresponding input pin state is latched. A change of state of the input generates an interrupt and the input logic value is loaded into the corresponding bit of the input port register (registers 0 and 1). A read of the input port register clears the interrupt. However, if the input pin returns to its initial logic state before the input port register is read, then the interrupt is not cleared and the corresponding bit of the input port register keeps the logic value that initiated the interrupt.
For example, if the P4 input was at a logic 0 state and then transitions to a logic 1 state followed by going back to the logic 0 state, the input port register will capture this change and an interrupt will be generated (if unmasked). When the read is performed on the input port 0 register, the interrupt is cleared, assuming there were no additional inputs that have changed, and bit 4 of the input port register will read '1'. The next read of the input port register bit 4 should now read '0'.
An interrupt remains active when a non-latched input simultaneously switches state with a latched input and then returns to its original state. A read of the input register reflects only the change of state of the latched input and also clears the interrupt. If the input latch register changes from a latched to a non-latched configuration, the interrupt will be cleared if the input logic value returns to its original state.
If the input pin is changed from a latched to a non-latched input, a read from the input port register reflects the current port logic level. If the input pin is changed from a non-latched to a latched input, the read from the input register reflects the latched logic level.
BIT | L-7 | L-6 | L-5 | L-4 | L-3 | L-2 | L-1 | L-0 |
DEFAULT |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
The pull-up/pull-down enable register allows the user to enable or disable pull-up/pull-down resistors on the GPIO pins. Setting the bit to logic 1 enables the selection of pull-up/pull-down resistors. Setting the bit to logic 0 disconnects the pull-up/pull-down resistors from the GPIO pins. The resistors are disabled when the GPIOs are configured as outputs Use the pull-up/pull-down selection register to select either a pull-up or pull-down resistor.
BIT | PE-7 | PE-6 | PE-5 | PE-4 | PE-3 | PE-2 | PE-1 | PE-0 |
DEFAULT |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
The pull-up/pull-down selection register allows the user to configure each GPIO to have a pull-up or pull-down resistor by programming the respective register bit. Setting a bit to a logic 1 selects a 100 kΩ pull-up resistor for that GPIO pin. Setting a bit to logic 0 selects a 100 kΩ pull-down resistor for that GPIO pin. If the pull-up/pull-down feature is disabled via register 43, writing to this register has no effect on the GPIO pin.
BIT | PUD-7 | PUD-6 | PUD-5 | PUD-4 | PUD-3 | PUD-2 | PUD-1 | PUD-0 |
DEFAULT |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
1 |
The Interrupt mask register is defaulted to logic 1 upon power-on, disabling interrupts during system start-up. Interrupts may be enabled by setting corresponding mask bits to logic 0.
If an input changes state and the corresponding bit in the interrupt mask register is to 1, the interrupt is masked and the interrupt pin is not asserted. If the corresponding bit in the interrupt mask register is set to 0, the interrupt pin is asserted.
When an input changes state and the resulting interrupt is masked, setting the interrupt mask register bit to 0 will cause the interrupt pin to be asserted. If the interrupt mask bit of an input that is already currently the source of an interrupt is set to 1, the interrupt pin is de-asserted.
BIT | M-7 | M-6 | M-5 | M-4 | M-3 | M-2 | M-1 | M-0 |
DEFAULT | 1 |
1 |
1 | 1 | 1 | 1 | 1 | 1 |
The Interrupt status register is a read only register used to identify the source of an interrupt. When read, a logic 1 indicates that the corresponding input pin was the source of the interrupt. A logic 0 indicates that the input pin is not the source of an interrupt. When a corresponding bit in the interrupt mask register is set to 1 (masked), the interrupt status bit will return to logic 0.
BIT | S-7 | S-6 | S-5 | S-4 | S-3 | S-2 | S-1 | S-0 |
DEFAULT |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
The output port configuration register selects port-wise push-pull or open-drain I/O stage. A logic 0 configures the I/O as push-pull ( Q1 and Q2 are active, see Figure 7-2). A logic 1 configures the I/O as open-drain ( Q1 is disabled, Q2 is active) and the recommended command sequence is to program this register (4F) before the Configuration register (03) sets the port pins as outputs.
BIT | Reserved | ODEN-0 | ||||||
DEFAULT |
0 |
0 |
0 |
0 |
0 |
0 |
0 |
0 |