WD37C65C
WD37C65C
I
I
I
I
I
I
I
I
I
WD37C65C
I
I
I
Floppy Disk Subsystem I
I
Controller Device I
I
I
I
I
I
I
I
I
I
I
I
• I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
I
S:2:E WESTERN DIGITAL I
I
I
I
I
I
I
WD37C65C
TABLE OF CONTENTS
Section Title Page
1.0 INTRODUCTION 25-1
1.1 Features 25-1
11/18/91 25-i
WD37C65C
25-ii 11/18/91
WD37C65C
LIST OF ILLUSTRATIONS
Figure Title Page
II
11/18/91 25-iii
WD37C65C
LIST OF TABLES
Table Title Page
25-iv 11118/91
INTRODUCTION WD37C65C
1.0 INTRODUCTION
The WD37C65C Floppy Disk Subsystem Control- Register provides support logic that latches the
ler is an LSI device that provides all the needed two LSBs used to select the desired data rate that
functionality between the host processor and the controls internal clock generation. The Operations
floppy disk drive. This "superchip" integrates the Register replaces the standard latched port used
following functions: formatter/controller, data in floppy subsystems. These registers are incor-
separation, write precompensation, data rate porated into the WD37C65C.
selection (to a maximum of 1Mbit per second),
and clock generation. It also provides interface All Clock Generation: SCLK - Sampling Clock,
drivers and receivers for the floppy drive. WCLK-Write Clock, and MCLK - Master Clock,
are included in the WD37C65C. XTAL oscillator
The WD37C65C is functionally compatible pin-for- circuits provide the necessary signals for internal
pin with the WD37C65A/B. In addition the timing when using the 44 pin PLCC. If the 40 pin
WD37C65C supports a power down mode for lap- DIP is used, the TTL level clock inputs must be
top and portable systems. Refer to Table 16-6 for provided. There are two oscillator inputs to the
a descripion of functional differences between the WD37C65C. The first at 32 MHz that handles all
WD37C65A!B and the WD37C65C. standard data rates (1MB/sec, 500, 250, and 125
kb/sec or 16MHz to handle 500, 250, and 125
On the disk drive interface, the WD37C65C in- Kb/sec). The second oscillator is at 9.6 MHz to
cludes data separation designed to address high support the 300 kb/sec data rate used in PC AT
performance error rates on floppy disk drives. It designs.
contains all the necessary logic to achieve classi-
cal 2nd order, type 2, phase locked loop perfor- Some AT compatibles use two-speed disk drives.
mance. Write precompensation is included, in ad- If a two-speed disk drive is used, the DRV input
dition to the usual formatting, encoding/decoding, should be grounded along with the CLK2 input.
stepper motor control, and status sensing func-
tions. All inputs are TTL compatible Schmitt Trig-
•
ger line receivers, and outputs are high current, 1.1 FEATURES
open drain, with 48 rnA drivers which meet the
ANSI specification. • IBM PC AT compatible format (single and
double density)
The host interface supports an 8 or 12 MHz, 286 -Provides "on chip" floppy control and
microprocessor bus without the use of wait states. operations
The inputs are Schmitt Triggers. Output drive -Provides required signal qualification to
capability is 20 LSTTL loads, allowing direct inter- DMA channel when in PC AT mode
connection to bus structures without the use of
-BIOS compatible
buffers or transceivers. For PC, PC AT and EISA
applications, qualification of interrupt request and -Supports dual speed spindle drives
DMA request is provided. • CMOS low power consumption (typically 300
mW at 32 MHz)
Traditionally, data rate selection, drive selection, • Power down mode with low standby current
and stepper motor control have been output ports (ICC = 100!!A maximum)
of the host processor architecture. In the
• Address mark detection circuitry (internal to
WD37C65C, these functions are latched into
floppy disk controller)
registers addressed within the I/O mapping of the
system. The WD37C65C has eight internal • Multi-sector and multi-track transfer capability
registers. The eight bit main status register con- • Direct floppy disk drive interface (no buffers
tains status information about the WD37C65C needed)
and may be accessed any time. Another four -48 rnA sink output drivers
status registers under system control also give
-Schmitt Trigger line receivers
various status and error information. The Control
Reprinted with permission of and licensed by NEC Electronics Inc. © 1985 NEC Electronics Inc.
11/18/91 25-1
WD37C65C INTRODUCTION
44 PIN PLCC
25-2 11118191
SIGNAL DESCRIPTIONS WD37C65C
212 WR WRITE Control signal for latching data from the bus into the
WD37C65C Buffer Register.
4/4 AO ADDRESS LINE Address line selecting data e.:!l or status (=0) infor-
mation. (AO = logic 0 during WR is illegal except in
Power Down mode.)
5/5 DACK DMA Used by the DMA controller to transfer data from
ACKNOWLEDGE the W037C65C onto the bus. Logical equivalent to
CS and AO=1. In Special or AT/EISA mode, this sig-
nal is qualified by DMAEN from the Operations
Register.
15/15 DMA DIRECT 0 DMA request for byte transfers of data. In Special or
MEMORY AT/EISA mode, this pin is tri-stated, enabled by the
ACCESS DMAEN signal from the Operations Register. This
pin is driven in the Base mode.
*Only in the PLCC version of the WD37C65C. Not connected in the DIP package.
11/18/91 25-3
WD37C65C SIGNAL DESCRIPTIONS
18/19 LDCR LOAD CONTROL Address decode which enables loading of the Con-
REGISTER trol Register. Internally gated with WR creates the
strobe which latches the two LSBs from the data
bus into the Control Register.
20/21 RDD READ DISK This is the raw serial bit stream from the disk drive.
DATA Each falling edge of the pulses represents a flux
transition of the encoded data.
21/ CLK2 CLOCK2 TTL level clock input used for non-standard data
rates; is 9.6MHz for 300 kb/s, and can only be
selected from the Control Register.
/22 XT2 XTAL2 0 XTAL oscillator drive output for 44 pin PLCC (See
Figure 6). Should be left floating if TTL inputs used
at pin 23.
/23 XT2 XTAL2 XTAL oscillator input used for non-standard data
rates. It may be driven with a TTL level signal.
22/24 DRV DRIVE TYPE Drive type input indicates to the device that a
twospeed spindle motor is used if logic is o. In that
case, the second clock input will never be selected
and must be grounded.
23/ CLK1 CLOCK1 TTL level clock input is used to generate all internal
timings for standard data rates. Frequency must be
16MHz ± 0.1% or 32MHz ± 0.1%, and may have
40/60 or 60/40 duty cycle.
/25 XT1 XTAL1 0 XTAL oscillator drive output for 44 pin PLCC (See
Figure 6). Should be left floating if TTL inputs are
used at pin 26.
·Only in the PLCC version of the WD37C65C. Not connected in the DIP package.
25-4 11/18/91
SIGNAL DESCRIPTIONS WD37C65C
25/28 HS HEAD SELECT 0 High current driver (HCD) output selects the head
(side) of the floppy disk that is being read or written.
Logic 1 = side O. Logic 0 = side 1.
26/29 WE WRITE ENABLE 0 This HCD output becomes true, active low, just prior
to writing on the diskette. This allows current to flow
through the write head.
27/30 WD WRITE DATA 0 This HCD output is WRITE DATA. Each falling edge
of the encoded data pulse stream causes a flux tran-
sition on the media.
28/31 DIRC DIRECTION 0 This HCD output determines the direction of the
head stepper motor. Logic 1 = outward motion.
Logic 0 = inward motion.
29/32 STEP STEP PULSE 0 This HCD output issues an active low pulse for
each track to track movement of the head.
30/33 DS1 DRIVE SELECT 1 0 This HCD output, when active low, is DRIVE
SELECT 1 in AT/EISA mode. It enables the inter-
face to this disk drive. This signal comes from the
Operations Register. In Base, or Special mode, this
output is #1 of the four decoded Unit Selects, as
specified in the device command syntax.
II
31/34 VSS GROUND -- Ground.
32135 DS2 DRIVE SELECT 2 0 This HCD output, when active low, is DRIVE
SELECT 2 in AT/EISA mode, enables the interface
to this disk drive. This signal comes from the Opera-
tions Register. In Base or the Special mode, this out-
put is #2 of the four decoded Unit Selects as
specified in the device command syntax.
33/36 M01, DS3 MOTOR ON 1, 0 This HCD output, when active low, is MOTOR ON
DRIVE SELECT 3 enable for disk drive #1, in AT/EISA mode. This sig-
nal comes from the Operations Register. In the
Base or Special mode, this output is #3 of the four
decoded Unit Selects as specified in the device
command syntax.
*Only in the PLCC version of the WD37C65C. Not connected in the DIP package.
11/18191 25-5
WD37C65C SIGNAL DESCRIPTIONS
35/38 HDL HEAD LOADED 0 This HCD output, when active low, causes the head
to be loaded against the media in the selected drive.
36/39
- ---
RWC, RPM REDUCED 0 This HCD out~ut, when active low, causes a
WRITE REDUCED WRITE CURRENT, when bit density is
CURRENT, increased toward the inner tracks, becoming active
REVOLUTIONS when tracks >28 are accessed. This condition is
PER MINUTE valid for Base or Special mode, and is indicative of
when write precompensation is necessary. In the
AT/EISA mode, this signal will be active when
CRO=1.
/40 DCHG* DISK CHANGE This Schmitt Trigger (ST) input senses status from
the drive. Active low indicates that drive door is
open or that the diskette has possibly changed
since the last drive selection. It has internal pull-up.
37/41 WP WRITE This ST input senses status from the disk drive in-
PROTECTED dicating active low when a diskette is WRITE
PROTECTED.
38/42 TROO TRACK 00 This ST input senses status from disk drive, indicat-
ing active low when the head is positioned over the
outermost track, TRACK 00.
39/43 lOX INDEX This ST input senses status from the disk drive, in-
dicating active low when the head is positioned over
the beginning of a track marked by an index hole.
'Only in the PLCC version of the WD37C65C. Not connected in the DIP package.
25-6 11/18/91
ARCHITECTURE WD37C65C
3.0 ARCHITECTURE
The WD37C65C Floppy Disk Subsystem Control- Figure 3-1 illustrates a block diagram of the
ler is an LSI device that provides all the needed WD37C65C Floppy Disk Subsystem Controller.
functionality between the host processor and the
floppy disk drive. This "superchip" integrates: for- Figure 3-2 illustrates a typical WD37C65C sys-
matter/controller, data separation, write precom- tem.
pensatioh, data rate selection, clock generation,
drive interface drivers and receivers.
8 BIT
DATA
BUS
-I[--+--+~
•
DRV Fffi
RiSL
STEP
ROM 5iiiC
1K X 16 RWC
001-4
AO
fRoii
DACR iDx
TC
'----r-~- WP
DMA
IRQ iSCFiG'
[iiCR
050R
L-~-+----------------~mID
CLK1
'-----------------~WE
CLK2 WRITE WD
PRECOMPENSATION PCVAL
11/18/91 25-7
WD37C65C ARCHITECTURE
+ 5V
(/)
WD37C65C
::l
m ... 40 VCC WE 26
...J
WD 27
~
w
1 RD
STEP 29 a:
:r 2 WR w
Q. DIRC 28 ...I
[[ 4 AO ...I
HDL 35 0
w 16 IRQ a:
Q. HS 25 I-
19 RST z
Q.
7-14.DBO-DB7 -
DS130 8
::l
w
DS232 (.)
§ 15DMA DS3-M01 33 if
a:
:r w
5 DACK DS4-M0234 I-
RWC-RPM 36 ~
6 TC
>
a:
0
ROD 20
..A w
(/)a:
(/)w
wo 3 CS WP 37
:1 Q.
~
a:o 0
0(,) 17 LDOR
Il')
oq-
ow TROO 38
<0 18 LDCR (}j
lOX 39
Lsv
GN..!lL - 22DRV DCHG 40
t + sv
~
GN..!lL -
24 PCVAL VSS 31
... Indicates
CLOCK 23 CLK1 '!I' 150 ohm
CKTS 21 CLK2 'pull-up
PLCC version of WD37C65 only.
25-8 11/18/91
HOST INTERFACE WD37C65C
11/18/91 25-9
WD37C65C HOST INTERFACE
determines how many of the Status Registers will No foreshortening of the Command or Result
be read. phases is allowed. After the last byte of data in the
Command phase· is sent to the WD37C65C, the
The bytes of data which are sent to the Execution phase automatically starts. In a similar
WD37C65C to form the Command phase, and are fashion, when the last byte of data is read out in
read out of the WD37C65C in the Result phase, the Result phase, the command is automatically
must occur in the order shown in the Command ended and the WD37C65C is ready for a new
Table. The command code must be sent first and command.
the other bytes sent in the prescribed sequence.
25-10 11118191
CONTROL REGISTER WD37C65C
1
1
1
0
0
1
x
x
300
250 K
125 K
K MFM,(9.6 MHz XTAL} 0
11118191 25-11
WD37C65C CONTROL REGISTER
25-12 11/18/91
MASTER STATUS REGISTER WD37C65C
11/18/91 25-13
WD37C65C MASTER STATUS REGISTER
BIT
NO. NAME SYMBOL DESCRIPTION
DBO FDD o BUSY DOB FDD number is 0 in the Seek Mode. If any of the
bits is set, FDC will not accept READ or WRITE
commands.
DB1 FDD 1 BUSY D1B FDD number 1 is in the Seek Mode. If any of the
bits is set, FDC will not accept READ or WRITE
commands.
DB2 FDD 2 BUSY D2B FDD number 2 is in the Seek Mode. If any of the
bits is set, FDC will not accept READ or WRITE
commands.
DB3 FDD 3 BUSY D3B FDD number 3 is in the Seek Mode. If any of the
bits is set, FDC will not accept READ or WRITE
commands.
DB5 EXECUTION EXM This bit is set only during Execution phase in non-
MODE DMA mode. When DB5 goes low Execution phase
has ended and Results Phase has started. It
operates only during non-DMA mode of operation.
DB6 DATA INPUT DIO Indicates direction of data transfer between FDC
and Data Register. If D10=1, then transfer is from
Data Register to the processor. If DIO=O, then trans-
fer is from the pr~cessor to Data Register.
25-14 11/18/91
MASTER STATUS REGISTER WD37C65C
BIT
NO. NAME SYMBOL DESCRIPTION
D5 SEEK END SE When the FDC completes the SEEK command, this
flag is set to 1 (high).
tD4 EQUIPMENT EC If the Track 0 signal fails to occur after 77step pul-
CHECK ses per Recalibrate Command, then this flag is set.
tD3 NOT READY NR Since drive Ready is always presumed true, this will
always be a logic O.
D2 HEAD SELECT HS This flag is used to indicate the state of the head at
interrupt.
01 UNIT SELECT 1 US1 This flag is used to indicate a Drive Unit Number at
interrupt.
DO UNIT SELECT 0 USO This flag is used to indicate a Drive Unit Number at
interrupt.
11118191 25-15
WD37C65C MASTER STATUS REGISTER
BIT
NO. NAME SYMBOL DESCRIPTION
D5 DATA ERROR DE When the FDC detects a 'CRC error in either the ID
field or the data field, this flag is set.
25-16 11/18/91
MASTER STATUS REGISTER WD37C65C
BIT
NO. NAME SYMBOL DESCRIPTION
D7 Not Used. This bit is always 0 (low).
D6 CONTROL MARK CM During execution of the READ DATA or SCAN Com-
mand, if the FDC encounters a sector which con-
tains a Deleted Data Address Mark, this flag is set.
D5 DATA ERROR DD If the FDC detects a CRC error in the data field,
then this flag is sel.
D4 WRONG WC This bit is related to the ND bit, and when the con-
CYLINDER tents of •• ·C on the medium is different from that
stored in the IDR, this flag is set.
D3 SCAN EQUAL SH During execution of the SCAN command, if the con-
dition of "equal" is satisfied, this flag is sel.
D2 SCAN NOT SN During execution of the SCAN command, if the
FDC cannot find a sector on the cylinder which
meets the condition, then this flag is set.
D1 BAD CYLINDER BC This bit is related to the ND bit, and when the con-
tents of C on the medium is different from that
stored in the IDR and the contents of C is FF, then
this flag is set.
DO MISSING MD When data is read from the medium, if the FDC can-
ADDRESS MARK not find a Data Address Mark or Deleted Data Ad-
IN DATA FIELD dress Mark, then this flag is set.
11118/91 25-17
WD37C65C MASTER STATUS REGISTER
BIT
NO. NAME SYMBOL DESCRIPTION
tD? Not used. Will always be logic o.
D6 WRITE WP This bit is used to indicate the status of the WRITE
PROTECTED PROTECTED signal from the FDD.
tD5 READY RY This bit will always be a logic 1. Drive is presumed
to be ready.
D4 TRACK 0 TO This bit is used to indicate the status of the Track 0
signal from the FDD.
tD3 WRITE WP This bit is used by the WD3?C65C to indicate the
PROTECTED status of the WRITE PROTECTED signal from the
FDD.
D2 HEAD SELECT HS This bit is used to indicate the status of the Side
Select signal to the FDD.
D1 UNIT SELECT 1 US1 This bit is used to indicate the status of the Unit
Select 1 signal to the FDD.
DO UNIT SELECT 2 USO This bit is used to indicate the status of the Unit
Select 0 signal to the FDD.
25-18 11/18/91
DATA REGISTER WD37C65C
AO RD WR FUNCTION
0 0 1 Read Main Status Register
0 1 0 Illegal
0 0 0 Illegal
1 0 0 Illegal
1 0 1 Read from Data Register
1 1 0 Write into Data Reaister
TABLE 7-1. MASTER STATUS AND DATA REGISTERS RELATIONSHIPS
11/18/91 25-19
WD37C65C OPERATIONS REGISTER
25-20 11118/91
BASE, SPECIAL, AND AT/EISA MODES WD37C65C
11/18/91 25-21
WD37C65C POLLING ROUTINE
DS1 \ /
DS2
\ /
DS4 \ I
DS3 \,--------,1
FIGURE 10-1. DRIVE SELECT POLLING TIMING
25-22 11/18/91
DEVICE RESETS WD37C65C
11/18/91 25-23
WD37C65C DATA SEPARATOR
25-24 11118191
WRITE PRECOMPENSATION WD37C65C
I
DSKD ...
DATA
SYNCHRONIZATION
I II RDATA
RE SYNCHRONIZATION
I
I
•
I t
L~ 0
TRANSIENT
RESPONSE
STATE
PHASE
CORRECTIONS
~I SUMMER I
I
_ SEPCLK
t3w FILTERING
>-
w
tf i i
0
w
-
(J)
<!
--0
I
11. STEADY INC
DIGITAL
CONTROLLED
-
STATE OSCILLATOR
FREQUENCY DEC
- FILTERING
REFCLK ...
~ CLOCK GENERATOR
I • SCLK
I I
t
CD1
t
CDO
11/18/91 25-25
WD37C65C CLOCK GENERA TlON
SERIES RESONANT
XT2
26 9.6 MHz;!; 100 ppm
XT1 R series = 30 ohm max
c==:J C shunt = 10 pf max
25
XT1 C1 = 68 pf 5% mica
*C3 C2 = 56 pf 5% mica
23
XT2 SERIES RESONANT
c==:J ~C2 XT1
22
XT2 16.0 MHz ± 100 ppm 32 MHz ± ppm
R series = 30 ohm max R series = 47.2 ohm
C shunt = 10 pf max C shunt = 2 pf max
C3 = 47 pf 5% mica C3 = 30 pf 5% mica
C4 = 15 pf 5% mica C4 = 30 pf 5% mica
25-26 11/18/91
COMMAND PARAMETERS WD37C65C
PHASE
COMMAND
RIW D7
W
W
W
W
W
MT
X
C
H
R
D6
MF
X
C
H
R
D5
SK
X
C
H
R
D4
0
X
C
H
R
D3
0
X
C
H
R
D2
1
HS
C
H
R
D1
1
US1
C
H
R
DO
0
usa
C
H
R
REMARKS
Command Codes
11/18/91 25-27
WD37C65C COMMAND PARAMETERS
25-28 11/18/91
COMMAND PARAMETERS WD37C65C
11/18/91 25-29
WD37C65C COMMAND PARAMETERS
PHASE RIW 07 06 05 04 03 02
01 00 REMARKS
COMMAND W 0 MF 0 0 1 10 0 Command Codes
W X X X X HS US1 usa
X
EXECUTION The first correct ID information on
the cylinder is stored in Data
Register.
RESULTS R STO STO STO STO STO STO STO STO Status information after command
R ST1 ST1 ST1 ST1 ST1 ST1 ST1 ST1 execution.
R ST2 ST2 ST2 ST2 ST2 ST2 ST2 ST2
R C C C C C C C C
R H H H H H H H H Sector ID information read during
R R R R R R R R R Execution Phase from floppy
R N N N N N N N N disk.
TABLE 15·7. REAO 10
25-30 11/18/91
COMMAND PARAMETERS WD37C65C
11118191 25-31
WD37C65C COMMAND PARAMETERS
PHASE RJW 07 06 05 04 01
03 02 00 REMARKS
COMMAND W MT MF SK 1 1
a 1 1 Command Codes
W X X X X X
US1 HS usa
W C C C C C
C C C Sector 10 information prior to
W H H H H H
H H H command execution.
W R R R R R R R R
W N N N N N N N N
W EOT EOT EOT EOT EOT EOT EOT EOT
W GPL GPL GPL GPL GPL GPL GPL GPL
W STP STP STP STP STP STP STP STP
EXECUTION Data compared between FDD
and main system.
RESULTS R STO STa STa STO STa STa STa STa Status information after command
R ST1 ST1 ST1 ST1 ST1 ST1 ST1 ST1 execution.
R ST2 ST2 ST2 ST2 ST2 ST2 ST2 ST2
R C C C C C C C C
R H H H H H H H H Sector 10 information after com-
R R R R R R R R R mand execution.
R N N N N N N N N
TABLE 15-11. SCAN HIGH OR EQUAL
25-32 11/18/91
COMMAND PARAMETERS WD37C65C
PHASE
COMMAND
RIW 07
W a
06
a
05
a 1 1
04
a1 1
03 02 01
Command Codes
DO REMARKS II
W X X X X X HS US1 usa
w NCN NCN NCN NCN NCN NCN NCN NCN
EXECUTION Head is positioned over
proper cylinder on the
diskette.
11/18/91 25-33
WD37C65C COMMAND PARAMETERS
Table 15-17 defines, in alphabetical order, the symbols used in Command Tables 15-1 through 15-16.
C CYLINDER NUMBER C stands for the current/selected cylinder (track) numbers 0 through 255
of the medium.
D DATA D stands for the data pattern which is going to be written into a sector.
D7 - DO DATA BUS 8-bit DATA BUS, where D7 stands for a most significant bit, and DO
stands for a least significant bit.
DTL DATA LENGTH When N is defined as 00, DTL stands for the DATA LENGTH which users
are going to read out or write into the sector.
EOT END OF TRACK EOT stands for the final sector number on a cylinder. During Read or
Write operations, FDC will stop data transfer after a sector number equal
to EOT.
GPL GAP LENGTH GPL stands for the length of Gap 3. During the FORMAT Command, it
determines the size of Gap 3.
HLT HEAD LOAD TIME HLT stands for the HEAD LOAD TIME· in FDD (2 to 254ms in 2ms incre-
ments).
HS HEAD SELECT HS stands for a selected head number 0 or 1 and controls the polarity of
pin 25 (in 40 pin DIP) or pin 28 (in 44 pin PLCC).
HUT HEAD UNLOAD TIME HUT stands for the HEAD UNLOAD TIME after a Read or Write operation
has occurred (16 to 240ms in 16ms increments).
NCN NEW CYLINDER NCN stands for a NEW CYLINDER NUMBER which is going to be
NUMBER reached as a result of the Seek operation. Desired position of head.
PCN PRESENT CYLINDER PCN stands for the cylinder number at the completion of the SENSE IN-
TERRUPT STATUS Command. Position of head at present time.
25-34 11/18/91
COMMAND PARAMETERS WD37C65C
SRT STEP RATE TIME SRT stands for the Stepping Rate for the FDD (1 to 16ms in 1ms incre-
ments). Stepping Rate applies to all drives. In 2's complement format,
F(Hex)=1ms, E(Hex)=2ms, etc.
STO STATUS 0 STO-3 stands for one of four registers which store the STATUS informa-
ST1 STATUS 1 tion after a command has been executed. This information is available
ST2 STATUS 2 during the result phase after command execution. These registers should
ST3 STATUS 3
not be confused with the Main Status Register (selected by AO=O). STO-3
may be read only after a command has been executed and contains infor-
mation relevant to that particular command.
STP During a SCAN operation, if STP=1, the data in contiguous sectors is com-
pared byte by byte with data sent from the processor (or DMA); if STP=2,
then alternate sectors are read and compared.
•
TABLE 15-17. COMMAND SYMBOL DESCRIPTIONS (CONTINUED)
11/18/91 25-35
WD37C65C COMMAND DESCRIPTIONS
A set of nine byte words are required to place the Side 1 (Sector L = last sector on the side). Note,
FDC into the Read Data Mode. After the Read this function pertains to only one cylinder (the
Data command has been issued, the FDC loads same track) on each side of the diskette.
the head (if it is in the unloaded state), waits the
specified head settling time (defined in the Specify When N = 0, then DTL defines the data length
Command), and begins reading ID Address Marks which the FDC must treat as a sector. If DTL is
and ID fields. When the current sector num- smaller than the actual data length in a sector, the
b~r("R") stored in the ID Register(IDR) compares
data beyond DTL in the sector is not sent to the
with the sector number read off the diskette, then Data Bus. The FDC reads (internally) the com-
the FDC outputs data (from the data field) byte-to- plete sector performing the CRC check, and
byte to the main system via the data bus. depending upon the manner of command termina-
tion, may perform a Multi-Sector Read operation.
After completion of the read operation from the When N is non-zero, then DTL has no meaning
current sector, the Sector Number is incremented and should be set to FF hexidecimal.
by one, and the data from the next sector is read
and output on the data bus. This continuous read At the completion of the Read Data command the
function is called a "Multi-sector Read Operation." head is not unloaded until after Head Unload
The Re~d Data Com.mand may be terminated by Time Interval (specified in the Specify command)
the receipt of a Terminal Count signal. TC should has elapsed. If the processor issues another com-
be issued at the same time that the DACK for the mand before the head unloads, then the head set-
last byte of data is sent. Upon receipt of this sig- tling time may be saved between subsequent
nal, the FDC stops outputting .data to the reads. This time out is particularly valuable when
processor, but will continue to read data from the a diskette is copied from one drive to another.
current sector, check CRC (Cyclic Redundancy
Count) bytes, and then at the end of the sector If the FDC detects the Index Hole twice without
terminate the Read Data command. The amount finding the right sector, (indicated in 'R'), then the
of data which can be handled with a single com- FDC sets the ND (No Data) flag in Status Register
mand to the FDC depends upon MT (multitrack), 1 to a 1 (high), and terminates the Read Data
MF (MF~/FM), and N (number of bytes/sector). command. (Status Register 0 also has bits 7 and
Table 31 lists the Transfer Capacity. 6 set to 0 and 1 respectively.)
Multl- MFMI Bytes Maximum Transfer Final Sector Read After reading the ID and Data Fields in each sec-
Track FM ISect Capacity From tor, the FDC checks the CRC bytes. If a read error
MT MF or (ByteS/Seclor) Diskettes
N Number of Sectors
is detected (incorrect CRC in ID field), the FDC
(128)(26)=3,328
sets the DE (Data Error) flag in Status Register 1
0 0 00 26 at Side 0 or
0 1 01 (256)(26)=6,656 26 at Side 1 to 1 (high). If a CRC error occurs in the Data
(128)(52)=6,656
Field, the FDC also sets the DD (Data Error in
1 0 00 26 at Side 1
1 1 01 (256)(52)=13,312 Data Fiel?) flag in Status Register 2 to a 1 (high),
and terminates the Read Data command. (Status
0 0 01 (256)(15)=3,840 15 at Side 0
0 1 (512)(15)=7,680 Register 0 also has bits 7 and 6 set to 0 and 1
02
respectively. )
1 0 01 (256)(30)=7,680 15 at Side 1
1 1 02 (512)(15)= 15,360
If the FDC reads a Deleted Data Address Mark off
0 0 02 (512)(8)=4,096 8 at Side 1 or
(1024)(8)=8,192 the diskette, and the SK bit (bit D5 in the first
0 1 03 8 at Side 1
Command Word) is not set (SK = 0), then the
1 0 02 (512)(16)=8,192 8 at Side 1
(1024)(16)=16,384
FDC sets the CM (Control Mark) flag in Status
1 1 03
Register 2 to a 1 (high), and terminates the Read
TABLE 16·1. TRANSFER CAPACITY Data command, after reading all the data in the
sector. If SK = 1, the FDC skips the sector with
The "multi-track" function (MT) allows the FDC to the Deleted Data Address Mark and reads the
read data from both sides of the diskene. For a next sector. The CRC bits in the deleted data field
particular cylinder, data will be transferred starting are not checked when SK = 1.
25-36 11/18/91
COMMAND DESCRIPTIONS WD37C65C
During disk data transfers between the FDC and field. If the Terminal Count signal is received while
the processor, via the data bus, the FDC must be a data field is being written, then the remainder of
serviced by the processor every 27 ~s in the FM the data field is filled with zeros.
mode, and every 13 ~s in the MFM mode, or the
FDC sets the OR (Overrun) flag in Status Register The FDC reads the 10 field of each sector and
1 to a 1 (high), and terminates the Read Data checks the CRC bytes. If the FDC detects a read
command. error (CRC error) in one of the 10 fields, it sets the
DE (Data Error) flag of Status Register 1 to a 1
If the processor terminates a read (or write) (high) and terminates the Write Data command.
operation in the FDC, then the 10 information in (Status Register 0 also has bits 7 and 6 set to 0
the Result phase is dependent upon the state of and 1 respectively.)
the MT bit and EOT byte. Table 16-2 shows the
values for C, H, R, and N, when the processor The Write command operates in much the same
terminates the command. manner as the Read command. The following
items are the same, and one should refer to the
Final Sector
MT HO Transferred 10 Information at Result
Read Data command for details:
to Procesor Phase
C H R N • Transfer capacity
0 0 Less than EOT NC NC R+1 NC
• EN (End of Cylinder) flag
0 0 Equal to EOT C+1 NC R=O NC
0 1 Less than EOT NC NC R+1 NC
• NO (No Data) flag
0 1 Equal to EOT C+1 NC R=O NC • Head Unload Time interval
1 0 Less than EOT NC NC R+1 NC • 10 Information when the processor terminates
1 0 Equal to EOT NC LSB R=O NC command
1 1 Less than EOT NC NC R+1 NC • Definition of DTL when N =0 and when N i'O
1 1 Equal to EOT C+1 LSB R=O NC
TABLE 16·2. C, H, R, AND N VALUES In the Write Data mode, data transfers between
Notes: the processor and FDC via the data bus, must , .
NC (No Change): The same value as the one at the beginning of occur every 27 ~s in the FM mode and every 13
command execution. ~s in the MFM mode. If the time interval between
LSB (Least Significant bit): The least significant bit of H is com-
plemented. data transfers is longer than this, then the FDC
sets the OR (Overrun) flag in Status Register 1 to
a 1 (high) and terminates the Write Data com-
mand. (Status Register 0 also has bits 7 and 6 set
16.2 WRITE DATA to 0 and 1 respectively.)
A set of nine bytes is required to set the FDC into
the Write Data mode. After the Write Data com-
mand has been issued the FDC loads the head (if 16.3 WRITE DELETED DATA
it is in the unloaded state), waits the specified
head settling time (defined in the Specify com- This command is the same as the Write Data
mand), and begins reading 10 fields. When all four command except a Deleted Data Address mark is
bytes loaded during the command (C, H, R, N) written at the beginning of the data field instead of
match the four bytes of the 10 field from the dis- the normal Data Address mark.
kette, the FDC takes data from the processor
byte-by-byte via the data bus and outputs it to the
FDD. 16.4 READ DELETED DATA
This command is the same as the Read Data
After writing data into the current sector, the sec-
command except that when the FDC detects a
tor number stored in 'R' is incremented by one,
Data Address mark at the beginning of a data field
and the next data field is written into. The FDC
(and SK = 0 [low]), it will read all the data in the
continues this 'Multisector Write Operation' until
sector and set the CM flag in Status Register 2 to
the issuance of a Terminal Count signal. If a Ter-
a 1 (high), and then terminate the command. If SK
minal Count signal is sent to the FDC it continues
= 1, then the FDC skips the sector with the Data
writing into the current sector to complete the data
Address mark and reads the next sector.
11/18/91 25-37
WD37C65C COMMAND DESCRIPTIONS
25-38 11118191
COMMAND DESCRIPTIONS WD37C65C
Table 16-3 shows the relationship between N, SC, 16.8 SCAN COMMANDS
and GPL for various sector sizes. The Scan commands allow data which is being
read from the diskette to be compared against
data which is being supplied from the main sys-
Format Sector Size N SC GPL GPL tem. The FOC compares the data on a byte-by-
Bytes/sector 1 2,3 byte basis and looks for a sector of data which
8" Standard Floppy meets the conditions of OFOO = OProcessor, OFDO::;
128 00 1A 07 18 OProcessor, or OFDO :e: OProcessor. The hexidecimal
byte of FF either from memory or from FOO can
256 01 OF OE 2A be used as a mask byte because it always meets
512 02 08 18 3A the condition of the comparison. Ones comple-
FM Mode
1024 03 04 47 8A ment arithmetic is used for comparison (FF =
2048 04 02 C8 FF largest number, 00 = smallest number). After a
whole sector of data is compared, if the conditions
4096 05 01 C8 FF are not met, the sector number is incremented (R
256 01 1A OE 36 + STP -8 R), and the scan operation is continued.
512 02 OF 18 54 The scan operation continues until one of the fol-
MFM lowing conditions occur: the conditions for scan
1024 03 08 35 74
Mode are met (equal, low, or high), the last sector on the
2048 04 04 99 FF
track is reached (EOT), or the terminal count sig-
4096 05 02 C8 FF nal is received.
8192 06 01 C8 FF
5 114" Minifloppy If the conditions for scan are met, then the FOC
sets the SH (Scan Hit) flag of Status Register 2 to
128 00 12 07 09
a 1 (high) and terminates the Scan command. If
128 00 10 10 19 the conditions for scan are not met between the
256 01 08 18 30 starting sector (as specified by R) and the last
FM Mode
512 02 04 46 87 sector on the cylinder (EOT), then the FOC sets
the SN (Scan Not Satisfied) flag of Status
1024 03 02 C8 FF
Register 2 to a 1 (high) and terminates the Scan
2048 04 01 C8 FF command. The receipt of a Terminal Count signal
256 01 12 OA OC from the processor or OMA controller durring the
256 01 10 20 32 scan operation will cause the FOC to complete
MFM the comparison of the particular byte which is in
512 02 08 2A 50
process and then to terminate the command.
Mode
1024 03 04 80 FO Table 16-4 shows the status of bits SH and SN
2048 04 02 C8 FF under various conditions of Scan.
4096 05 01 C8 FF
3112" Sony Microfloppv
128 0 OF 07 18
FM Mode 256 1 09 OE 2A
512 2 05 18 3A
256 1 OF OE 36
MFM 512 2 09 18 54
Mode
1024 3 05 35 74
TABLE 16-3. N, SC AND GPL RELATIONSHIP
Notes:
1. Suggested values of GPL in Read 0, Write commands to
avoid splice pOint between data field and 10 field of contiguous
sections.
2. Suggested values of GPL in format command.
3. All values except sector size are hexadecimal.
4 In MFM mode FOG cannot perform a ReadlWritelformat
operation with 126 bytes/sector. (N=OO)
11/18/91 25-39
WD37C65C COMMAND DESCRIPTIONS
Command StatUI! Begil!te[ 2 Comments the command with bits 7 and 6 of Status Register
Bit 2=SN Bit 3=SH o set to 0 and 1, respectively.
Scan Equal 0 1 DFFD=D Processor
When either the STP (contiguous sectors = 01, or During the command phase of the Seek operation
alternate sectors = 02) sectors are read or the MT the FDC is in the FDC Busy state; but during the
(Multitrack) is programmed, it is necessary to Execution phase, it is in the non-busy state. While
remember that the last sector on the track must the FDC is in the non-busy state, another Seek
be read. For example, if STP = 02, MT = 0, the command may be issued, and in this manner
sectors are numbered sequentially 1 through 26 parallel Seek operations may be done on up to
and the Scan command is started at sector 21, four drives at once. No other command can be
the following will happen: sectors 21, 23, and 25 issued as long as the FDC is in the process of
will be read, then the next sector (26) will be sending step pulses to any drive.
skipped and the index hole will be encountered
before the EOT value of 26 can be read. This will If the time to write three bytes of Seek command
result in an abnormal termination of the com- exceeds 150 ).lS, the timing between the first two
mand. If the EOT had been set at 25 or the scan- step pulses may be shorter than that set in the
ning started at sector 20, then the Scan command Specify command by as much as 1ms.
would be completed in a normal manner.
25-40 11/18/91
COMMAND DESCRIPTIONS WD37C65C
low, the Direction signal remains 0 (low) and step Seek End Interru~t Code
pulses are issued. When the Track 0 signal goes BillS
Bit 6 Bit 7 Cause
high, the SE (Seek End) flag in Status Register 0 Ready Line changed state, either
0 1 1
is set to a 1 (high) and the command is ter- polarity
minated. If the Track 0 signal is still low after 255 1 0 0 Normal Termination of Seek or
step pulses have been issued, (for the WD37C65 Recalibrate command
An Interrupt signal is generated by the FDC for The Specify command sets the initial values for
one of the following reasons: each of the three internal timers. The HUT (Head
Unload Time) defines the time from the end of the
1. Upon entering the Result phase of: Execution phase of one of the ReadIWrite com-
a. Read Data command mands to the head unload state. This timer is
b. Read A Track command programmable from 16 to 240ms in increments of
c. Read 10 command 16ms (01 = 16ms, 02 =32 ms ... OF16 = 240ms).
d. Read Deleted Data command The SRT (Step Rate Time) defines the time i n t e r - I I
val between adjacent step pulses. This timer is
e. Write Data command programmable from 1 to 16 ms in increments of 1
f. Format A Cylinder command ms (F = 1ms, E = 2ms, 0 = 3ms, etc.). The HlT
g. Write Deleted Data command (Head load Time) defines the time between when
h. Scan commands the Head load signal goes high and the
Read/Write operation starts. This timer is
2. Ready line of FDD changes state programmable from 2 to 254 ms in increments of
2 ms (01 = 2ms, 02 = 4ms, 03 = 6ms ... 7F =
3. End of Seek or Recalibrate command 254ms).
4. During Execution phase in the non-DMA mode The time intervals mentioned above are a direct
function of the clock (elK on pin 23). Times indi-
Interrupts caused by reasons 1 and 4 above cated above are for a 16MHz clock; if the clock
occur during normal command operations and are was reduced to 8MHz, then all time intervals are
easily discernible by the processor. During an Ex- increased by a factor of 2. If the clock was in-
ecution phase in non-DMA mode, 085 in the Main creased to 32 MHz, then all time intervals are
Status Register is high. Upon entering the Result decreased by half.
phase, this bit gets cleared. Reasons 1 and 4 do
not require Sense Interrupt Status commands. The choice of DMA or non-DMA operation is
The interrupt is cleared by Reading/Writing data made by the NO (Non-DMA) bit. When this bit is
to the FDC. Interrupts caused by reasons 2 and 3 high (NO = 1), the Non-DMA mode is selected;
above may be uniquely identified with the aid of and when NO = 0, the DMA mode is selected.
the Sense Interrupt Status command. This com-
mand, when issued, resets the Interrupt signal
and via bits 5, 6, and 7 of Status Register 0 iden-
tifies the cause of the interrupt.
11/18/91 25-41
WD37C65C COMMAND DESCRIPTIONS
INT
F seek or (Recalibrate) Command~ense Interrupt Status command
RD
-irSLUnLJ~
U LrlJ
1J Il
U
~ IL
lflJ
U ~
Lflj-
WR -----, I Ir i l , - - - - - - - - - - - - , , - - - - - - - - - -
U U U U
D10U
LrlJ U
RQM~ n n
rI r
cO
.QL()
Oco
::10
c
<D
E
~O
0
L()
co
0
i rI
cO
.Q L()
Oco
::10
ti:;;
~o
(J)<Il
<Il
>.
.0
-0
<1l~
<DO
~~ r-- ~<D
C')
~e a:gJ
L()
co -co co
:s: 0 0
Zr--
0
s: :s: Ole..
<D
Z~
Oe
.20 <DC') .$2.9 a:~ a:e..
~
<DE >0 <DC
-0.-
i§S: -0.- <Il
Oc Oc 2~
oJg 0.9 c oJg .l!l<D
J: .!;; <D
:;:: (J)a:
a.."t:: n.".:;:
OS: ~ os:
Z
0
Z
16.12 SENSE DRIVE STATUS and 7 (010 and ROM) in the Main Status Register
This command may be used by the processor to are both high (1), indicating to the processor that
obtain the status of the FOOs. Status Register 3 the W037G65G is in the Result phase and the
contains the Drive Status information stored inter- contents of Status Register 0 (STO) must be read.
nally in FOG registers. When the processor reads Status Register 0, it
will find an 80 hex, indicating an Invalid command
was received.
A Sense Interrupt Status command must be sent
16.13 INVALID after a Seek or Recalibrate interrupt; otherwise
If an Invalid command is sent to the FOG (a com- the FOG will consider the next command to be an
mand not defined above), then the FOG will ter- invalid command. In some applications, the user
minate the command after bits 7 and 6 of Status may wish to use this command as a No-Op com-
Register 0 are set to 1 and 0 respectively. No mand to place the FOG in a standby or No Opera-
interrupt is generated during this condition. Bits 6 tion state.
25-42 11/18/91
COMMAND DESCRIPTIONS WD37C65C
11118/91 25-43
WD37C65C DC ELECTRICAL SPECIFICA T/ONS
NOTE
25-44 11/18/91
DC ELECTRICAL SPECIFICA T/ONS WD37C65C
Note 1. Vin = VCC or GND, 10 = 0 mAo Note 3. Includes open drain high current drivers at
Vol = O.4V.
Note 2. Includes DBx, IRQ and DMA; 10 = -5.0 mA
source loads.
11118/91 25-45
WD37C65C AC TIMING CHARACTERISTICS
25-46 11/18/91
AC TIMING CHARACTERISTICS WD37C65C
11/18/91 25-47
WD37C65C AC TIMING CHARACTERISTICS
--t-~R1
AO, CS
DACK
RD
tRR t_1-L..--_
tRA
____t=_t_RD=:j ~tDF~,..---_
DATA X Data Valid I )'(
- - - , - -_ _- - - - - J ~tRI~ ' - - - - -
IRQ
'\-----
AO, CS
DACK x
------' C:~w-.l tWW
X
~tWA~ ' - - - - - -
WR
't 1.-
___t=_IDW=:j ~W~ ______
DATA
_ _ _- - - - - J
X Data Valid I )'(
~tWI~ ' - - - - -
IRQ
'\'----
25-48 11/18/91
AC TIMING CHARACTERISTICS WD37C65C
}, ~Cy ~ }.---_
DMA or IRQ!
tTCR
tTCW
11/18/91 25-49
WD37C65C AC TIMING CHARACTERISTICS
~
_D_'R_C_ _ ___.-t-DS-T--I . 1--. tSTD=4
STEP -'t-tSTP----1- :1'----
[ I tSC _ _---'
...
IDX "ttlDX
RDD ttRDD=-f
WD ttWDD=i'
25-50 11118191
AC TIMING CHARACTERISTICS WD37C65C
1 4 - - - - - Tcycle - - - - . j
16 MHz CLOCK / I~
~ T p-high -+-=-:;:"Tp-_1o-w-_-J
Trise
I- tCY~
11/18/91 25-51