Shop OBEX P1 Docs P2 Docs Learn Events
WORKING Propeller based ATA. — Parallax Forums

WORKING Propeller based ATA.

davidsaundersdavidsaunders Posts: 1,559
edited 2011-04-04 11:09 in Propeller 1
Here is a working and tested ATA implementation for the propeller. I am using a closed source driver at this time so I can not provide a driver. The HW is 100% open source. This follows most of the rules, though all I can say for sure is that it works great on my breadboard with a good selection of different HDDs.

You WILL need to add level shifters of some form to go between 3.3V and 5V. Also this schematic matches its breadboard test. I would have posted this first, though I had not yet tested it, now it is tested.

The pin numbers have changed. Also with most devices the diode can be omitted, just helps some picky devices.

Many, many thanks to jazzed for getting this into an easily readable form.

For more help on using ATA see http://wiki.osdev.org/ATA_PIO_Mode . Though do remember that we are multiplexing the ATA Data lines down to 8 bits.
«1

Comments

  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 09:07
    Phil wrote:
    Oh, for heavens sakes! What was wrong with kicad?
    It is probably just me, though it is a lot easer and faster for me to draw these things by hand. For me it takes less than 20 minutes to draw a schematic with 100 connections and 20 components if I draw every connection separately, though it takes me at least six hours to do the same using a schematic drawing aid of any form on the computer.
  • jazzedjazzed Posts: 11,803
    edited 2011-04-02 09:53
    It is probably just me, though it is a lot easer and faster for me to draw these things by hand. For me it takes less than 20 minutes to draw a schematic with 100 connections and 20 components if I draw every connection separately, though it takes me at least six hours to do the same using a schematic drawing aid of any form on the computer.
    Obviously pencil and paper are your best tools. I also enjoy pencil and paper over computer for some types of drawings like landscapes and portraits that have intricate shadings but not much repetition.

    I can draw an equivalent schematic quickly with Eagle. If I knew diptrace, I'm sure that would be just as fast, but I don't know it and it would take me a while to learn it. The slowest/hardest part about schematic capture, etc... is making new components.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 10:45
    Jazzed, Or any one:
    If anyone, that can do so quickly, wishes to redraw the above schematic with a software tool, so that it looks better and is easier to read; I will gladly replace the picture of my schematic with the improvement. The posted schematic is a bit condensed to fit on one page and be accurate, my main schematics are always drawn out for every lead.
  • kwinnkwinn Posts: 8,697
    edited 2011-04-02 11:11
    I will occasionally draw a schematic using paper and pencil. In some cases this is faster and more practical than using a laptop. Typically that is done when on a flight, or when trying to come up with an approach to solve a problem. Not being artistically inclined my hand drawn schematics range from really bad to horrible and completely illegible so I use the flow charting and electronics templates from my university days. Similar templates are still available at the office supply stores.

    Another option I use is Paint. By having pre-drawn symbols and blocks it is just a matter of cutting, pasting, and using lines to interconnect things. Having color available is also very helpful.
  • jazzedjazzed Posts: 11,803
    edited 2011-04-02 11:30
    I may spend a little time on an Eagle drawing later.

    Some questions though:
    Why are you using HCT parts? LVC parts have much better characteristics.
    What devices are used to drive IORDP and IOWRP?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 11:38
    jazzed wrote:
    Why are you using HCT parts? LVC parts have much better characteristics.
    HCT is what I had on hand that is fast enough for the job.
    jazzed wrote:
    What devices are used to drive IORDP and IOWRP?
    There are two buffers shown in the schematic (between the 244s and 573s). Also, as mentioned above, this does not show all needed level shifters between 3.3V and 5V.
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-02 11:55
    It is probably just me, though it is a lot easer and faster for me to draw these things by hand.
    At the very least, then, if you post a hand-drawn schematic, give it a "GIMP-over" so people can read it. Here it is, rotated, sharpened, and brightness-/contrast-enhanced. I'm still having trouble making out some of the labels, though.

    -Phil
    768 x 1024 - 559K
  • jazzedjazzed Posts: 11,803
    edited 2011-04-02 11:56
    One way level shifting can be easily accomplished with logic families. You didn't answer my question about the buffers what are the "device types" you used? 74x125?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 12:44
    You didn't answer my question about the buffers what are the "device types" you used? 74x125?
    They are 74x244. With /OE tied low.

    And on the drawing I hope this is better:
    ata.gif
    768 x 1024 - 557K
    ata.gif 557.5K
  • potatoheadpotatohead Posts: 10,261
    edited 2011-04-02 14:02
    I'll take the schematic in any form. Thank you.

    And I completely agree on pencil and paper. They are always there, never fail, and endure for many years without worry of format changes, fickle storage, or enabling technology.

    (I do print out source code for that exact same reason. 6809 / 6502 code I wrote in the mid-80's is still there, easy to use, readable, with few worries. The stuff I had on disks?? Let's just say I'm glad I either wrote it down, or printed hard copy)

    [removed, cranky today, it seems!]
  • jazzedjazzed Posts: 11,803
    edited 2011-04-02 14:22
    They are 74x244. With /OE tied low.

    And on the drawing I hope this is better:
    ata.gif
    So you have a 3rd 74x244 for buffering IOWR and IORD?
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-04-02 14:37
    potatohead wrote:
    Asking for added value on top of something provided gratis always grated on me some... Not picking on anybody here, ...
    'Glad to hear it! :)

    And, davidsaunders, 'sorry if I seemed to be picking on you. At least, if you've ever seen Bob Pease's schematics in his Electronic Design columns, you'd know you were in august company. Here's an example from his Jan. 6, 2011 column:

    62045-fig-1.jpg

    I do recommend taking the time to become proficient with an available schematic CAD tool, though. Someday, you may want to write an article or appnote, in which professional-looking schematics are de rigueur -- at least if you're not Bob Pease. The forum is a great place to practice those skills.

    -Phil
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 15:27
    jazzed wrote:
    So you have a 3rd 74x244 for buffering IOWR and IORD?
    Yes, there is a 3rd 74x244. Just happened to have two tubes of these with 25 in each tube. I am also using it to connect between 3.3V and 5V for the ATA address lines, and CS0 and CS1

    Phil:
    Thank you. I do need to be better about making sure the schematics are readable before posting. Also, thank you for the comic relief :) .
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-04-02 16:19
    There are two buffers shown in the schematic (between the 244s and 573s). Also, as mentioned above, this does not show all needed level shifters between 3.3V and 5V.

    Do you have a quick schematic with those level shifters? I'd be interested to see where you are using them, mainly because you might not need level shifters at all. Propeller output to 5V chips - use HCT and power the HCT from 5V and the logic levels work out correct. And for 5V input to the propeller, use 2.2k resistors.

    Nothing wrong with level shifter chips mind you, but they consume a little more power and they add a little more delay.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 17:17
    Dr_Acula:
    The extra level shifters are only used between Prop P16-P18 and ATA address, and between P22 P23 and ATA RST, CS0, and CS1, All the other level shifting is done by the logic shown in the schematic, as all other signals pass through 74HCT series gates. Also I should note that, I use 74HCT244s as level shifters in cases like this.
  • jazzedjazzed Posts: 11,803
    edited 2011-04-02 21:30
    Here's an Eagle schematic in .pdf and .sch. Took about an hour to make.

    Please review for errors. I didn't add * to active low signals. Forgot to change 74LS00 to HCT. There is no power supply or bulk capacitors.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 23:01
    jazzed:
    Thank you.
    I am impressed beings it only took an hour. Looking at the PDF, I see only one error, in the layout you show the pins you have hooked to Propeller P8 though P15 should be attached to Prop P0 through P7. Thank you, Thank you. I am not to much worried about showing the power supply, bulk caps, or decoupling caps as I would expect this to be part of a bigger circuit.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 23:16
    Here is my correction.
    PropATAIDE.sch

    jazzed:
    I give my thanks, I could not have done this.
    MyPropATAIDE.jpg
    1024 x 664 - 51K
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-04-02 23:42
    Is the Drive Busy LED the wrong way round?
  • jazzedjazzed Posts: 11,803
    edited 2011-04-02 23:47
    Here is my correction.
    Now i'm lost. There are 2 devices driving P0..7 simultaneously. Please review the mark up again.

    Yes, the LED will never work like that :)
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 23:55
    Is the Drive Busy LED the wrong way round?
    Huh?
    Toby What do you mean? Most modern HDDs do not even have a Busy LED and rely on the controller for that, and if yours does then the HW described here should not effect it any differently than any other controller. Also this controller does not describe a busy LED.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-02 23:59
    jazzed:
    The data is multiplexed. The LE on the incoming latch is only active if a read is in progress, and the OE on the outgoing latch is only active if there is a write in progress. I will look at it again in the morning, it is midnight here.
  • M. K. BorriM. K. Borri Posts: 279
    edited 2011-04-03 00:10
    Holy wow -- this is awesome for data recovery!
  • Toby SeckshundToby Seckshund Posts: 2,027
    edited 2011-04-03 00:51
    @ davidsaunders

    There is a LED with its cathode connected to VCC, on DDACK.

    I'm probably confusing something, 4:00 AM starts never agree with me, but then it must be early hours for you too
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-03 06:06
    jazzed:
    The PropATAIDE.sch file attached to my previous post looks correct. Here again.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-03 08:23
    jazzed:
    Sorry about that I just saw my error. Somehow Prop P0 through P7 got tied to Prop P8 through P15. I do not know how to correct this with Eagle, please HELP.

    Did this do it?
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-03 08:31
    There is a LED with its cathode connected to VCC, on DDACK.
    Oh, that is not supposed to be a LED it is supposed to be a Diode. Sorry about the confusion.
  • jazzedjazzed Posts: 11,803
    edited 2011-04-03 09:38
    jazzed:
    Sorry about that I just saw my error. Somehow Prop P0 through P7 got tied to Prop P8 through P15. I do not know how to correct this with Eagle, please HELP.

    Did this do it?
    Looks ok to me. Sorry about the diode -> LED thing - that was my interpretation. I put a 1N4004 on it instead, but have no idea what characteristics the diode should have and have no idea if it should be connected reverse bias or not.

    The only thing that really bothers me now is both the IDE->PROP 74x244 and 74x573 are driving P0..7 simultaneously by the signal RDOE. Clearly that will not work. Any ideas?

    Also, my signal names come from here: http://en.wikipedia.org/wiki/Parallel_ATA ... Is DDACK your DASP ? Please review other pins.
  • davidsaundersdavidsaunders Posts: 1,559
    edited 2011-04-03 11:48
    Thank you for catching that error, in my drawing, i had overlooked that (purely a documentation error). The 74x244s OEs should be attached to the LE of the 74x573, for coming from ATA.
  • jazzedjazzed Posts: 11,803
    edited 2011-04-03 12:05
    Thank you for catching that error, in my drawing, i had overlooked that (purely a documentation error). The 74x244s OEs should be attached to the LE of the 74x573, for both from and to ATA.
    Here's an update.
Sign In or Register to comment.