Just wanting to ask if there's a way that an old computer could be like a microcontroller. In the sence that it has a range of pins (standard, PWM and analogue), both input and out put could be emulated by the operating system.


4 Answers 4


If you mean a VERY old computer: the parallel port on the really old ones (IBM PC) was such an I/O port. On later ones it was a bit more complex, but could still be read and written by a simple I/O instruction.

On current PCs things are not that simple any more, and there are layers upon layers of hardware and software between the CPU and pins that go to the outside world.

If you want to play with I/O pins: get a bare micro-controller (PIC, Cortex M0, AVR), or a development board (Arduino is a popular one), or a Raspberry Pi.

  • \$\begingroup\$ Yes the desktop computer has a RS232 and parallel (the bigger one). I'll do some research \$\endgroup\$ Commented Dec 28, 2013 at 7:42
  • \$\begingroup\$ A not-too-old PC is still likely to have a parallel port on the mainboard, even if it's not connected to a plug on the case. \$\endgroup\$
    – maxy
    Commented Dec 29, 2013 at 8:35

I'm assuming that a computer, which the O.P. has in mind, is an old PC-like desktop or laptop.

There are ways to add microcontroller-style I/O to a computer (old or new). The class of peripherals that does this is usually called I/O cards or DAQ (data acquisition) card. The complexity and functionality of these devices varies a lot.

A good example of a simple I/O card is NI USB-6008. Another example: an Arduino can be used as a USB I/O card.

  • \$\begingroup\$ Or if you're feeling brave, build your own. The OS driver might be a bit tricky though. \$\endgroup\$ Commented Dec 26, 2013 at 23:14
  • \$\begingroup\$ Your comment made me think of a breadboard taped to the back of a computer where every cell is a IO port. EDIT: Removed 'thanks' notes (not allowed) \$\endgroup\$ Commented Dec 28, 2013 at 7:39

No computer that you would be able to buy today could do that. Computers with that capability didn't even have operating systems, let alone GUIs. Even if you could get your hands on one of these antiques, you need to be an assembly programmer to make them do anything.

There is hope for this idea, though. Embedded Linux boards like the BeagleBone are full-featured computers running Linux, and they have I/O pins like an Arduino. You access the pins through a VFS (Virtual FileSystem). Essentially each pin is represented by a text file, and you set it on or off by writing 0 or 1 to that file. You can write programs by using any scripting language you like, and writing scripts that write to the files. It being an actual computer, it has some things onboard, which saves time with things like audio. Some single-board computers eg Raspberry Pi have I/O pins also.

If you really want to use a normal computer, you can get I/O expansion cards. These will give this functionality to any desktop, and some models even for laptops. Some of these can be pricey, though, and some require custom software and/or a specific OS. They are not the best option, but might be worth a look.

Hope this helps!

  • \$\begingroup\$ I'm planning on getting an arduino and possibly a r.pi later on. I guess the benefit I had in mind with using a computer is that there would be more outputs \$\endgroup\$ Commented Dec 28, 2013 at 7:44
  • \$\begingroup\$ @bobsterman I doubt a computer would give you more outputs, and nowadays you need to buy an expansion card to make it work at all. The reason I would just go with an arduino or possibly an embedded Linux board is you can program them easily, whereas it is likely to be much more complicated on a computer. \$\endgroup\$
    – felixphew
    Commented Dec 28, 2013 at 21:22
  • \$\begingroup\$ I am going to be getting an arduino soon but the reason I asked was so I could automate (or at least design) an entire house. Sure ive seen people automate a few lamps or door handles with small Linux embedded devices, but I'd estimate that you'd need to have at least 50 IO pins for a whole house. Would it be possible to make an circuit that slices a serial port in to x io ports?? \$\endgroup\$ Commented Dec 29, 2013 at 8:21
  • \$\begingroup\$ This may answer your question, @bobsterman: the Arduino Mega. 54 digital I/O pins for €39. A lot simpler than multiplexing a serial port, I should think. That is possible, but it's a lot of bother for this kind of thing, and you would need to do the software bit from scratch. \$\endgroup\$
    – felixphew
    Commented Jan 1, 2014 at 21:39
  • \$\begingroup\$ OK, I had heard of the Mega but didn't know it had so many pins! Sounds like a great solution... \$\endgroup\$ Commented Jan 4, 2014 at 7:21

I woud answer your question about the old computer itself with no. But you can use interfaces or for example the Raspery Pi coud be the solution you are looking for. It has the low-level peripherals:

  • 8 × GPIO
  • UART
  • I²C bus
  • SPI bus with two chip selects
  • I²S audio
  • +3.3 V
  • +5 V
  • ground

and it runs with a Linus OS.

Look here for more details.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.