Hi,
No problem ... just poll the DS data line to see if conversion has ended.
Here, you won't have a Waitloop, but, say, goto your regulating loop ...Code:'***************************************************************************** ' Start temperature conversion '***************************************************************************** mainloop: OWOut DQ, 1, [$CC, $44 ] '***************************************************************************** ' Check for still busy converting ( ~ 4500 fois ... ) '***************************************************************************** waitloop: INPUT DQ If NOT DQ Then waitloop '***************************************************************************** ' Read the temperature '***************************************************************************** OWOut DQ, 1, [$CC, $BE ] OWIn DQ, 0, [temperature.LOWBYTE, temperature.HIGHBYTE, Skip 4, count_remain, count_per_c]
AND remember heating has "a little" ( LOL !!! ) inertia, and some AC periods more or less won't disturb the system ...
the temp data will be updated each ~ .75 s ... that's all !!!
using a MOC 3041 to drive your SCR could miraculously simplify your program ...
just an idea ...
Alain




Bookmarks