Skip to content

i2c_stop seems not to meet 'i2c stop' condition. #13

@focalray

Description

@focalray

Hi, tod!
I'm Kenny Kim from South Korea.

I found a case that SDA is still high before call of the i2c_stop().
In that case, the i2c stop condition does not meet, and any further commands after endTransmission() don't work. To meet the STOP condition: SDA should be low before doing stop.

Need to insert i2c_sda_lo() into the i2c_stop() function like this:

268 // Send a STOP Condition
269 //
270 void SoftI2CMaster::i2c_stop(void)
271 {
272 // To meet the STOP condition: SDA should be low before doing stop.
273 i2c_sda_lo(); // makes sda low surely.
274 i2c_scl_hi();
275 _delay_us(i2cbitdelay);
276

277 i2c_sda_hi();
278 _delay_us(i2cbitdelay);
279 }

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions