[comp.sys.apple] Homebrew SCSI pitfalls

jsnow@esunix.UUCP (John Snow) (08/10/89)

Here is a word of warning to those of you building homebrew SCSI drives for the Apple II family.  APPLE VIOLATES THE SCSI SPECIFICATIONS for terminating the    SCSI bus!  The SCSI spec requires that the SCSI bus be terminated by 220/330
resistors at BOTH ends of the bus.  The Apple II SCSI interface card does
NOT terminate the cable.  Apple normally gets away with this violation by
supplying a very short SCSI cable to connect the SCSI interface card to the
first disk drive where the SCSI cable IS terminated.  This is poor design
practice but normally works.

I purchased a SCSI cable from Tulin along with a Tulin A-hive case and power
supply.  The SCSI cable Tulin sent me was 6 feet long -- much too long to
work when there is no termination at one end.  Sure enough, I spent a week
trying to figure out whether my drive or my interface card was bad because
things just weren't working.  After a really frustrating week of trying
different computers, drives, and interface cards and hooking a SCSI bus
analyzer up to my system, I decided that the long cable and lack of
termination was the problem.  I hacked the 6 foot cable down to 18 inches
and wired on a new connector and what do you know, it works!

What would it have cost Apple to terminate things properly, less than a buck
to put in the resistor packs and sockets to allow them to be removed if the
CPU was not at the end of the cable!


-- 
-----------------------------------------------------------------------------
John F. Snow                         UUCP: {ihnp4,decvax}!decwrl!esunix!jsnow 
Evans & Sutherland Computer Corp.      or:         uunet!utah-cs!esunix!jsnow
Salt Lake City, Utah                 AppleLink PE: JohnSnow    GEnie: J.SNOW2

prl3546@tahoma.UUCP (Philip R. Lindberg) (08/14/89)

From article <1431@esunix.UUCP>, by jsnow@esunix.UUCP (John Snow):
> Here is a word of warning to those of you building homebrew SCSI drives
> for the Apple II family.  APPLE VIOLATES THE SCSI SPECIFICATIONS for
> terminating the SCSI bus!  The SCSI spec requires that the SCSI bus be
> terminated by 220/330 resistors at BOTH ends of the bus.  The Apple II
> SCSI interface card does NOT terminate the cable.  Apple normally gets
> away with this violation by supplying a very short SCSI cable to connect
> the SCSI interface card to the first disk drive where the SCSI cable IS
> terminated.  This is poor design practice but normally works.
> 
> I purchased a SCSI cable from Tulin along with a Tulin A-hive case and power
> supply.  The SCSI cable Tulin sent me was 6 feet long -- much too long to

This is very interesting.  I have a "homebrew" SCSI drive with a Tulin
A-hive case and a 6 foot SCSI cable (I bought from Tulin with the case).  I
have experienced no problems with my drive.  It has been running for about
2 months now, with power up and down two or three times a week.

> termination was the problem.  I hacked the 6 foot cable down to 18 inches
> and wired on a new connector and what do you know, it works!
> 

Have you considered that maybe you had a bad cable, since when you replaced
it it worked okay?

> What would it have cost Apple to terminate things properly, less than a buck
> to put in the resistor packs and sockets to allow them to be removed if the
> CPU was not at the end of the cable!
> 

This is not to say that you aren't correct on your assumption that Apple
didn't terminate things correctly.  It's just that I have not experienced
any problems with the same original setup.

Phil

> John F. Snow


+---------------------------------------------------------+
|	     The Apple //'s will live forever!!		  |
|  Phil Lindberg	    snail mail: 13845 S.E. 131 ST |
| INET: prl3546@tahoma.UUCP		Renton, WA 98056  |
| UUCP: ..!uw-beaver!ssc-vax!shuksan!tahoma!prl3546	  |
|    Disclaimer: I don't speak for my employer (and I not |
|		 sure they even know I exist....)	  |
+---------------------------------------------------------+

mattd@Apple.COM (Matt Deatherage) (08/19/89)

In article <1431@esunix.UUCP> jsnow@esunix.UUCP (John Snow) writes:

>Here is a word of warning to those of you building homebrew SCSI drives
>for the Apple II family.  APPLE VIOLATES THE SCSI SPECIFICATIONS for
>terminating the    SCSI bus!  The SCSI spec requires that the SCSI bus
>be terminated by 220/330
>resistors at BOTH ends of the bus.  The Apple II SCSI interface card does
>NOT terminate the cable.  Apple normally gets away with this violation by
>supplying a very short SCSI cable to connect the SCSI interface card to the
>first disk drive where the SCSI cable IS terminated.  This is poor design
>practice but normally works.
>
Nope.  Not quite.  Persuasive, but wrong.  Let's quote, shall we:

ANSI X3.131-1986, ("SCSI 1"), p.22, section 4.4:

"Terminator power (optional):  Single-ended SCSI devices providing terminator
power shall have the following characteristics:"

Ibid, p.23, section 4.4.3:

"This standard contains various alternatives that are mutually exclusive within
a system:

1)  Single-ended or differential drivers
2)  Termination power supplied by the cable or not
...
"
April 24, 1989 from Sun Microsystems, # X3T9.2/89-48 Rev. 0 p2,sect.3

"It is recommended that terminator power be supplied at a minimum of 4.5 volts
and that it be supplied by more than one device on the cable preferrably by a 
device on each end of the cable."

p4-21, SCSI 2 Working Draft, rev. 9:

"Any SCSI device may supply terminator power.  Interference error rates are
lower if the termination voltage is maintained at the extreme ends of the
cable."

What these things mean is this.

Terminator power is *recommended* to be added to the SCSI-2 *draft* as being
*recommended* to be placed on both ends of the cable.  The standard requires
only one terminator.

Any device may or may not supply terminator power.  At the host end of the
SCSI system (the Apple II SCSI Card in this case), it is completely optional.
Since terminator power requires 4 to 5 volts at 800 mA, which is significantly
more than a card should be drawing from the Apple II power supply, Apple chose
to terminate in the first device of the chain instead.  This is fully within
the existing and draft specifications.

Interference is lower if the terminators are at the extreme ends of the cable.
This means that if you have a long cable between the host and the terminator,
like this:

>I purchased a SCSI cable from Tulin along with a Tulin A-hive case and power
>supply.  The SCSI cable Tulin sent me was 6 feet long -- much too long to
>work when there is no termination at one end.  Sure enough, I spent a week
>trying to figure out whether my drive or my interface card was bad because
>things just weren't working.  After a really frustrating week of trying
>different computers, drives, and interface cards and hooking a SCSI bus
>analyzer up to my system, I decided that the long cable and lack of
>termination was the problem.  I hacked the 6 foot cable down to 18 inches
>and wired on a new connector and what do you know, it works!
>
that you're going to have lots of interference - enough in your case to make it
not work.

>What would it have cost Apple to terminate things properly, less than a buck
>to put in the resistor packs and sockets to allow them to be removed if the
>CPU was not at the end of the cable!
>
What it would cost to provide terminator power on the host card is a *big*
drain on the power supply, which is easily avoided by using termination on the
first device.  The devices plug into the wall and can use as much terminator
power as they need; the card draws from the IIe power supply and has to
share itself with the rest of the system (including your modems, memory cards,
accelerators, video overlay cards, and other things).  The short cable between
the card and the first device does help reduce interference, as you found out.
But Apple is *not* violating the SCSI spec and is trying to keep those folks
out there who load down their systems from blowing up the power supply. :)

I'd like to know where you got all this information about how evil Apple's been
as far as SCSI concerns, because the ANSI SCSI spec. and the draft spec.
certainly indicate quite a different story.
>
>-- 
>-----------------------------------------------------------------------------
>John F. Snow                         UUCP: {ihnp4,decvax}!decwrl!esunix!jsnow 
>Evans & Sutherland Computer Corp.      or:         uunet!utah-cs!esunix!jsnow
>Salt Lake City, Utah                 AppleLink PE: JohnSnow    GEnie: J.SNOW2

-----------------------------------------------------------------------------
Matt Deatherage, Apple Computer, Inc. | "The opinions expressed in this tome
Send PERSONAL mail ONLY (please) to:  | should not be construed to imply that
AppleLink PE: Matt DTS  GEnie: AIIDTS | Apple Computer, Inc., or any of its
CompuServe: 76703,3030                | subsidiaries, in whole or in part,
Usenet:  mattd@apple.com              | have any opinion on any subject."
UUCP:  (other stuff)!ames!apple!mattd | "So there."
-----------------------------------------------------------------------------

jsnow@esunix.UUCP (John Snow) (08/22/89)

From article <34115@apple.Apple.COM>, by mattd@Apple.COM (Matt Deatherage):

>>Here is a word of warning to those of you building homebrew SCSI drives
>>for the Apple II family.  APPLE VIOLATES THE SCSI SPECIFICATIONS for
>>terminating the    SCSI bus!  The SCSI spec requires that the SCSI bus
>>be terminated by 220/330
>>resistors at BOTH ends of the bus.  The Apple II SCSI interface card does
>>NOT terminate the cable.  Apple normally gets away with this violation by
>>supplying a very short SCSI cable to connect the SCSI interface card to the
>>first disk drive where the SCSI cable IS terminated.  This is poor design
>>practice but normally works.
>>

>Nope.  Not quite.  Persuasive, but wrong.  Let's quote, shall we:

  (Oh yes! Please do.)

>
>ANSI X3.131-1986, ("SCSI 1"), p.22, section 4.4:
>
>"Terminator power (optional):  Single-ended SCSI devices providing terminator
>power shall have the following characteristics:"
>
>Ibid, p.23, section 4.4.3:
>
>"This standard contains various alternatives that are mutually exclusive within
>a system:
>
>1)  Single-ended or differential drivers
>2)  Termination power supplied by the cable or not
>...
>"
.
.
.
>
>p4-21, SCSI 2 Working Draft, rev. 9:
>
>"Any SCSI device may supply terminator power.  Interference error rates are
>lower if the termination voltage is maintained at the extreme ends of the
>cable."
>
>What these things mean is this.
>
>Terminator power is *recommended* to be added to the SCSI-2 *draft* as being
>*recommended* to be placed on both ends of the cable.  The standard requires
>only one terminator.
>

Sorry Matt, but your out of your area of expertise on this one.  I design SCSI
interfaces for a living and you have misinterpretted the SCSI specification.
Supplying termination power and terminating the cable are not the same thing.
Supply termination power means providing a +5V supply to a pin on the SCSI cable
to provide power to the termination resistors.  Terminating the SCSI cable
means: 

    "All assigned signals are terminated with 220 ohm to +5V and 330 ohm to
ground at each end of the cable."
       ^^^^^^^^^^^^^^^^^^^^^^^^

          -- Interface Specification for the MPI Large Disk Division
             Small Computer System Interface (SCSI)  (Control Data Corp.)
             Section 4.4.1 pg 20

That's right, each end of the cable, no IFs, ANDs or BUTs.

The above cited document is essentially a copy of the ANSI X3.131-1986 SCSI spec
with CDC's command set info added.  It just happens to be to copy of the SCSI
spec I keep on my desk.

The reason that it is recommended that termination POWER also be provided at
each end of the cable is that extra impedance and noise would be added if the
the termination power had to travel down the cable to reach the termination
resistors, thus making the termination less effective.

>Any device may or may not supply terminator power.  At the host end of the
>SCSI system (the Apple II SCSI Card in this case), it is completely optional.
>Since terminator power requires 4 to 5 volts at 800 mA, which is significantly
>more than a card should be drawing from the Apple II power supply, Apple chose
>to terminate in the first device of the chain instead.  This is fully within
>the existing and draft specifications.
>
>Interference is lower if the terminators are at the extreme ends of the cable.

Again you are confusing termination power and termination.  Your  statements
are correct but you must remember that you are talking about the termination
POWER.  It is definetly NOT optional as to whether the cable be terminated at
each end.  See my spec quote above.

>>What would it have cost Apple to terminate things properly, less than a buck
>>to put in the resistor packs and sockets to allow them to be removed if the
>>CPU was not at the end of the cable!
>>

>What it would cost to provide terminator power on the host card is a *big*
>drain on the power supply, which is easily avoided by using termination on the
>first device.  The devices plug into the wall and can use as much terminator
>power as they need; the card draws from the IIe power supply and has to
>share itself with the rest of the system (including your modems, memory cards,
>accelerators, video overlay cards, and other things).  The short cable between
>the card and the first device does help reduce interference, as you found out.
>But Apple is *not* violating the SCSI spec and is trying to keep those folks
>out there who load down their systems from blowing up the power supply. :)

Yes Apple IS violating the spec, but I will agree that it is probably for a good
cause.  Now that you mention it, the termination packs do use a lot of power and
would be a drain on the power supply.  BUT, this still doesn't mean that Apple
isn't violating the SCSI spec.  What they have done is cheated to avoid power
consumption inside the CPU box.  By keeping the cable between the CPU and the
first device short they get away with -- but its still cheating.

>I'd like to know where you got all this information about how evil Apple's been
>as far as SCSI concerns, because the ANSI SCSI spec. and the draft spec.
>certainly indicate quite a different story.

I'm a EE and I design cards that incorporate SCSI interfaces for a living.  All
SCSI boards we build and buy ALWAYS provide for SCSI termination if that board
is at the end of the cable.  The ANSI SCSI specs plainly state that the SCSI
cable must be terminated at both ends of the cable -- and so does good
engineering application of transmission line theory.

No, Apple's cheating on the SCSI spec isn't "evil", but their lack of
documentation that they cheated IS.  Nowhere in the Apple II SCSI Card User's
Manual nor the APDA Tech reference do they mention one word about termination -
or lack of it - nor restrictions on the length of the cable from the card to the
first device.  Not one measly word.  They do refer you to the Apple SCSI Cable
user's guide, but you don't get that unless you buy Apple's SCSI cable.  If,
like me, you buy a SCSI cable elsewhere, and its too long, it plain won't work.

Apple has the arrogance to assume that the only things that will be attached to
the Apple II SCSI interface card are Apple products attached by Apple cables and
they provide absolutely no documentation about their clear violation of the SCSI
spec for those of us who don't want to pay Apple's high prices for their
peripheral equipment and/or just plain enjoy hacking together our own homebrew
system.   If you are going to provide an ANSI standard interface, you have to
assume that people are going to try and attach ANSI standard equipment to it in
ways allowed by the ANSI spec.  The SCSI spec says that the SCSI cable may be
up to 6 meters in length.  However, attaching a cable longer than a few feet
between the Apple II SCSI interface card and the first device will break the
Apple II SCSI interface card.  This kind of restriction should be documented!

Which brings us to the reason I made my original posting, Matt.  It wasn't to
criticize Apple's design practice, although it may have come across that way due
to the 10 days of frustration I spent trying to make my drive work.  The reason
for the posting was to help other homebrewer's out there to avoid the trap that
I fell into.  I have received several mailings from people who had the same
problem, were unable to solve it, and had shelved there units.  With my posting,
they were able to get them going.

>-----------------------------------------------------------------------------
>Matt Deatherage, Apple Computer, Inc. | "The opinions expressed in this tome
>Send PERSONAL mail ONLY (please) to:  | should not be construed to imply that
>AppleLink PE: Matt DTS  GEnie: AIIDTS | Apple Computer, Inc., or any of its
>CompuServe: 76703,3030                | subsidiaries, in whole or in part,
>Usenet:  mattd@apple.com              | have any opinion on any subject."
>UUCP:  (other stuff)!ames!apple!mattd | "So there."
>-----------------------------------------------------------------------------

-- 
-----------------------------------------------------------------------------
John F. Snow                         UUCP: {ihnp4,decvax}!decwrl!esunix!jsnow 
Evans & Sutherland Computer Corp.      or:         uunet!utah-cs!esunix!jsnow
Salt Lake City, Utah                 AppleLink PE: JohnSnow    GEnie: J.SNOW2