Вы находитесь на странице: 1из 17

NEC uPD765A/uPD765B

Single/Double Density
NEC Electronics Inc. Floppy-Disk Controller

Description Features
The uPD765A/B is an LSI floppy disk controller (FDC) Address mark detection circuitry is internal to the FDC
chip which contains the circuitry and control functions which simplifies the phase-locked loop and read elec-
for interfacing a processor to 4 floppy disk drives. It is tronics. The track stepping rate, head load time, and
capableof either IBM 3740singledensity format (FM), or head unload time are user-programmable. The
IBM System 34 double density format (MFM) including uPD765A/uPD765B offers additional features such as
double-sided recording. The uPD765A/B provides con- multi-track and multi-side read and write commands
trol signals which simplify the design of an external and single and double density capabilities.
phase-locked loop and write precompensation circuitry.
FM, MFM Control
The FDC simplifies and handles most of the burdens as-
sociated with implementing a floppy disk interface. Variable recording length: 128,256, .8192 bytes/
sector
Hand-shaking signals are provided in the uPD765A/B
which make DMA operation easy to incorporate with the IBM-compatible format (single- and double-
aid of an external DMA controller chip, such as the sided, single- and double-density)
uPD8257. The FDC will operate in eitherthe DMA or non- Multi-sector and multi-track transfer capability
DMA mode. In the non-DMA mode the FDC generates
Drive up to 4 floppy or micro floppydisk drives
interrupts to !he processor every time a data byte is to
be transferred. In the DMA mode, the processor need Data scan capability-will scan a single sector or
only load the command into the FDC and all data an entire cylinder comparing byte-for-byte host
transfers occur under control of the FDC and DMA memory and disk data
controllers. Data transfers in DMA or non-DMA mode
There are 16 commands which the uPD765A/uPD765B Parallel seek operations on up to four drives
will execute. Most of these commands require multiple Compatible with uPD8080/85, uPD8086/88, V-series
8-bit bytes to fully specify the operation which the and uPD780 (Z80@) microprocessors
processor wishes the FDC to perform. The following
commands are available. Single-phase clock: 8 MHz maximum
Read Data Read Deleted Data 3 +5V only
Read ID Write Data Z80 is a registered trademark of the Zilog Corporation
Specify Write ID (Format Write)
Read Diagnostic Write Deleted Data Pin Configuration
Scan Equal Seek
Scan High or Equal Recalibrate
Scan Low or Equal Sense Interrupt Status
Version Sense Drive Status.

Ordering Information
Device Number Package Type Max Freq. of Operation
uPD765AC2 40-pin plastic DIP 8 MHz
uPD765B 40-pin plastic DIP 8 MHz

NECEL-000324 5-3
uPD765A/uPD765B NEC
Pin Identification RD (Read Strobe)
No. Symbol Function The RD input allows the transfer of data from the FDC
1 RESET Reset input to the data bus when low and either C Sor DACK is
2 RD Read control input asserted.
3 WR Write control input
Chip select input
WR (Write Strobe)
4 C
S
5 A0 Data or status select input TheWR input allows the transfer of data to the FDC
6-13 DB0-DB7 Bidirectional data bus from the data bus when low. Disabled when C
Sis high.
14 DRQ DMA request output
A0 (Data/Status Select)
15 DACK DMA acknowledge input
TC Terminal count input The A0 input selects the data register (A0 = 1) or status
16
register (A0=O) contents to be accessed through the
17 INDEX Index input
data bus.
18 INT Interrupt request output
19 CLK Clock input CS(Chip Select)
20 GND Ground
The FDC is selected when CS is low, enabling RD and
21 WCLK Write clock input WR.
22 WINDOW Read data window input
23 R DATA Read data input DBo-DB7 (Data Bus)
24 SYNC VCO sync output DBo-DB7 are a bidirectional 8-bit data bus. Disabled
25 W E Write enable output when CSis high.
26 MFM MFM output
27 SIDE Head select output DRQ (DMA Request)
28 29 USn US1 FDD unit select output The FDC asserts the DRQ output high to request a DMA
30 WDATA Write data output transfer.
31, 32 P S 0 PS1 Preshift output
33 FLT/TRK0 Fault/track zero input DACK (DMA Acknowledge)
34 WPRT/2SIDE Write protect/two side When the DACK input is low, a DMA cycle is active and
input the controller is performing a DMA transfer.
35 READY R e a d y input
36 HDLD Head load output TC (Terminal Count)
37 FLTR/STEP Fault reset/step output When t h e T C input is high, it indicates the termination of
38 LCT/DIR Low current direction a DMA transfer. It terminates data transfer during Read/
output Write/Scan commands in DMA or interrupt mode.
39 m/SEEK Read/write/ seek output
40 kc DC power ( +5 V) INDEX (Index)
The INDEX input goes high at the beginning of a disk
Pin Functions track.

RESET (Reset) INT (Interrupt)


The RESET input places the FDC in the idle state. It re- The INT output is FDC’s interrupt request. In Non-DMA
sets the output lines to the FDD to 0 (low), except PSO, 1 mode, the signal is output for each byte. In DMA mode,
and WDATA (undefined), INT and DRQ also go low; it is output at the termination of a command operation.
DBO-7 goes to an input state. It does not affect SRT,
HUT, or HLT in the Specify command. If the RDY input is CLK (Clock)
held high during reset, the FDC will generate an inter-
CLK is the input for the FDC’s single-phase, lTL-level
rupt within 1.024ms. To clear this interrupt, use the squarewave clock: 8 MHz or 4 MHz. (Requires a pull-up
Sense Interrupt Status command. resistor.)
NEC uPD765A/uPD765B

WCLK (Write Clock)


The WCLK input sets the data write rate to the FDD. It is
500 kHz for FM, 1 MHz for MFM drives, for 8 MHz opera-
tion of the FDC; 250kHz FM or 500 kHz MFM for 4 MHz
FDC operation.
This signal must be input for read and write c y c l e s
WCLK’s rising edge must be synchronized with CLK’s
rising edge, except for the uPD765B. READY (Ready)
The READY input indicates that the FDD is ready to re-
WINDOW (Read Data Window) ceive data.
The WINDOW input is generated by the phase-locked
loop (PLL). It is used to sample data from the FDD and in HDLD (Head Load)
distinguishing between clock and data bits in the FDC. The HDLD output is the command which causes the
read/write head in the FDD to contact the diskette.
RDATA (Read Data)
The RDATA input is the read data from the FDD, FLT/TRKO (Fault/Track 0)
containing clock and data bits. To avoid a deadlock In the read/write mode, the FLT input detects FDD fault
situation, input RDATA and WINDOW together. conditions. In the seek mode, TRKO indicates track 0
head position.
WDATA (Write Data)
WDATA is the serial clock and data output to the FDD. WPRT/2SlDE (Write Protect/Two Side)
In the read/write mode, the WPRT input senses write
WE (Write Enable) protected status (at the drive or media.) In the seek
The WE output enables write data into the FDD. mode, 2SIDE senses two-sided media.

SYNC (VCO Sync) FLTR/STEP (Fault Reset/Step)


The SYNC output inhibits the VCO in the PLL when low, In the read/write mode, the FLTR output resets the fault
enables it when high. flip-flop in the FDD. In the seek mode, STEP outputs
step pulses to move the head to another cylinder. A fault
reset pulse is issued at the beginning or each Read or
MFM (MFM Mode)
Write command prior to the HDLD signal.
The MFM output shows the VCO’s operation mode. It is
high for MFM, low for FM. LCT/DlR (Low Current/Direction)
In the read/write mode, the LCT output indicates that
SIDE (Head Select)
the R/W head is positioned at cylinder 42 or greater. In
Head 1 is selected when the SIDE output is 1 (high), head the seek mode, the DIR output determines the direction
0 is selected when SIDE is 0 (low). the head will move in when it receives a step pulse. If
DIR is 0, seeks are performed in the outward direction;
U S 0 US1 (Unit Select 0,1) DIR is 1, seeks are performed in the inward direction.
The US0 and US1 outputs select up to 4 floppy disk drive
units using an external decoder.
RWlSEEK (Read/Write/Seek)
The RW/SEEK output specifies the read/write mode
PS0, PS1 (Preshift 0,1) when low, and the seek mode when high.
The PS0 and PS1 outputs are the write precompensation
request signals for MFM mode. They determine early, GND (Ground)
late, and normal times for WDATA shifting. Ground.

Vcc(+5v)
+5 V power supply.

5-5
uPD765AIuPD765B NEC
Block Diagram DC Characteristics
Th= -1O’C to +70°C,Vcc
__= +5V%lO%
Limits Teal
Parameter Symbol Min Typ Max Unit Conditions
Input voltage -0.5 v
IOW

Input voltage VIH 2.0 5v


high
Output voltage 0.45 V
low
Voltage 2.4 kc V

Input voltage 0.5 0.65 V


low (CLK +
WCLK)
Input voltage v
high
(CLK + WCLK)
Supply current 150
kc) 140

Input load 10
current high
Input load -10
current low
Output leakage 10
current high
Absolute Maximum Ratings Output leakage -10
TA = 250C current low
Power supply voltage, VCC - 0 5 to +7v
Input voltage, V1 -0.5 to +7v Capacitance
Output voltage, VO - 0 . 5 1 0 +7v
Operating temperature, TOpT - 1OOC to +7ooc Limits Test
Storage temperature, TSTG -65°C to +150°C Parameter Symbol Min Typ Max Unit Conditions
Input clock 20 pF (Note 1)
Comment: Exposing the device to stresses above those listed
in the Absolute Maximum Ratings could cause permanent
damage. The device should not be operated under conditions Input 10 pF (Note 1)
outside the limits described in the operational sections of this capacitance
specification. Exposure to absolute maximum rating condi- output 20 pF [Note 1)
COUT
tions for extended periods may affect device reliability. capacitance
Note:
(1) All pinsexcept pin under test tied to AC ground.

5-6
NEC uPD765A/uPD765B

DIFFERENCES BETWEEN ,uPD765A AND


uP D765B
The uPD765B is a functionally enhanced version of the
uPD765A.Differences are explained below.

Overrun Bit [OR]


In uPD765A, when executing a read- or write-type
command (except READ ID and SCAN types), the
result status OR bit is not set if there is an overrun on
the final byte of a sector. An improvement in the
uPD765B allows it to set the OR bit in any situation.

DRQ Reset
When an overrun occurs, the uPD765A needs DACK
input to reset DRQ. If DACK is not available, an
external DMA controller continues to operate even after
the FDC enters the R-Phase (Result Phase), and stored
result status may be transferred accidentally as ordinary
data.
On the other hand, the uPD765B resets DRQ auto-
matically just before the R-Phaseentry and independent
of the DACK input. See AC Characteristics for DRQ
reset timing.

Clock Synchronization
The uPD765B does not require synchronization
between the CLK and WCLK inputs.

Version Command
The Version command distinguishes the uPD765B
from other devices. The ST0 response to the Version
command is:
Part No. ST0 Value
uPD765A 80H
uPD765B 90H

5-7
uPD765AIuPD7656

AC Characteristics
= -10 to = V

Parameter Symbol Min Typ Max Unit Conditions Parameter Symbol Min Typ Max Conditions
Clock period 120 125 500 CLK WCLK cycle time 16 MFM = 0
240 250 ns CLK 8 MFM = 1
Clock active 40 WCLK active time 250 350 ns Note 4
(high, low)
Clock rise 20 CLK WCLK 0 n s
time delay only
Clock fall 20 ns WCLK. RDATA and 20 ns
time WINDOW time
- -
DACK 0 WCLK, and 20 ns
setup time to RO WINDOW fall time
- -
CS, DACK 0 ns Preshift time 20 ns
hold time from from WCLK
width 200 WCLK 20 100 ns
delav
Data access 140 = 100
from 20 100 ns
DB to float delay 10 85 ns
time from RDATA 40 ns
- - time
CS. OACK AW 0
setup time to WR I Window cycle time 2 MFM=O
OACK 0 ns 1
hold time Window hold time 15 ns
width 200 ns from RDATA
Data setup time to 100 ns Window setup time 15 ns
to RDATA
Data hold time from 0 ns setup time 12 CLK
to SEEK Notes 4, 5
time from ns Non-DMA SEEK setup time 7
+ mode to DIR
+ 135 Direction setup time
INT delay time from to step
hold time 5.0
+ 135 from step t
cycle time 13 Step active time 6 7 8 Notes 4.5
ns (Note 4)
(high)
DACK 140 ns Step cycle time 33 Note 2Note 2
delav
Fault reset 8.0 10
DRQ DACK 200 n s time (high)
delay ns (Note 4)
Write data width
DACK width AA ns
+ 15
hold time 15 CLK
TC width 1
after seek Notes 3.4.
Reset width 14 5
DRQ INT 60 7 7 SEEK hold time 30 CLK
response time only from DIR Notes 4, 5
INT DACK 1 DIR hold time 24
ineffective after step
Index pulse 4
AC Characteristics (cont)
Parameter Symbol Min Typ (1) Max Unit Conditions
delay from DRQ 800 ns S-MHz CLK
Note 4
delay 250 ns
from DRQ
12
response time
from DRQ

Notes:
(1) Typical values for TA = 25°C and nominal supply voltage.
( 2 ) Under software controLThe range is from ms 1to 16ms at 8-Mhz
clock period, and 2 ms to 32 ms at 4-Mhz clock period.
(3) When one device is executing a SEEK operation, SENSE DRIVE
STATUS is executed on another device.
(4) Double these values for a 4-MHZ clock period
(5) Thedrivesiderating has a variance of ~5Ons from the minimum
value.

liming Waveforms
Processor Read Operation Processor Write Operation

CS, DACK
liming Waveforms (Cont) Seek Operation

Data Input Waveform for AC Test (Except CLK,


2.4

0.45

s t e p
Clock (WCLK, Waveform for AC Test

Output
Overrun Operation Only)

Clock

Operation

FLJ Reset
I
Fault Reset

FDD Read Operation


1
FDD Write Operation

Write Enable
Terminal Count
I
0 or

Write Data

0
Normal 0 0 Reset
0
I
Early 0
Invalid

5-10
NEC uPD765A/uPD765B

liming Waveforms (Cont) Table 2. Main Status Register

Write Clock
No. Name Function

DB0 D0B FDD number 0 is in the seek mode. II any


(FDD 0 Busy) of the DnB bits IS set FDC will not accept
read or write command.
DB1 D1B FDD number1 is in the seek mode. If any of
(FDD 1 Busy) the DnB bits IS set FDC will not accept read
or write command.
DB2 D2B FDD number 2 is in the seek mode If any
(FDD 2 Busy) of the DnB bits IS set FDC will not acceot
read or write command
DB3 D3B FDD number 3 is in the seek mode. If any
Index (FDD 3 Busy) of the DnB bits IS set FDC will not accept
I read or write command
INDEX DB4 CB A Read or Write command is in orocess.
(FDC Busy) FDC will not accept any other command.
DB5 EXM This bit is set only during execution ohase
(Execution Mode) in non-DMA mode When DB5 goes low,
Internal Registers execution phase has ended and result
phase has started. It operates only during
The uPD765A/uPD765B contains two registers which non-DMA mode of operation
may be accessed by the main system processor: a sta- D
B6 DIO Indicates direction of data transfer be-
tus register and a data register. The 8-bit main status (Data Input/Output) tween FDC and data regrster If DIO = 1,
register contains the status information of the FDC, and then transfer is from data register to the
processor. If DIO = 0, then transfer is from
may be accessed at any time. The 8-bit data register the processor to data register.
(which actually consists of four registers, STO-ST3, in a
D
B7 RQM Indicates data register IS ready to send or
stack with only one register presented to the data bus at (Request for Master) receive data to or from the processor Both
a time), stores data, commands, parameters, and FDD bits DIO and RQM should be used to per-
status information. Data bytes are read out of, or written form the hand-shaking functions of
into, the data register in order to program or obtain the “ready” and “directron” to the processor
results after a particular command (table 3). Only the
status register may be read and used to facilitate the The DIO and RQM bits in the status register indicate
transfer of data between the processor and uPD765A/ when data is ready and in which direction data will be
uPD765B. transferred on the data bus. See figure 1.
The relationship between the status/data registers and
the signals RD, WR, and A0 is shown in table 1. Figure 1. DIO and RQM

Table 1. Status/Data Register Addressing Data In/Out Out FDC and Into Processor
(DIO) Out Processor and Into FDC
A0 RD WR Function
0 0 1 Read main status register
0 1 0 Illegal
0 0 0 Illegal
1 0 0 Illegal II
C
1 0 1 Read from data register
1 1 0 Write into data register

The bits in the main status register are defined in


table 2.

5-l 1
uPD765A/uPD765B NEC
Table 3. Status Register Identification Table 3. Status Register Identification (cont)
Pin Pin
NO. Name Function NO. Name Function
Status Register 0 Status Register 1 (cont)
D7, D6 IC D7=0 and D6=0 D2 ND During execution of Read Data. Read De-
(Interrupt Code) Normal termination of command, (NT) (No Data) leted Data Write Data. Write Deleted Data
Command was completed and properly ex- or Scan command, if the FDC cannot find
ecuted the sector specified in the IDR(2)Register,
this flag is set.
D7=0 and D6=1
Abnormal termination of command, (AT) During execution of the Read ID command.
Execution of command was started but if the FDC cannot read the ID field without
was not successfully completed. an error, then this flag IS set.
D7=1 and D6=0 During execution of the Read Diagnostic
Invalid command issue, (IC) Command command. if the starting sector cannot be
which was issued was never started found, then this flag is set.
D7=1 and D6=1 D1 During execution of Write Data, Write De-
Abnormal termination because during NW(Not Writeable) leted Data or Write ID command. if the FDC
command execution the ready srgnal from detect: a write protect srgnal from the
FDD changed state F D D . t h e n this f l a g i s S e t
D65 SE When the FDC completes the Seek com- Do MA This bit is set if the FDC does not detect the
(Seek End) mand, this flag IS set lo 1 (high). (Missing Address IDAM before 2 index pulses It is also set if
If a fault srgnal IS received from the FDD, or Mark) the FDC cannot find the DAM or DDAM af-
D4 EC
if the track 0 srgnal fails to occur after 77 ter the IDAM is found. MD bit of ST2 is also
(Equipment Check)
step pulses (Recalibrate Command) then ser at this time.
this flag is set Status Register 2
D3 NR When the FDD IS in the not-ready state and D7 Not used. This bit IS alwavs 0 (low)
(Not Ready) a Read or Write command IS Issued, this De CM During execution of the Read Data or Scan
flag IS set If a Read or Write command is (Control Mark) command, if the FDC encounters a sector
issued to side 1 of a single-sided drive, which contains a deleted data address
then this flag IS set mark, this flag is set Also set if DAM is
D2 HD This flag IS used to indicate the state of the found during Read Deleted Data
(Head Address) head at interrupt. DD If the FDC detects a CRC error in the data
D5
D1 US: This flag IS used to indicate a drive unit (Data Error in field then this flag is set
(Unit Select 1) number at interrupt. Data Field)
D0 Us0 This flaa is used to Indicate a drive unit DA W C This bit IS related to the ND bit, and when
(Unit Select 0) number at interrupt (Wrong Cylinder) the contents of C(3) on the medium is dif-
ferent from that stored in the IDR. this flag
Status Register 1
is set
D7 EN When the FDC tries to access a sector be-
D3 SH During execution of the Scan command. if
(End of Cylinder) yond the final sector of a cylinder, this flag
(Scan Equal Hit) the condition of “equal” is satisfied, this
IS s e t
flag is set.
Not used. This bit is always 0 (low)
D2 SN During execution of the Scan command, if
When the FDC detects a CRC(1) error in ei- (Scan N o t S a t i s f i e d ) the F D cannot find a sector on the cylin-
DE(Data Error) ther the ID field or the data field, this flag is der which meets the condition. then Cthis
set flag is set
D4 OR If the FDC is not serviced by the host sys- D1 BC This bit is related to the ND bit. and when
(Overrun) tem during data transfers within a certain (Bad Cylinder) the contents of C on the medium is differ-
time interval. this flaa is set. ent from that stored in the IDR and the con-
D3 Not used. This bit is alwavs 0 (low). tents of C IS FFH. then this flag IS set
Do MD When data IS read from the medium, if the
(Missing Address FDC cannot find a data address mark or
Mark in Data Field) deleted data address mark, then this flag
is set
NEC uPD765A/uPD765B

Table 3. Status Register Identification (cont) Command Symbol Description


Pin Name Function
NC. Name Function A0 controls selection of main status register
A0
Status Register 3 (Address Line 0) (A0=0) or data register (A0= 1).
D7 FT This bit is used to indicate the status of the C C stands for the current /selected cylinder
(Fault) fault signal from the FDD. (Cylmder Number) (track) numbers 0 through 76 of the medium
D6 WP This bit is used to indicate the status of the D D stands for the data pattern which is going to be
(Write Protected) write protected signal from the FDD. (Data) written into a sector during WRITE ID operation
D56 RY This bit is used to Indicate the status of the D7-D0 8-bit data bus, where D7 stands for a most
(Ready) ready signal from the FDD. (Data Bus) significant bit, and D0 s t a n d s f o r a l e a s t
significant bit.
D4 TO This bit IS used to indicate the status of the
(Track 0) track 0 signal from the FDD. DTL When N is defined as 00. DTL stands for the data
(Data Length) length which users are going to read out or write
03 TS This bit IS used to indicate the status of the into the sector
(Two-Side) two-side signal from the FDD.
EOT EOT stands for the final sector number on a cylin-
D2 HD This bit is used to Indicate the status of the (End of Track) der Durmg read or write operations, FDC will stop
(Head Address) side select signal to the FDD data transfer after a sector number equal to EOT
D1 US1 This bit is used to Indicate the status of the GPL GPL stands for the length of gap 3. During Read /
(Unit Select 1) unit select 1 signal to the FDD. (Gap Length) Write commands this value determines the num-
D0 US0 This bit is used to indicate the status of the ber of bytes that VCO sync will stay low after two
(Unit Select 0) unit select 0 signal to the FDD. CRC bytes During Format command it deter-
Note: mines the size of gap 3
(1) CRC = Cyclic Redundancy Check H H stands for the logical head number 0 or 1. as
(2) IDR = Internal Data Register (Head Address) specified in ID field
(3) Cylinder (C) is described more fully in the Command Symbol
HD stands for a the physical head number 0 or 1
Description. HD(Head) and controls the polarity of pin 27 (H = HD in all
command words )
Command Sequence HLT HLT stands for the head load time in the FDD (2 to
The uPD765A/uPD765B is capable of performing 15 dif- (Head Load Time) 254 ms in 2 ms Increments).
ferent commands. Each command is initiated by a HUT HUT stands for the head unload time after a Read
multibyte transfer from the processor, and the result af- (Head Unload Time) or Write operation has occurred (16 to 240 ms in
ter execution of the command may also be a multibyte 16 ms Increments)
transfer back to the processor. Because of this multi- MF If MF IS low, FM mode IS selected, and if it is high,
byte interchange of information between the uPD765A/ (FM or MFM Mode) M F M m o d e IS s e l e c t e d
uPD765B and the processor, it is convenient to consider MT IF MT is high, a multitrack operation IS per-
each command as consisting of three phases: (Multitrack) formed If MT = 1 after finishing read/write oper-
ation on siude 0. FDC will automatically start
Command The FDC receives all information re- searching for sector 1 on side 1
Phase: quired to perform a particular opera- N N stands for the number of data bvtes written in a
tion from the processor. (Number) sector
Execution The FDC performs the operation it NCN NCN stands for a new cylinder number which is
Phase: was instructed to do. (New Cylinder Number) going to be reached as a result of the seek opera-
tion; desired position of head
Result Phase: After completion of the operation, ND ND stands for operation in the non-DMA mode
status and other housekeeping infor- (Non-DMA Mode)
mation are made available to the PCN PCN stands for the cylinder number at the
processor. (Present Cylinder Number) completion of Sense Interrupt Status command,
position of head at present time
Table 4 shows the required preset parameters and
results for each command. Most commands require 9 R R stands for the sector number which will be read
command bytes and return 7 bytes during the result [Record) or written
phase. The “W” to the left of each byte indicates a com- R/W R/W stands for either Read (R) or Write (W)
mand phase byte to be written, and an “R” indicates a (Read/Write) signal
result byte. The definitions of other abbriviations used SC SC indicates the number of sectors per cylinder
in table are given in the Command Symbol Description (Sector)
table. SK SK stands for skip deleted data address mark
(Skip)

5-13
uPD765A/ uPD765B

Command Symbol Description (cont) Command Symbol Description (cont)


Name Function
SRT SRT stands for the steooino rate for the FDD (1 to STP During a scan operation if STP=1, the data in
(Step Rate Time) 16 ms in 1 ms increments). Stepping rate applies contiguous sectors is compared byte by byte with
to all drives (FH=1ms, EH=2ms, etc.). data sent from the processor (or DMA); and if
STO-ST3 STO-ST3 stands for one of four registers which STP=2, then alternate sectorsare read and com-
store the status information after a command has pared
(Status O-3)
been executed. This information IS available dur- US0, US1 US stands for a selected drive number 0 or 3
ing the result phase after command execution. (Unit Select)
These registers should not be confused with the
main status register (selected by Ao=O).
STO-ST3 may be read only after a command has
been executed and contains information relevant
to that particular command

Table 4. Instruction Set (Notes 1,2)


Instruction Code
Phase R/W D7 D6 D5 D4 D3 D2 D1 D0 Remarks
Read Data
Command w MT MF SK 0 0 1 1 0 Command codes
W X X X X X HD US1 US0 (Note 3)
W C Sector ID prior to command execution The 4 bytes
W H are compared against header on floppy disk.
w R
W N
W EOT
w GQL
w DTL
Execution Data transfer between the FDD and main system
Result ST0 Status Information after command execution
ST1
ST2
C Sector ID Information after command execution
H
R R
R N
R e a d D e l e t e d Data
Command W MT MF SK 0 1 1 0 0 Command codes
W X X X X X HD US, US0
W C Sector ID rnformation to command execution The 4 bytes
W H are compared against header on floppy disk
W R
w N
W EOT
W GPL
W DTL
Execution Data transfer between the FDD and main system
Result ST0 Status information after command execution
ST1
ST2
C Sector ID information after command execution
H
R R
RR N
Note:
(1) Symbols used in this table are described at the end of this section
(2) A0 should equal 1 for all operations.
(3) X = Don’t care, usually made to equal 0.
NEC uPD765A/uPD765B

Table 4. Instruction Set (Notes 1,2) (cont)


instruction Code
Phase Remarks
Write Data
Command W MT MF 0 0 0 1 0 1 Command codes
W X X X X X HD
W - c Sector ID information prior to command execution. The 4
H are compared against header on floppy
W R

W EOT
W GPL
DTL
Data transfer between the main system and FDD
Status after command execution

ST2
C Sector ID information after command execution
H
R
R N
Write Deleted Data
Command W MT MF 0 0 1 0 1 Command codes
W X X X X X HD US,
W C Sector Information prior to The 4 bytes
W are compared against header on floppy disk
W R
- p - - - - - N -
W EOT
w GPL
w DTL
Execution Data transfer between the FDD and main system
Result Status information after command execution
ST1
ST2
C Sector ID information after command execution
H

R N
Read Diagnostic
Command w 0 MF SK 0 0 0 1 0 Command codes
W X X X X X HD
W Sector prior to command execution
W H
w R
W N
W EOT
W GPL
w DTL
Data transfer between the FDD and main system FDC reads all
data fields from index hole to EDT.
Result Status information after command execution
ST1
ST2
C Sector ID Information after command
H

5-15
Table 4. Set (Notes
instruction Code
Remarks
Read
Command W 0 MF 0 0 1 0 Command codes
W X X X X X HD US,
Executron The first correct ID on the cylinder stored data
register.
Status information after command execution
ST1
ST2
C Sector ID read during executron phase from floppy
H

N
ID
Command W MF 1 1 1 C o m m a n d codes
w X X X X X HD US,
W N Bytes/sector
W SC Sectors/track
W GPL Gap3
W byte
FDC formats an entire track.
Result Status information after command execution
ST1
ST2
C In this case, the ID has no
H
R -
R N
Scan Equal
Command W MT SK 1 0 0 0 1 Command codes
W X X X X X US,
W C Sector command execution
W H
w
W
W EOT
w GPL
W STQ
Execution Data between the and main
Result Status after command execution
ST1
ST2
C Sector ID information after command
H
fl
N
Note:
(1) Symbols used this table are described at the end of this section
should equal 1 for all operations.
(3) X Don’t care, usually made to equal 0.

5-16
Table 4. Instruction Set (Notes
code
Phase Remarks
Scan or
Command MT MF SK 1 1 0 0 1 Command codes
X X X X X HD US,
C Sector ID to command
H

N
EOT
GPL
STP
Data comoared between the FDD and
Result Status after command execution
ST1
ST2
C Sector ID Information after command

R -
R N
Scan High Equal
Command W MT MF SK 1 1 1 0 Command codes
w X X X X X US,
w C Sector ID information prior to command execution
w
W
W N
W EDT
W GPL
w STP
Execution Data compared between the FDD and system
Result Status Information after command
ST1
ST2
C Sector ID information after command
H
R -
R

Command W o 0 0 D 1 1 Command codes


W x x x x x 0
Head retracted to track 0
Sense Interrupt Status
Command w 0 0 0 0 1 0 0 0 Command codes
Result Status Information about the FDC at the end of seek
PCN
Specify
Command W 0 0 0 0 0 0 1 1 Command codes
W SRT HUT
W HLT ND
Sense Drive Status
Command W 0 0 0 0 D 0 0 Command codes
W X X X X X HD US,
Result ST3 Status about FDD

5-17
Table 4. Instruction Set (Notes I,

Version
Command w x x x 1 0 0 0 0 Command codes
Indicates 7658
indicates
Seek
Command W 0 0 0 0 1 1 1 1 Command c o d e
W X X X X X HD US,
W NCN
Execution Head IS positioned over proper cylinder on diskette
Invalid
Command W Codes Invalid Command codes (No op- goes state)

Note:
(1) Symbols used in this table are described at the end of this section.
(2) should equal 1 for all operations.
(3) Don’t care, usually made to equal 0.

System Configuration
Figure 2 shows an example of a system using a

Figure 2. System Configuration

5-18
Data Format

Figure 3 shows the data transfer format for


and in FM and MFM modes. Figure 4 shows
VCO Sync timing.

Figure 3. Data Format


[FM Mode]

[MFM Mode]

Figure 4. VCO Sync Timing

Вам также может понравиться