Hi was looking at the feasibility to communicate to a small pH stamp and send the value to an LCD. My biggest concern is the fact the baud is fixed at 38400 and not quite sure how to handle the response which has a value including decimal and a CR
Details from http://atlas-scientific.com/_files/pH_Circuit_3.0.pdf
The baud rate is: 38400, 8 bits, no parity, with one stop bit
The pH-Stamp will operate in continuous mode and deliver a pH reading
every 262 milliseconds (262 milliseconds with the LEDs off) until the “e” command is transmitted.
Full proper syntax: C<CR> There is no ASCII response to this instruction.
* (LED’s on the pH-Stamp off will respond every 462 milliseconds)
XX.XX<CR> (262 milliseconds)
XX.XX<CR> (524 milliseconds)
XX.XX<CR> (786 milliseconds)
XX.XX<CR> (n+ 264 Seconds)
I am not sure how to handle the decimal place or if I have the correct syntax. Any suggestions appreciated.
Rob
Details from http://atlas-scientific.com/_files/pH_Circuit_3.0.pdf
The baud rate is: 38400, 8 bits, no parity, with one stop bit
The pH-Stamp will operate in continuous mode and deliver a pH reading
every 262 milliseconds (262 milliseconds with the LEDs off) until the “e” command is transmitted.
Full proper syntax: C<CR> There is no ASCII response to this instruction.
* (LED’s on the pH-Stamp off will respond every 462 milliseconds)
XX.XX<CR> (262 milliseconds)
XX.XX<CR> (524 milliseconds)
XX.XX<CR> (786 milliseconds)
XX.XX<CR> (n+ 264 Seconds)
Code:
'PICAXE 18M2
'PIN 10 B.4 Transmit to Atlas pH
'PIN 11 B.5 Recieve from Atlas pH
'PIN 12 B.6 LCD Transmit
main:
setfreq m32;
serout B.4,T38400_32,("C<CR>") 'send character c to Atlas Stamp
pause 500;
ATLAS_READ:
setfreq m32;
pause 100;
serin B.5,T38400_32, b1; 'read return data into variable b1
setfreq m8;
serout B.6, T2400_8, ("pH Value is" #b1); 'write to LCD
pause 2000;
goto ATLAS_READ;
Rob