Abstract:
A method and apparatus for controlling the timing of a state transition of a serial data line (SDA) in an I2C controller are provided. The apparatus includes a processor, a serial clock line (SCL) edge detector, a counter, and an SDA generator. The processor controls an I2C controller. The SCL edge detector detects an edge of a clock signal of an SCL. The counter counts a hold time of the state transition of the SDA if a falling edge of the clock signal of the SCL is detected by the SCL edge detector. The SDA generator transits the state of the SDA if the count of the hold time is finished. Therefore, a malfunction in an I2C communication can be prevented without using a compensation circuit requiring a lot of time and cost.