Parallel/Serial Port Programming

Discussion in 'Mac Programming' started by kainjow, Nov 8, 2006.

  1. kainjow Moderator emeritus


    Jun 15, 2000
    I really want to learn how to do parallel/serial port programming on my Mac. Now I know I'd have to buy a USB adapter, but it seems like it's so much easier on PCs than it is on Macs.

    I just saw this article about a light show you can setup with a circuit board that connects to your Parallel port. If you look at the Linux source, it's very simple.

    I see that it uses ioperm and outb which seem to be Linux hardware IO commands. Is pretty much the only option for any type of port IO in Mac OS X limited to IOKit? If true, that seems like overkill for simple stuff.

    I am studying Computer Engineering so I have already done some basic Parallel port programming in Windows, but the thing I did was using a Win32 library specifically made for a certain board we were using.

    Any info would be appreciated.

    Edit: Oh and Keyspan has some sample code for accessing serial ports over USB. Maybe that's all I need? But can that be used with Parallel->USB adapters?

    Edit 2: I see this post which has some more info.
  2. HiRez macrumors 603


    Jan 6, 2004
    Western US
    I agree about PySerial. If you know any Python at all it's the way to go IMO.

Share This Page