BusPirate / Bus_Pirate

Community driven firmware and hardware for Bus Pirate version 3 and 4
630 stars 132 forks source link

2WIRE clock is not correct. #112

Open USBEprom opened 6 years ago

USBEprom commented 6 years ago

By testing 2WIRE protocol with the new firmware U_1-28102018 I built (http://dangerousprototypes.com/forum/viewtopic.php?f=28&t=8498&start=105#p67796) I found the same issues as for I2C SOFTWARE protocol. By choosing ~5KHz, ~50KHz or ~100KHz, does not matter what of them, the 2WIRE clock is alway about ~700Hz, while by choosing ~400KHz it is about ~200kHz that is the half of the value set.

111

23

39

USBEprom commented 5 years ago

@ChristopherSamSoon

thank you very much sir for your invaluable code!

About this I must write that I am not 100% sure it totally works now because I tested 2-WIRE protocol in an unorthodox manner. Surely the things ar better with the new code and ~5kHz, ~50kHz, ~100kHz and ~400kHz are the same as for the I2C software protocol. I tested the 2-WIRE behaviour simply entering in the protocol and sending 1hex while connected to the same Arduino on which was running the I2C sketch provided by agatti and then acquiring the traffic with the logic analyzer setted for I2C decoding. Maybe that did the result, maybe did not, but I do not know other way to test the matter. However I would dare to say that even #111 has now gone, although I will furthermore dig the matter.

USBEprom commented 5 years ago

https://github.com/BusPirate/Bus_Pirate/issues/131?_pjax=%23js-repo-pjax-container#issuecomment-529147061