raspberrypi / pico-examples

BSD 3-Clause "New" or "Revised" License
2.87k stars 826 forks source link

Question about pio i2c scl works #257

Open mbiusII opened 2 years ago

mbiusII commented 2 years ago

https://github.com/raspberrypi/pico-examples/blob/a7ad17156bf60842ee55c8f86cd39e9cd7427c1d/pio/i2c/i2c.pio#L44

Dear developer: I have a question about pio i2c in https://github.com/raspberrypi/pico-examples/blob/master/pio/i2c/i2c.pio (from line 44 to line 74). In this code section, I refuse about when SDA outputs, how the SCL works. For instance, I think that from line 51 to line 61 is how the SCL work when SDA read data by 'side-set' and 'delay'. Therefore, could you tell me more about how SCL works when SDA output.

Best regards

MC

lurch commented 2 years ago

See https://datasheets.raspberrypi.com/rp2040/rp2040-datasheet.pdf and https://datasheets.raspberrypi.com/pico/raspberry-pi-pico-c-sdk.pdf for more information about PIO.

And it sounds like this question might be better suited for the forums ? :shrug: