[comp.os.minix] Device drivers damaging HW

jel@ea.ecn.purdue.edu (Jim Lumpp) (07/25/89)

I am not very familiar with IBM peripheral hardware and was 
told it is possible that the drives and monitor of a PC could 
be damaged by incorrectly written device drivers (i.e., by 
having students write them).  Is this true?  How susceptible 
is the IBM hardware to such damage?


thanks in advance,
Jim Lumpp

internet: jel@ecn.purdue.edu   
uucp:     ...!{decwrl,gatech,ucbvax}!pur-ee!jel

hjg@amms4.UUCP (Harry Gross) (07/26/89)

In article <13679@ea.ecn.purdue.edu> jel@ecn.purdue.edu (Jim Lumpp) writes:
>
>I am not very familiar with IBM peripheral hardware and was 
>told it is possible that the drives and monitor of a PC could 
>be damaged by incorrectly written device drivers (i.e., by 
>having students write them).  Is this true?  How susceptible 
>is the IBM hardware to such damage?

I am not sure of the specifics, but I do know that it is quite possible to burn
out the keyboard driver by incorrect driver programming.  If memory serves,
there is a driver chip that is insufficiently protected, and if the wrong signal
is placed onto some line (I never did know which one, but I can find out if you
want), the driver chip will be irrevocably fried.  Yuck - what a design.

If further details are desired, send me e-mail and I will try to get the
specifics from a friend of mine who knows ALL about this stuff.

Cheers,
-- 
		Harry Gross				 |  reserved for
							 |  something really
Internet: hjg@amms4.UUCP   (we're working on registering)|  clever - any
UUCP: {jyacc, rna, bklyncis}!amms4!hjg			 |  suggestions?

pcm@iwarpj.intel.com (Phil C. Miller) (07/26/89)

In article <13679@ea.ecn.purdue.edu> jel@ecn.purdue.edu (Jim Lumpp) writes:
>
>I am not very familiar with IBM peripheral hardware and was 
>told it is possible that the drives and monitor of a PC could 
>be damaged by incorrectly written device drivers (i.e., by 
>having students write them).  Is this true?  How susceptible 
>is the IBM hardware to such damage?
>
>
>thanks in advance,
>Jim Lumpp
>

Some Hercules monochrome clone cards (not IBM, but used in IBM machines) get
toasted inadvertantly if you're not careful.  The low-level mechanics of
this are beyond my domain, but it's when you're trying to BLANK the screen
that your problems start.  Hercules (and its clones) is implemented so that
the DARKEST shade results from the HIGHEST voltage, BRIGHTEST shade from the
LOWEST voltage.  If you aren't knowledgable about what you're doing,
something so innocent as blanking the screen can toast your controller, your
display, or both.

Sadder but wiser,

Phil Miller

Peter_Van_Epp@cc.sfu.ca (07/26/89)

I don't see how you could damage a floppy drive with a device driver (the
floppy controller chip should keep you from doing anything damaging, however
it is possible to destroy at least IBM monitors by reprogramming the 6845 in
the mono and CGA cards (ie. setting incorrect scan rates and funny screen
sizes) there used to be a warning about this in the IBM Tech Ref (as I recall).
I don't know if the same is true of the EGA cards (it may depend on whose EGA
it is!) since they don't contain 6845's any more (but it may still be possible
to change the scan rate).

Leisner.Henr@xerox.com (marty) (07/27/89)

I've also heard it's possible to damage monitors if you play with the video
controller incorrectly (never seen it happen).
With floppy disk drives, I suppose problems could happen without unloading
the heads.

I've played a lot (carefully) and I've never damaged anything.  I suppose
if I tried I could.

I suppose this is what makes low-level programming so difficult.

marty
ARPA:	leisner.henr@xerox.com
GV:  leisner.henr
NS:  leisner:wbst139:xerox
UUCP:  hplabs!arisia!leisner

dsmythe@cup.portal.com (dave l smythe) (07/27/89)

1. Some graphics-on-your-monochrome-monitor cards can be programmed
so that if you set the scanning frequency too high (or something like that) 
it will damage the monitor.  The symptom is that the screen starts to shrink.
If you see this happen, turn the whole thing off immediately!  There are
warnings/explanations of the specifics in those CGA card emulators for Hercules
cards (like SIMCGA).

2. As for drives, I have heard that if you use tracks 81 and 82 on a 3 1/2 inch
drive that you can damage the drive mechanism on some drives.

Dave Smythe
dsmythe@cup.portal.com

gswan@watcgl.waterloo.edu (Geo Swan) (07/28/89)

>In article <13679@ea.ecn.purdue.edu> jel@ecn.purdue.edu (Jim Lumpp) writes:
>>
>>I am not very familiar with IBM peripheral hardware and was 
>>told it is possible that the drives and monitor of a PC could 
>>be damaged by incorrectly written device drivers (i.e., by 
>>having students write them).  Is this true?  How susceptible 
>>is the IBM hardware to such damage?

Other people have posted followups warning that the CGA and hercules
graphics cards are vulnerable.  I can confimr that the EGA and VGA
are vulnerable as well.

I have a copy of the "Programmer's guide to the EGA/VGA" here.
The following is a quote from the second page of the chapter
describing the control registers for the EGA (of which the
VGA is a superset):

       "... In fact, some of these registers can be absolutely
	dangerous to modify.  Many popular displays will
	literally burn up if driven with improper timing for
	any length of time as a result of improper register
	settings."

chasm@attctc.Dallas.TX.US (Charles Marslett) (07/29/89)

In article <13679@ea.ecn.purdue.edu>, jel@ea.ecn.purdue.edu (Jim Lumpp) writes:
> I am not very familiar with IBM peripheral hardware and was 
> told it is possible that the drives and monitor of a PC could 
> be damaged by incorrectly written device drivers (i.e., by 
> having students write them).  Is this true?  How susceptible 
> is the IBM hardware to such damage?

The color monitors shipped by IBM and all (virtually all?) their clone-ers
are very robust in this respect -- I regularly set up the screen and leave
it in very abnormal timing configurations including the most dangerous one
of leaving off the sync signals completely -- this is a "synchronous" or
"asynchronous" reset of the EGA or VGA chip.  I have been told that this was
once a problem with the Seiko 1430 monitor, but it has since been fixed -- I
have one that came into the country many months before they started
selling them retail, and it has the protection circuitry, so this problem
must have shown up only in Japan (?).

On the other hand, the IBM digital monochrome monitor (50 Hz refresh, trails,
ugly, ...) does not have any protection circuitry, so it can distroy itself
if driven to a horizontal frequency far off from its normal value.  A reset
will not cause a problem though, because it drifts to its normal frequencies.
[This is the source of the warning from Hercules that the configuration of the
6845 should always be done in assembly language -- if done in Basic, you could
have an error and rewrite only a subset of the registers, pop back into
command mode, and wipe out your monitor.

In any case, you should have many seconds before any real damage is done, so
a careful student should be prepared to turn off the monitor (or computer) if
the screen breaks up or goes blank if he has a monitor that is susceptible
to such damage.

> thanks in advance,
> Jim Lumpp
> 
> internet: jel@ecn.purdue.edu   
> uucp:     ...!{decwrl,gatech,ucbvax}!pur-ee!jel


Hope this helps,
Charles
===========================================================================
Charles Marslett
STB Systems, Inc.  <== Apply all standard disclaimers
Wordmark Systems   <== No disclaimers required -- that's just me
chasm@attctc.dallas.tx.us

chasm@attctc.Dallas.TX.US (Charles Marslett) (07/29/89)

In article <4697@omepd.UUCP>, pcm@iwarpj.intel.com (Phil C. Miller) writes:
> In article <13679@ea.ecn.purdue.edu> jel@ecn.purdue.edu (Jim Lumpp) writes:
> > ... How susceptible
> >is the IBM hardware to such damage?

> Some Hercules monochrome clone cards (not IBM, but used in IBM machines) get
> toasted inadvertantly if you're not careful.  The low-level mechanics of
> this are beyond my domain, but it's when you're trying to BLANK the screen
> that your problems start.  Hercules (and its clones) is implemented so that
> the DARKEST shade results from the HIGHEST voltage, BRIGHTEST shade from the
> LOWEST voltage.

This problem (as I understand it) is a result of using traces too thin or
narrow for the current consumed (especially to the RAM chips).  It occurred
only on Hercules CLONES [real Hercules cards never had the problem, to my
knowledge].  It cannot happen on multilayer cards with power and ground
planes, and is very unlikely to happen with newer cards because the RAMs
manufactured in the last three or four years pull a lot less current that
older ones.

Pardon me if the problem I am describing is not the one originally mentioned,
but if it is, It is again safe to mess things up, just turn off power if the
screen starts acting flakey -- you usually have 20 or 30 seconds for that.

> something so innocent as blanking the screen can toast your controller, your
> display, or both.
> 
> Sadder but wiser,
> 
> Phil Miller

Charles
===========================================================================
Charles Marslett
STB Systems, Inc.  <== Apply all standard disclaimers
Wordmark Systems   <== No disclaimers required -- that's just me
chasm@killer.dallas.tx.us <== soon to be attctc.dallas.tx.us I think

chasm@attctc.Dallas.TX.US (Charles Marslett) (07/29/89)

In article <10841@watcgl.waterloo.edu>, gswan@watcgl.waterloo.edu (Geo Swan) writes:
> I have a copy of the "Programmer's guide to the EGA/VGA" here.
> The following is a quote from the second page of the chapter
> describing the control registers for the EGA (of which the
> VGA is a superset):
> 
>        "... In fact, some of these registers can be absolutely
> 	dangerous to modify.  Many popular displays will
> 	literally burn up if driven with improper timing for
> 	any length of time as a result of improper register
> 	settings."

The author might get into a bit of a fight with all the monitor
manufactures I work with -- ALL go to a great deal of trouble to
insure that the monitor will not be damaged if registers are written
improperly.  Only a few very inexpensive monitors will have this problem
(the care and/or circuitry needed to protect the monitor costs a dollar
or so, and can protect a $1000 monitor from accidental self distruction
-- cheap insurance if you ask me).

The primary reason for this is that if a driver can burn up the monitor, so
can CTL-ALT-DEL on an older PC.  For the entire memory countdown the CRTC
is not reprogrammed!  Just remember to turn off the monitor (even the
cheap ones) in that kind of time frame.  Even leaving a monitor turned on
overnight can be dangerous if a power fault causes the system to hang in
a funny state.

Lets go on, now that monitors are beaten to death, to the keyboard driver
problem and floppys shreading their heads at track 82 or 84 or whatever --
does anyone have any detailed knowledge about just what is the cause/vendor/
etc. associated with the damage?

Charles
===========================================================================
Charles Marslett
STB Systems, Inc.  <== Apply all standard disclaimers
Wordmark Systems   <== No disclaimers required -- that's just me
chasm@attctc.dallas.tx.us

dtynan@altos86.Altos.COM (Dermot Tynan) (08/02/89)

In article <8804@attctc.Dallas.TX.US>, chasm@attctc.Dallas.TX.US (Charles Marslett) writes:
> In article <4697@omepd.UUCP>, pcm@iwarpj.intel.com (Phil C. Miller) writes:
> > In article <13679@ea.ecn.purdue.edu> jel@ecn.purdue.edu (Jim Lumpp) writes:
> > > ... How susceptible
> > >is the IBM hardware to such damage?
> 
>  [Much discussion about various facets of video display design, etc.]


OK, here is the technical answer to your questions...
	1.  Display adaptors.
	The video beam on your display scans across from left to right, and
	from top to bottom.  It uses magnetic fields to divert the beam.
	It takes 63.5us (in the US) to go from one side to the other.  This
	is a frequency of 15.750kHz.  In order to produce the high voltage
	for the display, a transformer is needed.  This transformer has
	to be switched at a high frequency, so they use the horizontal
	sync frequency.  In short, the operation is similar to that of a
	car ignition coil.  However, if the sync frequency changes too
	far from the norm, the transformer will begin to burn up, due to
	the change in inductance (and as a result, current).  Before it
	does this, one will usually hear a high-pitched whistle from the
	display.  This is a definite indicator that things are not well.
	It is possible on most (if not all) graphics adaptors to change
	the sync frequency.  Playing around with these values can result
	in damage to your monitor.

	2.  Disk drives.
	Standard floppy-disk drives have track-zero override on the
	stepper motor.  This means, that no more stepping pulses in
	the direction of the edge will be accepted, when the head is
	at track zero (outside track).  This is so that you can home
	the head, by sending 255 step requests to the drive.  The
	apple ][ does this, but they removed the track-zero sensor,
	that is why you hear those drives make that grinding noise
	when they are reset.  However, even on the PC, there is no
	protection in the other direction.  This means that you can
	issue as many step requests toward the hub, and the drive
	will attempt to move the head, resulting in the stepping
	mechanism resetting itself.  This also results in a grinding
	noise (one I might add, I've heard from Minix on occasion).
	This is not good for the mechanism.  Commercial drives are
	not very robust, and tend to wear if this practice is repeated.
	Usually it will manifest itself in a fashion untested by most
	repair shops.  The alignment will no longer be linear (ie,
	aligned on the centre tracks, but - on the inner, and + on the
	outer, or, of course, vice-versa).
	A second destructive mechanism for drives, is head chatter.
	This is the repeated loading and unloading of the heads.  Again,
	Minix is a big offender in this regard.  As a general rule,
	the software should wait five seconds after the last access,
	before unloading the heads.  Double-sided drives are the
	worst.  Eight-inch drives, if you have any are extremely
	critical, and can be damaged by incorrectly inserting a disk.
	That of course, is a different problem..

	3.  Line printers.
	This isn't really relevant, so I'll keep it short.  It is also
	possible to do serious damage to your line printer (and I *mean*
	line printer, not Epson toys), if you repeatedly print the
	same line.  It can also cause serious damage to your floor, when
	the printer falls over :-(
						- Der
-- 
	dtynan@altos86.Altos.COM		(408) 946-6700 x4237
	Dermot Tynan,  Altos Computer Systems,  San Jose, CA   95134

    "Far and few, far and few, are the lands where the Jumblies live..."