Usbio ACM sample program
usbio sample ACM program
The sample ACM program can already be quite useful. It creates an ACM device on the USB bus where you can communicate with the AVR on the board.
Under Linux if you connect your usbio board when it is loaded with this program, you will get a /dev/ttyACM0 device.
Under windows you will have to follow the directions of the LUFA documentation which include downloading and using the INF file located: https://code.google.com/p/lufa-lib/source/browse/trunk/Demos/Device/LowLevel/VirtualSerial/LUFA%20VirtualSerial.inf?r=1607
Once you have the driver sorted, you can use any terminal program you like to connect with the board. I use "kermit" to communicate with serial devices like this. There are several other programs available, but I'm used to kermit. Under windows there is a program called hyperterm.
Once you connect to the device, you will be prompted with a welcome string and a prompt. You can use several commands:
if you type s<outputnumber> the output with that number will go high. Outputnumber is in hex. For usbio the output numbers go from 0 to f. For example s5 will turn on output 5.
if you type c<outputnumber> the output with that number will be cleared. For example: ce will clear output 14 (which is e in hex).
If you type a<output> <value> the output will be put in software pwm mode. Currently values 0...80 are supported (128 levels).
If you type p <output> <length> the output with that number will be pulsed for <length> ms. The length is of course in hex.
If you type "z" the board will reset into firmware-upload-mode.
In the future we'll enhance the program to allow setting the mode of pins to inputs. And the program should be able to monitor the inputs value, and report the state changes as they happen. Also on-demand questioning of the inputs should become possible.