hello all
i am using an 08-m as a simple temp/fan controller, and i'm getting garbled outputs from the terminal.
i set up my own programmer(2 r's and a serial cable) which has worked fine in my other picaxe projects so far, i set up the r's on the board so it's a simple connection to the serial cable to program. this board was originally something else, and nothing to do with the programming end of it has changed since then.i have checked all my wiring carefully and the code simulates fine.
port 1 is a temp sensor ( ds18b20 )
port 2 is a temp sensor (ds18b20 )
port 4 goes to a uln2803
serial in/out and gnd pins are hardwired for that purpose( as i don't need them for anything else ).
this is the second iteration of the code, the last one had some ascii chars ("temp house =" kind of stuff) and didn't adjust b1 by 3 deg c.
the terminal shows random garbled strings of text, both text and symbols. it's outputting what seems to be a reasonable string length each cycle, about 42 chars, but is totally meaningless. also there is no intermediate data, only when sent from the picaxe(there is a 1 second pause between data chunks).the debug function used instead of the sertxd function will work only once, and then does not refresh.
i have the latest version of the programming editor, and am using vista on a modern machine through the serial port.
both cables to the temp sensors are less than 2m long( it says 70m wire lengths are supportable).
i've done a forum search and nothing seems to fit, i used to work in digital electronics and so my grounds vary from impressive to bulletproof(dodgy grounds cost us way to much grey hair in digital circuits).
can anyone offer any ideas? i'm all out.
richard
i am using an 08-m as a simple temp/fan controller, and i'm getting garbled outputs from the terminal.
i set up my own programmer(2 r's and a serial cable) which has worked fine in my other picaxe projects so far, i set up the r's on the board so it's a simple connection to the serial cable to program. this board was originally something else, and nothing to do with the programming end of it has changed since then.i have checked all my wiring carefully and the code simulates fine.
port 1 is a temp sensor ( ds18b20 )
port 2 is a temp sensor (ds18b20 )
port 4 goes to a uln2803
serial in/out and gnd pins are hardwired for that purpose( as i don't need them for anything else ).
Code:
rem temp stuff 1.0
start:
low 4 rem turn fan off
goto run
run:
wait 1 rem wait 1 secs
readtemp 1,b1 rem read ceiling temp
readtemp 2,b2 rem read house temp
rem debug
sertxd("ceiling temp = ",#b1)
sertxd("house temp = ",#b2)
sertxd("fan state = ",#b4)
let b1 = b1 + 3
rem nasty maths
if b1 > b2 and b2 < 21 then fanon rem check temps
goto fanoff
fanon:
high 4 rem turn fan on
goto run
fanoff:
low 4 rem turn fan off
goto run
the terminal shows random garbled strings of text, both text and symbols. it's outputting what seems to be a reasonable string length each cycle, about 42 chars, but is totally meaningless. also there is no intermediate data, only when sent from the picaxe(there is a 1 second pause between data chunks).the debug function used instead of the sertxd function will work only once, and then does not refresh.
i have the latest version of the programming editor, and am using vista on a modern machine through the serial port.
both cables to the temp sensors are less than 2m long( it says 70m wire lengths are supportable).
i've done a forum search and nothing seems to fit, i used to work in digital electronics and so my grounds vary from impressive to bulletproof(dodgy grounds cost us way to much grey hair in digital circuits).
can anyone offer any ideas? i'm all out.
richard