Tandy 1000 HX Technical Reference Manual page 215

Table of Contents

Advertisement

M
PD765AI/iPD7265
NEC
data is read during the result phase, the interrupt is au-
tomatically cleared (INT = 0).
The RDorWR signals should be asserted while DACK is
true. The CS signal is used in conjunction with RD and
WR a s j j a t i n g function during programmed I/O opera-
tions. CS has no effect during DMA operations. If the
non-DMA mode is chosen, the DACK signal should be
pulled up to Vcc-
It is important to note that during the result phase all
bytes shown in the command table (table 4) must be
read. The read data command, for example, has seven
bytes of data in the result phase. All seven bytes must
be read in order to successfully complete the Read Data
command. The/iPD765A/nPD7265 will not accept a new
comand until all seven bytes have been read. Other
commands may require fewer bytes to be read during
the result phase.
The nPD765A/fiPD7265 contains five status registers.
The main status register mentioned above may be read
by the processor at any time. The other four status regis-
ters (STO, ST1, ST2, and ST3) are available only during
the result phase and may be read only after completing
a command. The particular command that has been ex-
ecuted determines how many of the status registers will
be read.
The bytes of data which are sent to the /iPD765A/
/iPD7265 to form the command phase and are read out
of the jiPD765A/nPD7265 in the result phase must occur
in the order shown in table 4. That is, the command code
must be sent first and the other bytes sent in the pre-
scribed sequence. No foreshortening of the command
or result phases is allowed. After the last byte of data in
the command phase is sent to the /iPD765A/nPD7265,
the execution phase automatically starts. In a similar
fashion, when the last byte of data is read out in the
result phase, the command is automatically ended and
the fiPD765A//iPD7265 is ready for a new command.
Polling
After reset has been sent to the MPD765A/MPD7265, the
unit select lines USn and USi will automatically go into a
polling mode. In between commands (and between step
pulses in the Seek command) the /iPD765A/jiPD7265
polls all four FDDs looking for a change in the ready line
from any of the drives. If the ready line changes state
(usually due to a door opening or closing), then the
jiPD765A/fiPD7265 will generate an interrupt. When sta-
tus register 0 (STO) is read (after Sense Interrupt Status
is issued), not ready (NR) will be indicated. The polling
of the ready line by the MPD765A/MPD7265 occurs con-
tinuously between commands, thus notifying the proc-
essor which drives are on or off line. Each drive is polled
every 1.024ms except during the Read/Write com-
mands. When used with a 4 MHz clock for interfacing to
minifloppies, the polling rate is 2.048 ms. See figure 3.
Read Data
A set of nine (9) byte words are required to place the FDC
into the read data mode. After the Read Data command
has been issued the FDC loads the head (if it is in the
unloaded state), waits the specified head settling time
(defined in the Specify command), and begins reading
ID address marks and ID fields. When the current sector
number (R) stored in the ID register (IDR) compares with
the sector number read off the diskette, then the FDC
outputs data (from the data field) byte-to-byte to the
main system via the data bus.
After completion of the read operation from the current
sector, the sector number is incremented by one, and
the data from the next sector is read and output on the
data bus. This continuous read function is called a
multi-sector read operation. The Read Data command
may be terminated by the receipt of a terminal count sig-
nal. TC should be issued at the same time that the
DACK for the last byte of data is sent. Upon receipt of
this signal, the FDC stops outputting data to the proces-
sor, but will continue to read data from the current sec-
tor, check CRC (cyclic redundancy count) bytes, and
then at the end of the sector terminate the Read Data
command. The amount of data which can be handled
with a single command to the FDC depends upon MT
(multi-track), MF (MFM/FM), and N (number of bytes/
sector). Table 5 shows the transfer capacity.
The "multi-track" function (MT) allows the FDC to read
data from both sides of the diskette. For a particular cyl-
inder, data will be transferred starting at sector 1, side 0
and completing at sector L, side 1 (sector L = last sector
on the side). Note, this function pertains to only one cyl-
inder (the same track) on each side of the diskette.
When N = 0, then DTL defines the data length which the
FDC must treat as a sector. If DTL is smaller than the
actual data length in a sector, the data beyond DTL in
the sector is not sent to the data bus. The FDC reads
(internally) the complete sector performing the CRC
check and, depending upon the manner of command
16
Figure 3.
Polling Feature

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents