One wire search algorithm

This conference allows discussion on any subject not already covered in another PICmicro conference. If a topic becomes popular enough, a new conference will be created for it.

One wire search algorithm

Postby _pike » Wed Nov 25, 2020 10:22 am

Hello to all !!!
I have been trying for a week to implement a search rom command... As you might imagine i am a little bit frustrated since i haven't managed yet to make it work completely ... I have understood most of it, with an exception of when the
bit_counter < last_discrepancy ....Take the same path as last time (from last ROM number found) . How does this part works? I am asking because i tried it on a paper, and when there is 3 dicrepancies in a row i cant understand how this will work...
Any explanation would be grateful!!!

Thank you all Panagiotis

An example:

0001 0111 0000 this should be the first discovery on the search
0101 0100 1001 this should be the forth
1001 0011 0110 this should be the third
1111 0101 1010 this should be the second

ps. After the second search my code doesnt work as expected, and thats because i havent understood this part..
_pike
 
Posts: 1
Joined: Wed Aug 14, 2019 9:27 pm
PIC experience: Experienced Hobbyist

Return to Other PICmicro topics

Who is online

Users browsing this forum: Majestic-12 [Bot] and 1 guest