On Mon, Jul 7, 2014 at 12:14 AM, Chuck Guzis <cclist at sydex.com> wrote:
It can be done. Take a look at main status register,
which can always be
read. Bits 0-3 are set while seeking (if the drive select feature of the
765 is used (the PC doesn't), you can have up to 4 simultaneous seeks in
progress.
That was the most obvious thing from reading the datasheet, so it was the
first thing that I tried. However, the behavior I seemed to be getting was
that the uPD765 wasn't clearing the seek in progress bits until after it
both asserted the interrupt AND I gave it the "sense interrupt status"
command. If I just waited for the seek in progress bits of the main status
register to clear, they never did, and my code would hang.
I haven't actually put a logic analyzer on it, so it's possible that my
analysis of the problem isn't entirely correct, but putting the "sense
interrupt status" command into the loop allowed it to complete.