142 of 318
ZBasic System Library 132 ZX Microcontroller Family I2CStart Type Subroutine Invocation I2CStart(channel) Parameter Method Type Description channel ByVal Byte The I2C channel number (0-4). Discussion This subroutine initiates an I2C bus cycle by implementing the proper sequence of transitions on the SDA and SCL lines. This subroutine can be used in conjunction with I2CGetByte(), I2CPutByte() and I2CStop() to perform a lower level interaction with an I2C slave device. Knowledge of the I2C protocol and the specifications of the particular I2C device are required in order to use this function. If the specified I2C channel has not been properly prepared using OpenI2C(), the results are undefined. If an invalid channel number is specified, the function returns immediately without doing anything. Compatibility This subroutine is not available in BasicX compatibility mode. See Also OpenI2C, CloseI2C, I2CGetByte, I2CPutByte, I2CStop, I2CCmd