I am doing something wrong with the serout command. I want to use a device (Atlas Scientific EZO ORP) that communicates with 5v RS232 protocol. Its default baud rate is 9600. The device allows the user to change this rate to a number of other rates but first the change command has to be sent at 9600 baud.
I am using an 08M2 and I tried this snippet of code to start the process:
#picaxe 08m2
#no_data
symbol Txin = 3
symbol Rxout = 4
setfreq m16
serout Rxout,T9600,("baud",1200,cr) 'sends baud rate to EZO
serout Rxout,T1200,("baud,?",cr) 'requests what the baud rate is
serin[1000],Txin,T1200,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9
'expected answer ?Baud,1200
Debug
The F4 key comes up with an error message ‘unknown symbol – T9600
If I change T9600 to T4800 everything is good.
The manual states that the serout command can run at 9600 baud if the 08M2 is overclocked. What am I doing wrong?
I am using an 08M2 and I tried this snippet of code to start the process:
#picaxe 08m2
#no_data
symbol Txin = 3
symbol Rxout = 4
setfreq m16
serout Rxout,T9600,("baud",1200,cr) 'sends baud rate to EZO
serout Rxout,T1200,("baud,?",cr) 'requests what the baud rate is
serin[1000],Txin,T1200,b0,b1,b2,b3,b4,b5,b6,b7,b8,b9
'expected answer ?Baud,1200
Debug
The F4 key comes up with an error message ‘unknown symbol – T9600
If I change T9600 to T4800 everything is good.
The manual states that the serout command can run at 9600 baud if the 08M2 is overclocked. What am I doing wrong?