Gordon JC Pearce MM3YEQ wrote:
I know a lot of people in here don't seem to like
USB, but it reduces
all the device-to-host interfacing to a Small Matter Of Programming.
None of this tedious mucking about with IO ports, and interrupts, and
getting the timing absolutely bang on - you just read packets off the
interface ;-)
I have a small uC device that I made that uses an FTDI USB->TTL
converter. I wish USB was as straight-forward as you describe. I'm
currently running into problems when transferring, very quickly, some
data from the uC to the PC. The problems are related to overrunning the
PC, where the PC isn't scheduling reads from the device fast enough to
prevent drops. At least interrupt-based I/O can "demand" attention from
the cpu at any time, where USB is at the mercy of being scheduled.
I'm now implementing an xmodem-like ACK/NAK block based protocol on top
of USB, in addition to setting USB read-size to the precise size of a
block to obtain more efficient usage.
Gordon
Keith