controlling an ATAPI device
David B
Posts: 592
Does anyone have any ATAPI experience?
I've been trying to learn how to run an ATAPI CDROM. My main processor is a propeller, which runs an ATA interface that I made from an SX48 protoboard, but this question is independent of the processors involved.
I was recently reading about how ATA CD and DVD drives use the same registers as the ATA hard drive interface, but in what's called a packet interface, the PI part of ATAPI, and googling the topic pulls up several cases where other people have successfully run CD drives from microcontrollers.
My propeller-ATA interface can operate hard drives ok - it reads and writes their internal registers, both 8 bit and 16 bit, status, error, configuration, address and data, and most everything works as expected.
I've got a CD drive that works perfectly when plugged into my PC's spare ATA connector, but so far I've gotten nowhere with the propeller interface. Specifically, the first bad response is that the BUSY status bit should be 0 (not busy) and the ready status bit (RDY) should be 1 (ready) but I'm getting all zeros from reading the status register (not busy but not ready either).
Is there maybe some other register I'm supposed to initialize? I've set this as the primary (master) device, and its pin jumpers are also set to master.
Does anyone have a clue?
I've been trying to learn how to run an ATAPI CDROM. My main processor is a propeller, which runs an ATA interface that I made from an SX48 protoboard, but this question is independent of the processors involved.
I was recently reading about how ATA CD and DVD drives use the same registers as the ATA hard drive interface, but in what's called a packet interface, the PI part of ATAPI, and googling the topic pulls up several cases where other people have successfully run CD drives from microcontrollers.
My propeller-ATA interface can operate hard drives ok - it reads and writes their internal registers, both 8 bit and 16 bit, status, error, configuration, address and data, and most everything works as expected.
I've got a CD drive that works perfectly when plugged into my PC's spare ATA connector, but so far I've gotten nowhere with the propeller interface. Specifically, the first bad response is that the BUSY status bit should be 0 (not busy) and the ready status bit (RDY) should be 1 (ready) but I'm getting all zeros from reading the status register (not busy but not ready either).
Is there maybe some other register I'm supposed to initialize? I've set this as the primary (master) device, and its pin jumpers are also set to master.
Does anyone have a clue?
Comments
I used to have some code I wrote for the 68000 CPU that allowed you to play audio CDs on an ATAPI CD-ROM drive. I can see if I still have it. That's the only time I ever did anything like that I can recall. Soon after CD-ROM drives started coming with front panel plat/stop/track buttons.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering
·
After rereading some notes I'd found, I read where somebody says that a particular bit in the device control register "MUST" be set before sending the command packet, so I'll try that tonight.
Errata - I used an SX52 board, not an SX48 board, for the ATA interface. With the SXes being discontinued I've had SX48 protoboards on my mind, trying to decide whether to stock up on a few before they're all gone. After adding the IDE INTRQ pin to an SX port for detecting CDROM status last night, my SX52 adapter has exactly 4 port pins left unused, so an SX48 protoboard would also work for this, but just barely.