Close

Repurposing IDE-Cables (even for video!)

esot.ericesot.eric wrote 10/25/2015 at 07:45 • 19 min read • Like

Brief overview, followed by updates, then the original writing... I should probably reorganize this at some point.

Briefly: 80-wire IDE cables are *great* for high-speed stuff... But the pinout is a bit more difficult than a straight-through 40-wire IDE cable, because the 80-wire cables have shielding (yay!) which is connected to specific pins designated as ground (as well as cable-select for master/slave) (booo!).

This "document" shows which pins are available for your own use, and some suggestions as to how to make use of 'em.

---------------

Update 11-1-16: TODO: This should probably be cleaned-up/moved to a project-page...? Also: This is a much better method for breakout than my under-breadboard-wiring (which is not shielded and defeats the purpose of the 80-wire shielded IDE cable)... #Breadboard adaptor for double-row pin headers

Update 11-7-16: Check out that link, above... it's way better than my other hack-job of more than a decade-ago:

But note that these breakout-methods are probably more noise-immune than the bread-board-solder-up job shown later... That guy's got issues (the wires overlap the bus-bars, and they run right beside each other with no shielding).

Update 10-13-16: HMMM... http://www.mpja.com/28-Pin-GPIO-Breakout-Breadboard-Kit-for-Raspberry-Pi/productinfo/33050+MP/

Not too different from:

over at #sdramThingZero - 133MS/s 32-bit Logic Analyzer

Beware that NEITHER of the above take advantage of the inherent shielding of an 80-wire/40-pin IDE cable... (described below)....


(Update 8-9-16: Notes re: Cropping Motherboards! added at the bottom)

80-wire IDE cables are quite useful, and are quite easy to acquire...

Cut off one end, and have a nice little jumper for between-boards on your own custom circuits. Strip the ends of the wires on that remaining cable and have a great "breakout" for a shit-ton of signals.

They have shielding between each signal wire. Cool. And that shielding is inherent to the cable itself, so there's no need to connect a whole bunch of pins to ground. Awesome.

BUT: That "automatic" shielding comes at a small price... You can't just use *any* of the pins in your cable for a signal. Below is a listing of the usable pins for your projects...

(If this line-wraps oddly, try *shrinking* the width of your browser window, counter-intuitively.

DEFINITELY SEE ALSO at the bottom, pinouts that are vertical... Why didn't I think of that? Thanks @Hacker404 . But, forgive me, I'm gonna be kinda partial to these for a little while, since I drew 'em.)

This is a typical IDE 80-wire connector

(Note, a typical 40-wire connector will be different, most are
 straight-through to every pin. 
 Not sure about 40-wire cable-select cables).


   1  3  5  7  9  11 13 15 17 19 21 23 25 27 29 31 33 35 37 39
.----------------------------|¯¯¯¯|----------------------------.
|  o  o  o  o  o  o  o  o  o  G  o  o  o  o  o  o  o  o  o  o  |
|                                                              |
|  G  o  o  o  o  o  o  o  o  X  G  G  G  /  G  o  /  o  o  G  |
'--------------------------------------------------------------'
   2  4  6  8  10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40


 Typical 80-wire cable:
 ___________________________________________
 |_|                     |_|             |_|
 Motherboard             Slave           Master
 (blue)                  (gray)          (black)


Pins:
 o = straight-through (at all connectors)
 G = Ground (at all connectors)
      All Grounds are tied together
      Each *signal* WIRE in the *cable*
       (not each pin in the connector)
       is shielded on each side by a ground *wire*
       Each of these ground-wires is connected together and 
       to the Ground pins.
 / = NOT Wired Straight-through
      34 is not wired at the Master Connector
      28 is not wired at the Slave Connector
      (Both *are* wired at the Motherboard Connector)
 X = This pin (20) is typically used for orienting the connector.
     The "Male" connector will usually not have a pin here.
     The "Female" connector (on the cable) will usually be 
     "filled", so no pin can be inserted.

Thus:
   There are *30* pins which are usable straight-through for
   signals/power (excluding ground)
   (These are available straight-through regardless of how you
    cut the cable)
   These are the ones marked 'o'
   1, 3-18, 21, 23, 25, 27, 29, 31-33, 35-39

   There are 7 pins which are grounded,
   connected to each other within the connectors,
   and connected to every "shield" *wire* (alternating wires).
   2, 19, 22, 24, 26, 30, 40

   The two pins marked '/' are usable for signals/power, 
   but of course depend on which connectors you use 
   (Slave, or Master)

NOTE:
    This information is for reuse of the *cable*
    If you're crazy like me and decide to reuse your old 
    motherboard as some sort of breakout-board, and wondering
    which pins are available to use, check out the note at the
    bottom of this page.

Uses:

I have used this connector/cable combination for sending parallel video data between two boards over several inches. (e.g. between the "Master" and "Slave" connectors on the cable, the "Motherboard" connector and cable removed with scissors).

I'm also using a few inches of this cabling for the monitor I'm writing on, which uses FPD-Link/LVDS. (Wire-pairs in LVDS are typically twisted together, but it seems to work fine in this setup with each signal-wire separated by a shield, as in the 80-wire IDE cable.)

I've, personally, settled on a couple "pinouts" that I've used in several places: one for parallel and one for FPD-Link video-data. It makes it quite easy to slap-together various converters... One board has DVI->Parallel, another Parallel->Dual-Pixel-FPD-Link. Another is used in the monitor I'm staring at: between the LVDS output on my VGA->LVDS converter (ebayed) and the unusual LVDS connector used by my monitor.

Of course, there's no reason to limit this connector to video signals (heck, it was used for hard-drives originally), but video's probably a pretty good stress-test of how clean these signals are... what data-rates we can expect to be reliable...

RGB 8/6-bits-per-pixel parallel video: 

|  Sync    | Blue   | Green  |  Red MSBs          | RGB LSBs   |
|          | MSBs   | MSBs   |                    |            |
:          :        :        :                    :            :
:  1  3  5 :7  9  11:13 15 17:19 21 23 25 27 29 31:33 35 37 39 :
.----------------------------|¯¯¯¯|----------------------------.
|  ck V+ Vs:B7 B5 B3:G7 G5 G3:G  R7 R6 R5 R4 R3 R2:B1 B0 G0 R0 |
|          :        :        :                    :            |
|  G  Hs DE:B6 B4 B2:G6 G4 G2:X  G  G  G  /  G  V+:/  G1 R1 G  |
'--------------------------------------------------------------'
   2  4  6 :8  10 12:14 16 18:20 22 24 26 28 30 32:34 36 38 40
           :        :        :G           V+      :V+

(Note, at the Male connector, pins 20, 28, and 34 may be soldered)

(Yeah, maybe it'd've made sense to place R0 and R1 where B0 and B1
 are located...)

V+ is typically 3.3V
Single/Dual Pixel FPD-Link (LVDS for LCDs)

| Single-Pixel, or     |
|  "Odd"/First pixels  |  "Even"/Second pixels    |   Unused   |
:                      :                          :            :
:  1  3  5  7  9  11 13:15 17 19 21 23 25 27 29 31:33 35 37 39 :
.----------------------------|¯¯¯¯|----------------------------.
|  G  0- 1+ 2+ G  c- 3-:4+ 5- G* 6- 6+ 7- C- C+ 7+:o  o  o  o  |
|                      :                          :            |
|  G  0+ 1- 2- G  c+ 3+:4- 5+ X  G  G  G  /  G  7-:/  o  o  G  |
'--------------------------------------------------------------'
:  2  4  6  8  10 12 14:16 18 20 22 24 26 28 30 32:34 36 38 40 :
:                      :                          :            :
    
 The terms "Even"/"Odd" may be swapped by various vendors, 
  e.g. depending on whether they consider it 1-based or 0-based
 A0-A7, below, are the dual-pixel terms as spec'd by SGI.
 Pin Names:
 0-3 = A0-A3 = "Odd 0-3"
 1-7 = A4-A7 = "Even 0-3"
 c = Clock 1, Odd Clock
 C = Clock 2, Even Clock
 G* this pin may not actually be wired...

Apparently my documentation is lacking, and I don't plan to
open up my converter circuit any time soon... 
 A7- may have been moved from pin 25 to pin 32, leaving 25 N/C?
 (A7+ was originally at 28, which isn't always connected)

Expectables:

The latest-and-greatest of these cables are used with UDMA-133 (as I recall). That's 133MB/s, and I believe that's a guaranteed speed, which likely takes into account the lowest-quality cables they expect from manufacturers (and might even include older 80-wire cables from e.g. the UDMA-66 days?).

Thanks to @Yann Guidon / YGDES for correcting me on some logic... I think the best *guaranteed* signal on a UDMA-133 cable, then, is 33MHz.

That's down an entire 18inch cable, with two connectors two loads, and surrounded by tons of really noisy power cables and other circuitry.

Also, I *think* they still use 5V-TTL-level signals, which is quite noisy in comparison to, say low-voltage TTL, or a differential-signal like LVDS...

All that to say, I think we can expect significantly higher reliable data-rates out of these cables than they're rated for... And if your project's below 33MHz, but you just want a reliable cable, these are highly recommended.

...for your hacking pleasure.

Thanks to @Hacker404 for redrawing these in a more browser-friendly manner!:

(Note, if you decide to copy-paste to, e.g., code documentation, it's MUCH easier, this way, to show which pins are being used for what... See "e.g." below...)

     ------     
 2  | G  o |  1 --------> e.g. Tx0
 4  | o  o |  3 --------< e.g. Rx0
 6  | o  o |  5
 8  | o  o |  7
10  | o  o |  9
12  | o  o |  11
14  | o  o |  13
16  | o  o |  15
18  | o  o |  17
20  | X  G  | 19
22  | G  o  | 21
24  | G  o |  23
26  | G  o |  25
28  | /  o |  27
30  | G  o |  29
32  | o  o |  31
34  | /  o |  33
36  | o  o |  35
38  | o  o |  37
40  | G  o |  39
     ------

RGB 6/8-bit pinout:

          -------    
----  2  | G  ck |  1  -------
      4  | Hs V+ |  3   Sync
----  6  | DE Vs |  5  -------
----  8  | B6 B7 |  7  -------
     10  | B4 B5 |  9  Blue MSBs
---- 12  | B2 B3 |  11 -------
---- 14  | G6 G7 |  13 -------
     16  | G4 G5 |  15 Green MSBs
---- 18  | G2 G3 |  17 -------
--G- 20  | X  G   | 19 -------
     22  | G  R7  | 21
     24  | G  R6 |  23
     26  | G  R5 |  25 Red MSBs
  V+ 28  | /  R4 |  27
     30  | G  R3 |  29
---- 32  | V+ R2 |  31 -------
--V+ 34  | /  B1 |  33 -------
     36  | G1 B0 |  35 RGB
     38  | R1 G0 |  37 LSBs
---- 40  | G  R0 |  39 -------
          -------

FPD-Link single/dual pixel

(This pinout was developed, in part, such that an IDE connector could be soldered directly (with minor modification) to a TQFP breakout-board, Thus the swapping-around of + and - signals, etc. This is just an example of how this connector can be used, you're more than welcome, if not recommended, to use your own pinout!)

              ------               ........
   Gnd -- 2  | G  o |  1 -- Gnd    LVDS
  A0+ --- 4  | o  o |  3 --- A0-   First
  A1- --- 6  | o  o |  5 --- A1+   Channel
  A2- --- 8  | o  o |  7 --- A2+
   Gnd --10  | o  o |  9 -- Gnd
Clk1+ ---12  | o  o |  11--- Clk1-
  A3+ ---14  | o  o |  13--- A3-  .........
  A4- ---16  | o  o |  15--- A4+   Second
  A5+ ---18  | o  o |  17--- A5-   Channel
         20  | X  G  | 19-- Gnd
   Gnd --22  | G  o  | 21--- A6-
   Gnd --24  | G  o |  23--- A6+
   Gnd --26  | G  o |  25--- (A7-?)
         28  | /  o |  27--- Clk2-
   Gnd --30  | G  o |  29--- Clk2+
  A7- ---32  | o  o |  31--- A7+  .........
         34  | /  o |  33          Unused
         36  | o  o |  35
         38  | o  o |  37
         40  | G  o |  39
              ------              .........




Update 8-9-16: Cropping Motherboards:

So, say you want to use your old fried motherboard for something completely different... in this case I'm working on an early prototype for #sdramThingZero - 133MS/s 32-bit Logic Analyzer... It was more laziness than anything that I kept the IDE (and floppy) connectors on this "motherboard cropping," but actually it'll be awesome! I can connect the (necessary) SDRAM pins to the IDE headers, and use this as a breakout-board! (And my cables are even shielded!) Awesome!

First-things-first: Be sure to remove all the other components... resistors, IC's, transistors... Yeah, probably even a good idea to get rid of the capacitors (unless you know they're only used for power). Careful with your heatgun, best from the back, works well with wide-areas. Gets a little tight *between* connectors, there were a slew of resistors inbetween. Heat up that soldering iron *hot* and put a huge blob of solder on it, big enough to touch both sides of the resistor... they should come up with a little work.. maybe put some aluminum-foil to protect the connectors and you might luck out and only get one burn-mark like I did. Anyways...

The next thing: Make sure those pins aren't shared, somehow. They're two separate channels, supposed to run simultaneously, so they *should* be completely independent, right? But yahknow, maybe power would be shared, or the Activity-LED (which is open-collector, as I recall)...

I only found One shared pin (besides the GNDs)... one which I wasn't expecting. Pin1 - Reset. K-Den... can't use that pin on *both* connectors for just *any* purpose...

(IDE pinouts are all over the webs. Note that there is no V+, only ground, and those are already handled in the "cable" pinout. Though, I suppose it's plausible one or two signals might be tied directly to V+ or GND... probably good to check.)

Otherwise, looks like I can use the above "cable" pinout for my needs.

sdramThing Free-Runner pinout:
                 ------          
                |      |  
      GND   40  | G  o |  39 /CS_FR_READ_DQ
                |      |    
     +3V3   38  | o  o |  37 +3V3             
                |      |     
  (Y) CKE   36  | o  o |  35 /WE   \
                |      |           |        
      GND   34  | /  o |  33 /CAS  |   
                |      |           |        
 (Y) XTAL   32  | o  o |  31 /RAS  /
                |      |                    
      GND   30  | G  o |  29 DQMB0 \
                |      |           |        
     +3V3   28  | /  o |  27 DQMB1 |
                |      |           |          
      GND   26  | G  o |  25 DQMB4 |  
                |      |           |        
      GND   24  | G  o |  23 DQMB5 /         
                |      |
      GND   22  | G  o  | 21 /CS_FreeRunner
                |       | 
        x   20  | X  G  | 19 GND
                |      |  
  /     A0  18  | o  o |  17  A1          \
  |             |      |                  |
  |     A2  16  | o  o |  15  A3          |
  |             |      |                  |
  |     A4  14  | o  o |  13  A5          |
  |             |      |                  |
  |     A6  12  | o  o |  11  A7          |  
  |             |      |                  |
  |     A8  10  | o  o |  9   A9          |
  |             |      |                  |
  |     A10  8  | o  o |  7   A11*        |
  |             |      |                  |
  |    *A12  6  | o  o |  5   A13*  N/C   |
  |             |      |                  |
  \    *BA0  4  | o  o |  3   BA1*        /
                |      |  
        GND  2  | G  ? |  1   +3V3
                |      |
                 ------        

Like

Discussions

James Newton wrote 12/23/2015 at 00:54 point

Smart. I've been using the older 40 conductor IDE cables to connect our CNC BOB PCB to our stepper motors drivers for years, with one entire row (so every other wire) grounded... provides very nice shielding, no measurable cross talk between step signals at up to 100KHz over a foot or more of cable.  I had accidentally purchased a bunch of these 80 wire cables some time ago, didn't think of this, and spent more time and effort than it was worth to ebay the damn things. Note to self: Never get rid of anything. Ever. Just let it slowly accumulate... ,o)

  Are you sure? yes | no

esot.eric wrote 12/23/2015 at 07:42 point

Hah, yeah, that's a great way to make use of 40-wire connectors! The 80-wires are for us lazy-folk ;)

  Are you sure? yes | no

James Newton wrote 12/23/2015 at 19:56 point

Well, the 80 wire cables get you 30 signals, right? You only get 20 from the 40 wire cable (assuming you ground every other wire). 

  Are you sure? yes | no

esot.eric wrote 12/24/2015 at 01:32 point

True about the extra signal pins... An 80-wire cable is *almost* drop-in-replaceable in cases like yours *if* you used the even pins for ground (or maybe cut off the orientation-tab, drill out the filled pin 20, and flip it backwards if you used the odd-pins?). All except pin 19 :/

  Are you sure? yes | no

Hacker404 wrote 10/26/2015 at 00:41 point

------     
----  2  | G  ck|  1  -------
      4  | Hs V+|  3   Sync
----  6  | DE Vs|  5  -------
----  8  | B6 B7|  7  -------
     10  | B4 B5|  9  Blue MSBs
---- 12  | B2 B3|  11 -------
---- 14  | G6 G7|  13 -------
     16  | G4 G5|  15 Green MSBs
---- 18  | G2 G3|  17 -------
--G- 20  | X  G  | 19 -------
     22  | G  R7 | 21
     24  | G  R6|  23
     26  | G  R5|  25 Red MSBs
  V+ 28  | /  R4|  27
     30  | G  R3|  29
---- 32  | V+ R2|  31 -------
--V+ 34  | / B1|  33 -------
     36  | G1 B0|  35 RGB
     38  | R1 G0|  37 LSBs
---- 40  | G  R0|  39 -------
          ------

  Are you sure? yes | no

Hacker404 wrote 10/26/2015 at 00:16 point

A little more HAD code box proof -

------     
 2  | G  o |  1
 4  | o  o |  3
 6  | o  o |  5
 8  | o  o |  7
10  | o  o |  9
12  | o  o |  11
14  | o  o |  13
16  | o  o |  15
18  | o  o |  17
20  | X  G  | 19
22  | G  o  | 21
24  | G  o |  23
26  | G  o |  25
28  | /  o |  27
30  | G  o |  29
32  | o  o |  31
34  | /  o |  33
36  | o  o |  35
38  | o  o |  37
40  | G  o |  39
     ------

  Are you sure? yes | no

esot.eric wrote 10/26/2015 at 01:04 point

Erm, I think I see where you're going with this... I shoulda done it vertical. Wonder why I didn't think of that.

Thanks for taking the time to do-so! I'll copy/paste into an actual code-box, if you don't mind.

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/26/2015 at 02:03 point

it's getting better, yes :-)

  Are you sure? yes | no

Yann Guidon / YGDES wrote 10/25/2015 at 14:47 point

UDMA-133 is 33MHz, dual data rate (falling and rising edge) and two bytes at once, IIRC :-)

  Are you sure? yes | no

esot.eric wrote 10/25/2015 at 21:05 point

Indeed, thanks for the clarification, I'll fix it so I seem less ridiculous ;)

  Are you sure? yes | no