Sivu,
Since I can't post to the earlier thread (http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1242137666),
I've taken the liberty of creating a second follow-on thread.
Thank you for creating the DS2482 library and to Don T for his efforts to debug the wireSearch function. However, Don's mod didn't get it completely fixed. I have a 1-wire network that includes devices with Family Codes 0xFF, 0x12, and 0x10. Search finds only the 0x12 and 0x10 devices. If I remove those devices, then search finds the 0xFF device.
After much head-scratching, I have determined that the following modifications will make search work properly. (See Maxim Application Note 187.)
In DS2482.h:
106c106 (Reverse Don's mod)
< int8_t searchLastDisrepancy;
uint8_t searchLastDisrepancy;
In DS2482.ccp:
233,234c233 (Reverse remainder of Don's mod)
< // Initialize to negative value
< searchLastDisrepancy = -1;
searchLastDisrepancy = 0;
255c254
< for(i=0;i<64;i++)
for(i=1;i<65;i++)
257,258c256,257
< int romByte = i/8;
< int romBit = 1<<(i&7);
int romByte = (i-1)>>3;
int romBit = 1<<((i-1)&7);
Don's mod didn't succeed since the loop index "i" is used by searchLastDisrepancy AND last_zero.
Perhaps you'd like to add these modifications to your source at (paeae/Libraries/ds2482 at master · paeaetech/paeae · GitHub).
Could you also take that opportunity to add the modification from Mike Jackson at (Arduino Forum) and correct the spelling of "discrepancy".
Thanks!
73,
Garitron