Working on 1-Wire SearchROM Method
CJMJ
Posts: 226
in Propeller 2
I'm working on a 1-Wire SearchROM method in Spin2. I understand how the algorithm works. I am just working out the code. Before I expend any more energy on this task, does anyone know if a solution already exists in Spin2?
Comments
I am also working on that. I did it with the BASIC Stamp 2 nearly 20 years ago, but coding in Spin and BASIC is different, hence it's not a easy port. There are C examples available that would probably translate very easily -- I was trying it myself, first.
I was using your code to read my DS18B20s and saw you hadn't coded the SearchROM method yet. I thought I would give you a hand. You seem to have a lot on your plate these days. But I can move on to the next task on my list and look forward to your solution.
Do you sleep?
The only person I ever met that is as prolific as yourself was Dean Kamen and he didn't have a bedroom in his enormous house. It was rumored that it was the only room in the house that was off limits [besides the guest quarters] and was hidden behind a bookshelf in his library.
I try to get enough. Being a bachelor in the age of shutdowns means I spend most of my waking hours at my computer.
Thank you for the kind words. I enjoy this stuff, and want to keep sharp for when client work does come.
There is code written in Tachyon years ago by @MJB to handle this complicated searchROM algorithm. It was quite verbose and would list out the type of chip etc.
Any use?
If I can avoid multidrop 1w then I do, preferring to condition and stretch the I2C bus with cheap and precise sensors instead or RS485 if need be.
In case you don't have search working yet...
I'm posting the one that I'm using for P2. This is in .spin2 and it is a file used in addition to Jon's excellent jm_1-wire.spin2 access routines.
This supports:
Here's the demo output from my 5 x DS18B20's in my setup:
Enjoy!
EDIT: i replaced my file with a newer version which contains an updated 1-wire object from Jon. (his latest)