Syntax:
HI2CWaitMSSP
Command Availability:
Only available for microcontrollers with the hardware I2C or TWI module.
Explanation:
The methods sets the global byte variable HI2CWaitMSSPTimeout to 255 ( or True ) if the MSSP module has timeout during operations.
HI2CWaitMSSPTimeout can tested for the status of the I2C bus.
Note:
This command is also available on microcontrollers with a second hardware I2C port.
HI2C2WaitMSSP
Example:
HI2CStart
HI2CWaitMSSP ' <<< the HI2CWaitMSSP instruction
if HI2CWaitMSSPTimeout <> True then
HI2CSend ( deviceID )
else
HSerPrint "Bus timeout!"
end ifKey line: HI2CWaitMSSP — waits for the hardware MSSP module to become ready and sets HI2CWaitMSSPTimeout to true if it timed out instead, so the following code can check the bus status before sending.
See Also:
- HI2C Overview — category overview
- HI2CAckPollState — related command in the same category
- HI2CReceive — related command in the same category
Supported in <HI2C.H>

