Re: a USB for the Apple II smoke test



In article <dcdr52$2gu$1@xxxxxxxxxxxxxx>,
Michael Black <et472@xxxxxxxxxxxxxxxxxxx> wrote:

> The Wizard of Oz (wizard@xxxxxxxxxxxxxxx) writes:
>
>>> Actually, USB has about as much in common with RS-232 as a
>>> giraffe has with a grapefruit.
>>
>> Bad analogy. A better one would be like what a bison has to do with a
>> cow. The hardware protocols can't be a lot different. After all there is a
>> direct path from RS-232 to USB. I bought a couple of RS-232 to RS-232-C
>> (25 pin to 9 pin) adaptors. Friends have bought RS-232-C to USB adaptors.
>> None of these adaptors required circuitry. It was all a matter of wiring.
>
> But what were they used with? The "adaptors" that come with mice are
> merely a rewiring of the connectors. But the scheme counts on circuitry
> within the mouse. In other words, the mice have dual circuitry, and
> the presence of a signal on one of the pins tells it to switch to
> the other protocol.
>
> A quick search doesn't turn up the voltage levels for USB, but I
> suspect it is different from RS-232. One level of incompatibility.
>
> USB is differential (ie two lines carrying the same information, but
> one line is the mirror image of the other), RS-232 isn't. A second
> level of incompatibility.

RS-422 is balanced (what you call "differential") and is in other
respects very similar to RS-232. Naturally, RS-422 have about
twice as many connectors as RS-232.

> USB is a very fast data rate. I don't think many if any RS-232
> serial interfaces run that fast. A third level of incompatibility.

Actually, a lot of standard serial ports are incompatible too then,
since the RS-232 specification specifies the bit rate as max 9600
bps. Very few serial ports today are limited to 9600 bps, as
specified by RS-232. RS-422 allows higher bit rates, but when
RS-232 was specified, the opinion was that higher bit rates than
9600 bps on RS-232 woud cause unreliable data transfer.

RS-232 also specifies a 25-pin connector -- most serial ports today
use the nonstandard 9-pin connector as introduced by IBM AT back in
the 1980's.

Finally, RS-232 isn't just the send + receive + ground wires. There
are a bunch of other wires too, intended to control a modem - DSR,
DTR, RTS, CTS, CD, RI and others (including secondary connections for
all these plus send and receive - you do indeed need a 25-pin
connector to implement all of that). All of these extra connectors
are absent from USB. This efficiently excludes constructing a
USB-to-RS232 converted with wiring only, without circuits: circuits
are needed for those extra signals.

Btw some RS-232 devices which do use these extra modem signals do not
work with an USB-to-RS232 converted but needs a real serial port.
Which of course means those converters do not properly convert USB to
RS232.

> USB is addressed, allowing for multiple devices on the bus. If the
> code doesn't deal with that, it can't access the devices. I can't
> see a device saying anything until it gets some data to tell it
> to work, and that's not going to happen with just any serial port.
> A fourth level of incompaitiblity.
>
> USB is bidirectional, RS-232 is unidirectional. The former uses
> the same lines for transmit and receive, the latter uses two separate
> lines, one for transmit one for receive. You have to combine the
> two somehow, and then you have to toss in circuitry to check whether
> it's possible to send or if you have to wait till someone else has
> sent what it's sending. That to me suggests something like packets
> of data, again more complicated than is built into the average serial
> port. Likely another level of incompatibility.
>
> USB is a serial interface, but is it the same protocol as used
> in traditional serial interfaces? Ie it's 8bits of data, with
> stop and start bits, and asynchronous.

Asynchronous RS-232 isn't limited to just a start bit, 8 data bits,
and a stop bit. A start bit is indeed required, but the number of
data bits can really be any number of data bits, followed by an
optional parity bit, and finised with one or two stop bits.

RS-232 doesn't need to be asynchronous either. Synchronous RS-232
runs fine on synchronous modems. In synchronous mode, bits are
transferred continouosuly, there's never any pause. If no actual
data is transferred, the data gap will be filled by transmitting the
character NUL (which btw is hex 00 in both ASCII and EBCDIC) as many
times as needed.

Since USB uses the same wire both for transmit and receive,
synchronous protocols cannot be used on USB -- attempting to do so
would lock up the data transfer wire.

> I don't know what USB uses, but there's no reason to assume it uses
> the same protocol. Likely another level of incompatibility.

The USB protocol is probably more similar to the Ethernet protocol,
which btw also is a serial protocol. Ethernet on coax cable uses
one wire for data transfer in both directions, while the more moderm
Ethernet cables use separate (balanced) wires for each data transfer
direction (+ duplicates of these wires, these duplicates are usually
not used).

> In the original post, the poster was talking about plugging a header
> into a similar connector on the Apple. The chances of anything lining
> up, even if none of the above applied, are pretty unlikely. Even on
> IBM type motherboards, there is not a complete standard for such things,
> and here the poster is connecting two very different types of connectors.
> You're far more likely to connect a data pin to ground than have
> any success.
>
> Michael

--
----------------------------------------------------------------
Paul Schlyter, Grev Turegatan 40, SE-114 38 Stockholm, SWEDEN
e-mail: pausch at stockholm dot bostream dot se
WWW: http://stjarnhimlen.se/
.



Relevant Pages

  • Re: a USB for the Apple II smoke test
    ... A quick search doesn't turn up the voltage levels for USB, ... One level of incompatibility. ... serial interfaces run that fast. ... and here the poster is connecting two very different types of connectors. ...
    (comp.sys.apple2)
  • Re: USBIP protocol
    ... you mean when we rev the protocol to version 2 ... Set Configuration and Set Interface are requests on the command pipe ... according to the usb 2.0 spec (these would be a control message ... request on the command pipe. ...
    (Linux-Kernel)
  • Re: A7N8X V2 Deluxe MB and Atec P160 Case Front Panel Connection
    ... Thanks Paul I will have a look at the card you mentioned. ... >> The Antec case comes with one connector for each USB ... >> to the two USB 2 connectors but nothing for the firewire. ...
    (alt.comp.periphs.mainboard.asus)
  • Re: VIA KT400 + Kernel 2.6.12 + IO-APIC + uhci_hcd = IRQ trouble
    ... My Gigabyte GA7-VAXP motherboard has 6 USB connectors. ... 00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 ...
    (Linux-Kernel)
  • Re: Electronics Shopping
    ... In Asia I can find cables, connectors, ... >>repositioning of production lines into those countries where the authority ... The underlying reasons why USB connectors are ...
    (rec.travel.asia)