??? 09/15/06 22:36 Read: times |
#124381 - COMx: vs USB Responding to: ???'s previous message |
Andy Neil said:
This is why the like of FTDI et al can make a living from selling chips that do it all for you, "invisibly" - and your PC application really can't tell that it's not talking to a real RS232 COM Port! :-) Phooey. As Grant says, USB hurts the first time. Serial hurts every time. Once you realize that you can use the HID class to move formatted packets of data over the bus, in either direction, without having to go through a possibly painful parsing process (which might include converting to ASCII strings and back again), you'll wonder why you put up with old-skool serial interfaces. For example, I did an audio project where the HID interface did a whole bunch of things. There was a report that controlled one channel's input gain, another report controlled the other channel's input gain, a third report controlled output volume, a fourth control some other interesting hardware features, and a fifth was used for firmware upgrade (because DFU is a right royal PITA). The neat thing is that the firmware doesn't have to wait for data and look for headers and continue reading until everything's there and then decide what to do. Instead, when the whole packet's been received, there's an interrupt and all I do is look at the Report ID to figure out what to do with the data. -a |