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”
the bt878 is a pretty good video sampling chip. someone also managed to get high sample rates from it for use with audio or even SDR applications. Having spare i/o pins would make possible for example switching analog filters or different frontends for SDR.
Many moons ago I hacked my registry entry for a TV+radio card and I could get local police on the standard radio app. It was that simple.
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!!
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.
Someone should try tapping the one of the various i2c buses inside a PC and see if they can attach an IO expander to it..
easiest way for i2c in PC is ram socket
It’s old news really, it’s been commercialy used for ages when buying a multiple camera input capture cards.
I have seen the datasheet here : http://www.datasheetarchive.com/dataframe.php?file=DSA-140146.pdf&dir=Datasheets-8&part=Bt848A#
but I’m still triing to guess : what on such chip a “a 24-bit general purpose I/O bus” could be useful for ?
anyone has any idea about the speed of this gpio?
btw AFAIR A/D converter goes up to 800KHz
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
Whoaaa…..the hell with the arduino due! Full x86 it is!
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.
You can get 16 bits of GPIO and a good number of just inputs with one of these cards as well, no soldering needed.
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 ?
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.
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.
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.
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.
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.
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.
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.
hah, called a danmere backer by any chance? got one on my desk right now, came in a lot of cards i bought for a soundblaster.
intresting hack! tho i can think of 50 easier ways to obtain a few i/os this is an interesting hack!
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.
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!
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.
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!
Yeah, i too would love more info on that.
BTW think back to PCI 2D graphics cards, “Vesa feature connector” … abusable?
Good question, I have sh*t tons of those cards piling up with nothing to use them for
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?
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!
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
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?
Please be kind and respectful to help make the comments section excellent. (Comment Policy)