On Jul 9, 2005, at 12:53 AM, Rob Hamerling wrote: >>> I thought that treating the serial port "normally" would >>> be pretty easy; just open com1: as a file and do your reads and >>> writes. It's when you need to do NON-standard things like bit-bang >>> the modem control lines that things become difficult. >> How do you set the baudrate, or do you consider that a non-standard >> operation? >> Typically it's an ioctl operation, isn't it? yeah, that gets complicated. For the first effort, I'd require that the user set them correctly. For a second effort, I'd be tempted to do something like exec("mode com1:9600,n,8,1 > nul:"); that still works, doesn't it? It did back in the DOS days, and it looks like XP still has "mode" as a command line utility... BillW -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist