1-wire again
Lars50
Posts: 23
Hi all
Dispite advice to move away from the DS2405 I just need to check and see if somebody could give some comment to the code below.
The purpose is to make sure that all switches goes high·after a restart.
In my mind this code is working but in my view I think I should be able to detect the status without toggle the switch.
Any code improvement suggestions.
SETLOW:······························································
OWOUT OWpin, OW_FERst, [noparse][[/noparse]MatchROM, STR Switch1\8]·' toggle to learn status
OWIN OWpin, OW_BitMode + OW_BERst, [noparse][[/noparse]status]·········· ' learn status
·IF (Status = off)·· THEN OWOUT OWpin, OW_FERst, [noparse][[/noparse]MatchROM, STR Switch1\8] 'toggle if nessesary
Thanks Lars
Dispite advice to move away from the DS2405 I just need to check and see if somebody could give some comment to the code below.
The purpose is to make sure that all switches goes high·after a restart.
In my mind this code is working but in my view I think I should be able to detect the status without toggle the switch.
Any code improvement suggestions.
SETLOW:······························································
OWOUT OWpin, OW_FERst, [noparse][[/noparse]MatchROM, STR Switch1\8]·' toggle to learn status
OWIN OWpin, OW_BitMode + OW_BERst, [noparse][[/noparse]status]·········· ' learn status
·IF (Status = off)·· THEN OWOUT OWpin, OW_FERst, [noparse][[/noparse]MatchROM, STR Switch1\8] 'toggle if nessesary
Thanks Lars