K6610007
Rev.5
02.14.’03
- 46 -
6.3.2.4 PIO Data Out Commands
Execution includes the transfer of one or more 512-byte sectors of data from the host to the device.
1) The host writes any required parameters to the Features, Sector Count, Sector
Number, Cylinder Low, Cylinder High, and Device/Head Registers.
2) The host writes the command code to the Command Register.
3) The device sets the DRQ when it gets ready to accept the first sector(block) of data.
4) The host writes one sector block of data to the Data Register.
5) The device clears DRQ and sets BSY.
6) When the device has processed the sector(block), it clears BSY and set the INTRQ signal to "ON".
The device sets DRQ again if another sector is required to transfer.
7) After detecting INTRQ, the host reads the Status Register.
8) The device clears the interrupt.
9) If another sector(block) is required to be transferred, the above steps 3) to 8) are repeated.
6.3.2.4.1 Write Buffer [E8h]
This command allows the host to write 512 bytes of data to the sector buffer of the device. When the Write
Buffer command and the Read Buffer command are issued consecutively, the same data is read.
6.3.2.4.2 Write Sectors [30h, 31h]
This command writes sectors as specified in the Sector Count Register, beginning at the specified sector. An
implied seek is done if needed, after which the device searches for the target sector. If the target sector is
not found within two index periods, then with retries disabled, an ID Not Found Error is posted, but with
retries enabled, other attempts are made to try and read the target sector. After correctly reading a target
sector, the data in the sector buffer is written to the device, followed by the ECU bytes. At command
completion, the Command Block Registers contain the cylinder, head, and sector numbers of the last sector
written. If an error occurs during a write of more than one sector, writing terminates at the sector where the
error occurs. The command Block Registers contain the cylinder, head, and sector numbers of the sector
where the error occurred.
6.3.2.4.3 Write Long [32h, 33h]
This command is similar to the Write Sectors command, except that it writes the data and the ECC bytes
directly from the host; the device does not generate the ECC bytes itself. Only single sector Write Long
operations are supported. The transfer of the ECC bytes shall be 8-bits wide. The number of ECC bytes
transferred will be 4 bytes (Default). If the ECC transfer length is changed by Features Register = 44h, 58
bytes of ECC will be transferred.
6.3.2.4.4 Write Multiple [C5h]
This command is similar to the Write Sectors command, except interrupts are not generated on every sector,
but on the transfer of a block which contains the number of sectors defined by the Set Multiple command.
The number of sectors defined by the Set Multiple command is transferred without intervening interrupts.
DRQ qualification of the transfer is required only at the start of the data block, not on each sector. The Set