Communicating with the EZ I/O Board

The following description is intended to facilitate the writing of programs that communicate with the EZ I/O interface board. The board accepts ascii messages and returns ascii results.

If you write a code set for using the board in a language or program not yet represented among those listed, please contact us, as we might like to discuss adding your code to those available for downloading.

Happy programming!
 
initialize your serial port to: 57600 bps, 8 data bits, 1 stop bit, no parity bit
to get an analog to digital conversion: send out "A" (ascii 65) 
send out line number as ascii character, range= 0 through 7 
read back the result, which will be an ascii char from 0 to 255
to read a single input line send out "r" (ascii 114) 
send out line number as ascii character, range=0 through 9 
read back the result, which will be an ascii char, either zero or one
to read the first eight input lines as an 8-bit port send out "R" (ascii 82) 
read back the result, which will be an ascii char from 0 to 255 
to write a single output line send out "w" (ascii 119) 
send out line number as ascii character, range=0 through 9 
send out the state as an ascii char, either zero for off or one for on
to write the first eight output lines as an 8-bit port send out "W" (ascii 87) 
send out the state as an ascii char from 0 to 255 
to set the pulse-width-modulation duty cycle (PWM)  send out "P" (ascii 80) 
send out line number as ascii character, range=0 through 1 
send out the duty cycle as two chars/bytes, high byte first, then low byte, to make a 10-bit number (zero through 1023) 
For example: to set the duty cycle to 100% (full on), send out ascii 03 in the high byte, followed by ascii 255 in the low byte.