orgua / OneWireHub

OneWire slave device emulator
GNU General Public License v3.0
343 stars 86 forks source link

DS2502 write command CRC seems incorrect #137

Open polarbub opened 3 weeks ago

polarbub commented 3 weeks ago

When trying to write to the emulated DS2502 the CRC comes back as incorrect. I get the correct CRC from a real DS2502, but I am unable to write to it as I don't have a progpulse circuit. With same circuit I am also able to read the data from the emulator just fine, so I know it isn't an issue with my setup or code.

I am using two Arduino Unos. One as the emulator and one to read. This is the code for the emulator. It is just the example code for DS2502, but with the data and id changed. This is the code for the writer. All the code is compiled in Arduino IDE 1.8.9 on Arch Linux.

I used the logic analyzer in SimulIDE to get a trace between the two Arduinos emulated-simulide.zip. This issue does happen with real hardware as well. I also have a real logic analyzer and I can get a real trace if it would be helpful.

Here is how the devices are connected. real hub