The hard drive is suffering from damaged read/write heads. The platter motor which should spin the platters inside the hard drive chassis has become seized. The read/write heads have crashed into the platters and are now preventing the hard drive from spinning-up. For a quick introduction to hard drive anatomy have a look at our.
Keep Drive Spinning
The hard disk firmware is programmed to go into powersave mode on boot up. What you'll need to do is send the ATA commands to not stay in powersave mode, or like you said, give it dummy commands.
There is info over at PJRC on how to interface a PIC with an IDE drive, but it requires about 20 bits of IO to do it: http://www.pjrc.com/tech/8051/ide/wesley.html .
To do this in code, you'll need to (and this is all speculation based on reading the docs):
1] Read the status register until it indicates READY
2] Write 0xE3 to the command register
#1 is probably unnecessary. The write cycle looks like you need to set the following bits (copied from docs):
/CS0=0, /CS1=1, A2.A0=111B, D0.D7=0xEH - set write to command register with 'no Idle spindown' command
Then pulse the /WR pin low
The easiest way may just be to hook it up to a computer that allows you to set the idle times in BIOS, and do that. See if it saves it permanently.
What Happens If You Keep Spinning
Jan 01, 2017 By default Windows 10 will power down hard drives after 20 minutes of inactivity (or if the computer is a laptop, 10 minutes when on battery). For solid state drives (SSD) this has no affect, but for traditional mechanical hard drives, when this happens the hard drive will ‘spin down’ – reducing its power usage and giving the drive an opportunity to cool down. Generally by setting power options, for the hard disk. However normally the hard drive will spin as Windows is writing and reading a lot. However during sleep and hibernation modes, or perhaps after long period of time, when it falls asleep it will spin down the hard drives. Xls to dbf converter serial number. Just as in cases where the disks are not spinning at all, one possibility is that the printed control board is failing and cannot send enough power to the spindle motor, which spins the drive’s hard disk platters. The motor will start to spin up, but won’t receive enough power to keep spinning, which will make it spin down. When power is applied to a hard disk, it is always spinning the disk. In a few cases there is an option in power management to spin down the disk. It would require some time to get it spin up to speed before you could read to or write from it.