36.3.2 SDA and SCL Pins
The SDA and SCL pins must be configured as open-drain outputs. Open-drain configuration is accomplished by setting the appropriate bits in the Open-Drain Control (ODCONx) registers, while output direction configuration is handled by clearing the appropriate bits in the Tri-State Control (TRISx) registers.
Input threshold and slew rate settings are configured using the RxyFEAT registers. The RxyFEAT registers are used exclusively on the default I2C pin locations and provide the following selections:
- Input threshold levels:
- SMBus 3.0 (1.35V) input threshold
- SMBus 2.0 (2.1V) input threshold
- I2C-specific input thresholds
- Standard GPIO input thresholds (controlled by the Input Level Control (INLVLx) registers)
- Slew rate limiting:
- I2C-specific slew rate limiting
- Standard GPIO slew rate (controlled by the Slew Rate Control (SLRCONx) registers)
Important: The pin locations for SDA
and SCL are remappable through the Peripheral Pin Select (PPS) registers. If new pin
locations for SDA and SCL are desired, user software must configure the INLVLx, SLRCONx,
ODCONx and TRISx registers for each new pin location. The RxyFEAT registers cannot be
used since they are dedicated to the default pin locations. The internal pull-ups not
strong enough to drive the pins; therefore, external pull-up resistors must be
used.