24-port GPIO On A PCI Card


So you’ve got a project running on an x86 board and you’d like some GPIO pins. Whether you want to read a few buttons, light up a few LEDs, put an accelerometer in your computer or whatever, you’ve got a problem. Luckily there’s an easy way to get 24 GPIO pins on an x86 board using a PCI card for just a few bucks.

The key component of the build is a PCI TV Tuner card made by Hauppague under the WinTV brand. If you’ve got one of these cards with either a Brooktree bt848, bt849, bt878 or bt879 video capture chip, having 24 GPIO pins is just a spool of magnet wire, a soldering iron, and a steady hand away.

It’s a great build if you’d like some GPIO action without going through the usual parallel port mess, and especially useful since these WinTV capture cards can be had from the usual Internet suppliers for just a few bucks. You’ll need a driver, of course, but the relevant Linux kernel driver – bt8xxgpio – should be included any reasonably modern distro.

Special thanks to [Dex Hamilton] for notifying us of this build.

34 thoughts on “24-port GPIO On A PCI Card

  1. I don’t know if it is still the case, but back in the day when I ran Hauppauge’s TV cards it was just a matter of going to their web site for drivers.
    I was building a wheeled ROV back then and using one of their cards to do the video capture on a PC. When I called them in Hauppauge NY they didn’t hesitate to connect me with a tech, who immediately took an interest and spoke with me for quite a while.

    This project looks like it took some patience to accomplish. Good on ya!!

    1. Back in the day when the company was small enough that the techs were in the same office as the phone-answerers? Or in the more recent days where a company wants nothing to do with it’s customers, treats customer service as a chore, and writes it off as a financial loss?

      Just annoys me nowadays. In the late 1990s call centres were big news (in the actual TV news). They were gonna scoop up all those made unemployed by the West dismantling it’s manufacturing base, and give us all prosperity!

      Unfortunately it’s only me seemed to figure out that a call-centre worker is just a human interface for a computer. They know nothing. They’re paid to read from their screen, and decide which numbered response on their list that your answer comes closest to. A Windows help-screen with ears.

      Soon enough computers are going to get good enough at listening. Not good, necessarily, but good enough not to piss customers off completely, and customers will take a LOT of shit from company services. Computers already talk well. So there’s a complete industry gone from boom to bust in just a couple of years’ time.

      Anyway there’s my rant. Seems success brings arrogance, it’s probably unavoidable. Once you “go public”, float on the stock exchange, you’re obliged legally to put profits first at the expense of everything but the law.

      So there’s the choice between supporting small artisans, or taking the cost savings, terrible service, and usually monopolism, that comes with giant.

      There’s no middle ground any more. Very little room for even the littlest guys either.

      Anyway. I wasn’t proposing a solution.

    1. started reading pdf and now I remember – I had PixelView card back in the day with Digital camera – camera was talking some kind of serial protocol with the card using GPIO. I think I even have that camera somewhere :)

      This GPIO looks better and better

  2. Realtek RTL8139C network cards has separate parallel EEPROM interface that also could be used as 8 IO (data BUS) and 16 OUT (adress),
    but not newer RTL8139D, there eeprom shares PCI pins.

    1. Multi card capability allows for upgrade with additional serial or parallel cards—-

      Sounds Like a Good deal to me! But what IS the limit??? How many GIOP Total ?

      1. The limit is how many PCI slots your motherboard has.

        Can USB-to-Parallel adapters handle this sort of use? (If not, can that be fixed?) That would really open the floodgates.

        1. There aren’t USB-to-parallel adapters, there are USB-to-printer adapters that happen to use that port–those adapters are only good for printers, and can’t do most of the fun stuff true parallel ports are good for.

  3. There’s many tuners based on the BT chipsets, ATI tv wonders etc, they go for next to nothing used now they don’t work for OTA…

    I am hoping to find a use for PCI modems, I’ve got quite a pile building up. They’re all almost single chip, or I’d have been trying to use them for serial ports… if the uart and DSP were separate say, could hook up in between them, but haven’t found one that looks easy so far.

    1. Most of the later PCI modems, especially 33.6k and up, are “winmodems”. They don’t have a DSP, or a real serial connection anywhere in them. Software in their drivers does the DSP work on your CPU, converting the data you’re trying to transmit, directly into DAC values. The card contains just a DAC, an ADC (for the other direction), and a bit of analogue filtering.

      So there’s very little in them worth having. I even heard of some PCs, micro-laptops I think, that used the same ADC/DAC for the sound card, so you could have sound or modem but not both at once. It’s presumably all in the PC-98 standard. Intel were on a mission, round about then, to do it all on the CPU in software. Save tuppence in motherboard components, and use the $$$ processor to replace them. Cynical people like me think it was all to find something to soak up all the clock cycles their newer chips kept generating, so you’d need faster and faster CPUs. Which is their business, after all, Intel don’t make money on cheezy Z80-based modem controllers.

      Something similar is thought about why every version of Windows is slower than the previous one. Despite that fact that Word 6.0 had more than you’d ever need in a word processor back in about 1994.

  4. There might be the possibility of a “cheat” version, buy a PLCC socket in the same number of pins and pitch of the chip, and cram it over the top of it, might need shaving to sit good, then you can either dead bug off the top of it, or find a crimp on IDC socket for ribbon cable of the right pitch, plug one of them into one row of the PLCC socket, then splay the ribbon cable out to fat finger solder wherever you like. Might have to shave the inline connector also if you need to get into to the corner and have two meet at right angles.

    Easier to do on SOJ type chips though since they sit higher off the board.

  5. I have a Leadtek video capture card for recording from old VHS tapes via an S-video input. Why this one? Because Leadtek told the movie industry where they could stick it when it came to accepting interference from Macrovision.

    1. Ah well done! I remember back in about 1990, an ISA card that did tape-backup to a VHS recorder. Seemed quite simple, looked like just one medium-sized chip. It would record a number in the bottom corner of the screen so you’d know whereabouts to wind the tape to to get your files.

      Was a good idea, a VHS recorder probably has a more sophisticated and reliable tape transport than a purpose-built 5 1/4″ drive. All the expensive bits in something you already own!

      Presumably they died out as tapes got faster, or maybe there wasn’t as much a market for home-based tape backup as they imagined. This was back in 40MB MFM drive days.

  6. This is a really cool idea, I think I have 2 such cards gathering dust, they could be doing something!

    Normally my solution was just to take a 3$ ATMEGA16 and a MAX232. Use a USB to serial adapter, and program the MCU to act as 3 or 4 parallel ports, or maybe 2 ports, an ADC, and a DAC. It’s a trivial program in ASM, and they are so cheap I built a dozen or so the first time around. I socket the MCU in case I need to modify what it does, say to make it a 32-channel PWM controller, or an analog voltage monitor using the exact same circuit. I ought to socket the crystal too, but I’m not *that* practical.

    1. Any chance of a “how-to” writeup somewhere? I’d like to make a couple of these, but I’d like to have some good plans to follow so I can put my “thinking” time into thinking about what to do with them!

  7. Think I’ll stick with the USB HID chips that are easy to find. The same chip is used in keyboards, mice, and even game controllers these days. It’s based on the 6502 and operates at 200Hz to 1000Hz. No need to wire up muxers, can just flash the chip with a muxer program. The only gotcha is to flash the VID/PID section of the chip to prevent mouse/keyboard/gamepad drivers from being loaded for it. Communicating with the chip is just a matter of learning a USB HID API.

    There are a bunch of variations of the chip, mostly they just contain different amounts of NVRAM. I’ve seen a few that had extra features, like laser mice tend to have extensions that handle lift-off detection and decoding the co-ordinates.

    1. These are the ones found in ordinary keyboards? And they’re re-flashable? I suppose because OTP technology has died out now? A quick article on what you know would be very interesting!

    1. Iv seen projects using graphic card and VGA output as a transmitter – set specific modeline and display specially crafted image and you can receive it on the radio.
      You could go the same route and use Vesa connector as digital signal gen?

      1. I’ve seen software for the same that transmits video! Not just video, but RF-modulated MPEG-2 frames! As in, stick your set-top-box or digital-tv antenna next to your VGA cable, and you can pick up pictures sent from the PC, all modulated as a special signal down your VGA cable!

  8. Looks like I have a card that is capable of these hacks in my pc parts pile. I have a videomate x30 and it has a CX23880 chip on it that also appears on a more expensive model (x50) that has almost identical seeming hardware (From the pictures). Going to see if I can get some sdr capability out of one, it seems someone has accomplished it with this chip and from a quick skimming through the document it seems that I only need 2 resistors.Check this out for more information: http://www.geocities.ws/how_chee/cx23881fc6.htm

    1. After doing a quick inspection of both boards from images it seems that the only physical differance is a single connector.(The x30 does not have a fm connector, but there is still a footprint on the board for it) They are both the same board, and have the same chips populated, going to see if I can get it’s software working with a connector soldered onto it. Hopefully this won’t involve a bunch of software nonsense, do pci card have some indification id’s?(like usb vid and pid?) If so can I modify the cheaper card(or it’s driver) to be accepted by the software for the more expensive card?

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.