Busin - Busout Declares.
Declare SDA_Pin = Port.Pin Declares the port and pin used for the data line (SDA). This may be any valid port on the microcontroller. If this declare is not issued in the BASIC program, then the default Port and Pin is PORTA.0
Declare SCL_Pin = Port.Pin Declares the port and pin used for the clock line (SCL). This may be any valid port on the microcontroller. If this declare is not issued in the BASIC program, then the default Port and Pin is PORTA.1
Declare Slow_Bus = On - Off or 1 - 0 Slows the bus speed when using an oscillator higher than 4MHz.
The standard speed for the I2C bus is 100KHz. Some devices use a higher bus speed of 400KHz. If you use an 8MHz or higher oscillator, the bus speed may exceed the devices specs, which will result in intermittent writes or reads, or in some cases, none at all. Therefore, use this Declare if you are not sure of the device's spec. The datasheet for the device used will inform you of its bus speed. Declare Bus_SCL = On - Off, 1 - 0 or True - False Eliminates the necessity for a pull-up resistor on the SCL line.
The I2C protocol dictates that a pull-up resistor is required on both the SCL and SDA lines, however, this is not always possible due to circuit restrictions etc, so once the Bus_SCL On Declare is issued at the top of the program, the resistor on the SCL line can be omitted from the circuit. The default for the compiler if the Bus_SCL Declare is not issued, is that a pull-up resistor is required.