Closed vytautassurvila closed 7 years ago
Nice work and thanks for documenting it so well!
i tested your code with the ds9490 and found that the internal states of the outputs have the wrong start-configuration. getPinState() reads the 0x41 from the initialization of DS2408_PIO_LOGIC_REG but my masters says the ports are written like set in DS2408_PIO_OUTPUT_REG (all ON). Toggling them overwrites DS2408_PIO_LOGIC_REG completely. Maybe we should switch get/set to use DS2408_PIO_OUTPUT_REG?
Nice catch. I had some pins of original DS2408 pulled up and it was producing start configuration based on those. So I copied the register value to code but it totally slipped my mind that I should get initial values with all pins left floating. Thanks for the library and keep up the good work!
once i had the datasheet open i extended the ds2408 a bit and made it work with my maxim-master. if you have time you could test the changes.
I tested your changes with another Arduino and BeagleBoneBlack - it works great. Thanks once again
Quite naive implementation for DS2408. This PR:
The code was tested with following w1 masters:
All tests were run with original DS2408 hooked on same 1wire bus. It was used to compare commands and responses