On 7/25/10 2:10 PM, Tony Duell wrote:
Incidentlaly, what do the USB-serial adapters do? I
assume they don't
respond to acesses to the I/O ports conentionally used for PC serial
ports.
No, they don't do that. They are manipulated by OS device drivers to
provide driver-level interfaces that appear as serial ports. These
drivers present the same driver-level API that the drivers for an
8250/16550 sitting on an ISA bus would. On UNIXish systems, they
usually appear as /dev/tty* and /dev/cu* like any other serial port, and
all the standard ioctl() calls are implemented. They actually work very
well; I use them daily and have never had problems with them.
Interestingly, some of the higher-end USB<->serial adapters, notably
the Keyspan units, are implemented with USB-enabled microcontrollers
which can be reprogrammed. If you do this, setting uncommon word widths
or baud rates shouldn't be a problem. People are squirting new code
into these Keyspan adapters using Linux and free mcs51 compilers like
SDCC (a very good C compiler for mcs51, Z80, some PICs, and more, I use
it a lot, and I host a chunk of its build farm). Here's a page
describing the basics of this:
http://www.hhhh.org/wiml/proj/keyspan.html
So as you can see, these devices don't really present many
restrictions to hard-core hardware hackers. It's just *different*,
that's all.
Since I've never done much with PCs, I'm not accustomed to dinking
around with I/O ports 0x378 and 0x278 directly (and honestly I'd never
want to, I don't use PCs here anyway), and that's just about the only
functionality that can't easily be implemented by these things.
-Dave
--
Dave McGuire
Port Charlotte, FL