Hbusin - Hbusout Declares.
Declare Hbus_Bitrate = Constant 100, 400, 1000 etc. The standard speed for the I2C bus is 100KHz. Some devices use a higher bus speed of 400KHz. The above Declare allows the I2C bus speed to be increased or decreased. Use this Declare with caution, as too high a bit rate may exceed the device's specs, which will result in intermittent transactions, or in some cases, no transactions at all. The datasheet for the device used will inform you of its bus speed. The default bit rate is the standard 100KHz.
Declare HSDA_Pin = Port.Pin For devices that have PPS (Peripheral Pin Select), the port and pin used for the data line (SDA) must be given, so that the compiler can setup the PPS SFRs before the program starts. This may be any valid port on the microcontroller, but check the datasheet to see if the Port is valid for the peripheral.
Declare HSCL_Pin = Port.Pin For devices that have PPS (Peripheral Pin Select), the port and pin used for the clock line (SCL) must be given, so that the compiler can setup the PPS SFRs before the program starts. This may be any valid port on the microcontroller, but check the datasheet to see if the Port is valid for the peripheral.
