"I2C signal lines are pulled high
"  I2C devices source no current, but they do sink it.
"  Therefore outputs defined thus:
"                                   HIGH = .x.
"                                   LOW  =  0 

PROCEDURE start_bit

STATE_MACHINE start_bit CLOCKED_BY SCLx4;

   STATE CheckBus
      scl = .x.;      "1;
      scl = .x.;      "1;
      IF (scl = 1) THEN          "wait for bus to be free
         GOTO start1
      END IF;

   STATE start1
      sda =  0 ;
      scl = .x.;      "1;
      GOTO start2;   
   
   STATE start2
      sda =  0 ;
      scl =  0 ;
      GOTO start3;   
   
   STATE start3
      sda =  0 ;
      scl =  0 ;
      GOTO data1;   

END start_bit;