Datasheet
Jon Waddington
86
rc.flush
rcflag := rc.gettoggle
repeat until (rc.gettoggle <> rcflag) & ((rc.getcommand =>0) & (rc.getcommand =<9)) | (rc.getcommand ==
enter)
if ((rc.getcommand =>0) & (rc.getcommand =<9))
code := rc.getcommand
if i == 0
j := code
else
j := ((j*10) + code) <# 100
text.dec(code)
if rc.getcommand == enter
i := 2
text.str(string(" "))
text.dec(((j*22)/100))
x10.dim(addr[dp],((j*22)/100))
waitcnt(cnt + 50_000_000)
PRI Temperature | m, i
{{Method shows Temperature menu}}
text.out($00)
showdate(0, 0)
showtime(35, 0)
XB.start(6,7,0,9600) ' XBee Comms - RX,TX, Mode, Baud
text.str(string(13," Temperature",13,13," Inside",13,13," Outside",13,13," > Return to main menu"))
rc.flush
repeat until (rc.getcommand == enter)
text.str(string($0A,14,$0B,4))
tin
text.str(string($0A,14,$0B,6))
repeat i from 0 to 39
waitcnt(cnt + 4_000_000)
if rc.getcommand
i := 39
if m <> getminute
showtime(35, 0)
showdate(0, 0)
m := getminute
XB.stop
PRI tin | status, temp, crc
ow.init(3) 'pin 3 input
'waitcnt(clkfreq / 10 + cnt)
status := ow.reset ' check for device
if (status == %10) ' good 1W reset
crc := ow.crc8(@snum, 7) ' calculate CRC
if (crc <> snum[7]) ' compare with CRC in SN
text.str(string(" "))
text.hex(crc, 2)
text.str(string(" - bad CRC"))
repeat
else










