hello again,
i am yet stuck again this time i,ve copied the following program from the book "programming and customizing SE" the programme meant to be for 08m, i dont fully understand it all but i put it through the wizard for an
28x2
when i run the syntax checker it comes back with an error on line 50
" fahreading = fahreading xor
^
Error: Syntax error in this line!"
its something to do with "xor" as i remove that statement the checker fine
but then flags up the next line " $FFFF + 1 " as an error
would someone please shed some light on what am doing wrong?
or is the program not compatiable with the 28X2
cheer rob
i am yet stuck again this time i,ve copied the following program from the book "programming and customizing SE" the programme meant to be for 08m, i dont fully understand it all but i put it through the wizard for an
28x2
when i run the syntax checker it comes back with an error on line 50
" fahreading = fahreading xor
^
Error: Syntax error in this line!"
its something to do with "xor" as i remove that statement the checker fine
but then flags up the next line " $FFFF + 1 " as an error
would someone please shed some light on what am doing wrong?
or is the program not compatiable with the 28X2
Code:
#picaxe 28x2
' Converted by X2 Conversion Wizard Version 2.0.5 (2010r4.1)
let dirsB = %11111111
let adcsetup = 0
symbol owport = c.1
symbol lcd = b.7
symbol tempreading = b0
symbol csign = b1
symbol fsign = b2
symbol fahreading = w3
symbol fahdecdigit = w4
pause 500
serout lcd,n2400,(254,1)
pause 30
do
readtemp owport,tempreading
gosub displayC
gosub displayF
loop
displayC:
if tempreading >127 then
csign = "-"
tempreading = tempreading & $7f
else
csign ="+"
endif
serout lcd,n2400,(254,$80)
serout lcd,n2400,(csign,"",#tempreading,"C")
return
displayF:
if tempreading >127 then
csign = "-"
tempreading = tempreading & $7f
else
csign ="+"
endif
fahreading = tempreading * 10
fahreading = fahreading * 9/5
if csign ="-" then
fahreading = fahreading xor
$FFFF + 1
endif
fahreading = fahreading + 320
if fahreading > 32767 then fsign = "-"
fahreading = fahreading xor
$ffff +1
else
fsign ="+"
endif
fahdecdigit=fahreading // 10
fahreading = fahreading / 10
serout lcd,n2400,(254,$C0)
serout lcd,n2400,(fsign,""#fahreading,".",#fahdecdigit,"F")
return
cheer rob