On Jul 18, 2010, at 1:08 PM, YES NOPE9 wrote: > It occurred to me that an API ( Application Programming Interface ) > could be constructed to look like a virtual serial asynch port. > Then one could communicate with the software module using ASCII > commands and getting back ASCII responses. > Many programming languages support access to asynch serial ports and > this might be an easy way to make the API available. > #1 Is this a viable idea or have I missed some pitfalls ? > #2 Has this already been done ? ( and worked ? ) ( has been a > disaster ? ) Yes, this has been done. It's quite common in the internet protocols, =20 for example. The "command channel" is vaguely "virtual terminal =20 like", and the commands sent and responses received are all mostly =20 human-readable: mail from: 250 OK rcpt to: 500 No such recipient rcpt to: 400 mailbox full of flames rcpt to: 250 OK rcpt to: 250 OK data 354 enter mail, end with "." is email, for example. FTP and HTTP work similarly. Also used by the Egg Bot Board http://www.schmalzhaus.com/EBB/, which =20 in turn is based on the USB Bit Whacker http://www.schmalzhaus.com/=20 UBW/ ; these instantiate a USB virtual comm port that accepts text =20 commands for setting bits, etc on output pins. Or to control stepper =20 motors and servos. No actual serial port ever exists (unlike, say, =20 Arduino, which actually implements a usb/serial converter and sends =20 bits serially over a wire, though this is somewhat hidden from the =20 user.) Apparently a fair number of "USB peripherals" go the arduino route; =20 they contain a USB/Serial converter and a micro that doesn't =20 understand USB at all (GPS peripherals a particular example.) BillW --=20 http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .