westaust55
Moderator
Based upon the Maxim Application notes including, AN187, AN27 and AN4600,
plus other info I am currently writing some PICAXE program code that will search a 1-wire network for connected devices.
This code seems to be working based upon my use of zero and a single DS18B20 at this moment.
There must be a pull up resistor on the PICAXE pin even with no devices present for correct operation.
Also added mathematical program code to verify the CRC filed based on Maths as opposed to the more usual 256 byte look-up table which Maxim include in the App Notes which appears to be working based on comparison with a spreadsheet that Maxim make available via AN4600 by looking at the spreadsheet macro.
Total program memory used so far is 575 bytes, and uses 20 byte variables (b1 as multiple 1-bit flags/values) for search and check but once done, all variables are then available for users ongoing program.
Of some concern however is that rmeldo posted the 8 bytes ROM S/No data for two DS18B20 devices he has about a year ago and that fails my CRC checks and the Maxim spreadsheet for that matter.
While I proceed with code development and fine tuning . . . .
it would be good to see who else has some one-wire devices,
particularly other than DS18B20's (I have a few more DS18B20's and about to try looking for multiple devices to prove that works properly)
and if they can post with a link to their device datasheet AND post the actual ROM serial Nos so that I can enter into my code for further CRC code checking purposes to see if my math based CRC routine is "robust".
plus other info I am currently writing some PICAXE program code that will search a 1-wire network for connected devices.
This code seems to be working based upon my use of zero and a single DS18B20 at this moment.
There must be a pull up resistor on the PICAXE pin even with no devices present for correct operation.
Also added mathematical program code to verify the CRC filed based on Maths as opposed to the more usual 256 byte look-up table which Maxim include in the App Notes which appears to be working based on comparison with a spreadsheet that Maxim make available via AN4600 by looking at the spreadsheet macro.
Total program memory used so far is 575 bytes, and uses 20 byte variables (b1 as multiple 1-bit flags/values) for search and check but once done, all variables are then available for users ongoing program.
Of some concern however is that rmeldo posted the 8 bytes ROM S/No data for two DS18B20 devices he has about a year ago and that fails my CRC checks and the Maxim spreadsheet for that matter.
While I proceed with code development and fine tuning . . . .
it would be good to see who else has some one-wire devices,
particularly other than DS18B20's (I have a few more DS18B20's and about to try looking for multiple devices to prove that works properly)
and if they can post with a link to their device datasheet AND post the actual ROM serial Nos so that I can enter into my code for further CRC code checking purposes to see if my math based CRC routine is "robust".
Attachments
-
44.4 KB Views: 476
-
43.6 KB Views: 292
Last edited: