Example

  I2CSTART Pin

Function
Generates an I2C Start condition.

Quick Facts
  SX18/20 SX28 SX48 SX52
 SDA pin RA.0 .. RA.2
RB.0 .. RB.6
RA.0 .. RA.2
RB.0 .. RB.6
RC.0 .. RC.6
RA.0 .. RA.2
RB.0 .. RB.6
RC.0 .. RC.6
RD.0 .. RD.6
RE.0 .. RE.6
RA.0 .. RA.6
RB.0 .. RB.6
RC.0 .. RC.6
RD.0 .. RD.6
RE.0 .. RE.6
 SCL pin  Next pin in same group as SDA assignment.
 Transmission rate  Approximately 50 kBits/sec.
 Special Notes  Both the SDA and SCL pins must have 4.7 kΩ pull-up resisters.

Explanation
The I2C protocol is a form of synchronous serial communication developed by Philips Semiconductor. It only requires two I/O pins and both pins can be shared between multiple I2C devices. The I2CSTART instruction generates an I2C Start condition on the I2C bus (SDA and SCL pins); this condition is used to start (or restart) a transmission sequence.

Note that the SCL pin is automatically assigned to the next higher pin in the same group as the SDA pin, so the SDA pin may not be assigned to RA.3 (RA.6 on the SX52), RB.7, RC.7, RD.7, or RE.7.

Special Note
The I2CSTART instruction monitors the state of the SCL line and will wait for SCL to be high before returning; this could cause some systems to hang if the SCL line is shorted to Vss. To prevent this hang, the programmer can make the SCL line an input then test its state before calling I2CSTART.


Related instructions: I2CSTOP, I2CSEND, and I2CRECV