<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 19 Feb 1991 09:06:42 GMT
From   : eru!hagbard!sunic!news.funet.fi!fuug!mjolner!newshost!fekete@bloom-beacon.mit.edu (Zoltan Fekete)
Subject: Motor on and Drive Select

Hi,

I was involved in developing floppy controller card for CP/M system and
also wrote floppy handlers. From that time I have bad experiences with 
using Drive Select as Motor On. The main problem is that the drives 
usually report Drive Ready before they reach their nominal speed. For 
example I've read in a NEC manual, that Ready will be active when the
motor reaches 50% of the nominal speed (and of course other conditions are
met too). In our system we used Western Digital WD2797 controller, and so
it had problems, sometimes it wrote faulty data to the disk. It happens
very easily when copying from one drive to another or rather when compi-
ling from one drive to the other. In this cases the two (or more) drives are
selected and deselected very often so the motor is also turned on and off 
completely. If the motor is spinning let's say 20% less than nominal speed
reading can be OK, but when you write the sector needs different amount of
space on the disk, and that can cause then not reliable operation. (At least
it caused with WD2797, although I tried the recommended track structure from
WD manual).
So I would *NOT* suggest using simple AND logic to generate Motor on, or
using Drive Select for that purpose. Rather I have two suggestions:
1. Tie Motor On to GND. Most of the drives are turning off their motors, 
   when there is no disk in them (of course not 8" drives). So the motor
   will spin when disk is in the drive and door is closed. From practice 
   I know that doesn't effect the lifetime too much, especially if you 
   have it in your home system. My home made system was working this way
   for years without any damages in drive or diskettes.

2. Use more sophisticated logic (or combine with SW too). The Motor On should
   work so, that when a drive is selected also Motor On becomes active, but
   a logic delays the Ready signal to be active for a while (depending on 
   drive type, but usually 1-2 seconds). The Motor On can be common for all
   the drives, and activation should start if any of the drives are selected.
   But then after deselecting the drives, the Motor On has to be active for 
   a while to eliminate the idle time if selected again. With my 4MHz Z80
   system by using different compilers and other programs I got to the 
   conclusion that 10-15 seconds delay to turn off Motor On is optimal.
   This solution needs for example some gates and a monostable multivibrator,
   but can be implemented with a programmable output and some software (typi-
   cally it should be a timer interrupt to work in the background.)

I hope that my ideas helped you to get less "BDOS Err On A: Bad Sector"
message. :-)

Zoltan Fekete
Nokia Telecommunications
fekete@tnds05.tele.nokia.fi
Voice: +358 0 5116293

<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>