One comment on “Retrochallenge: 6522 Parallel Communications

  1. This sounds very much like a thing I did for Inframetrics (now FLIR Boston) on a college internship back in ’97.

    Feel free to TL;DR this; just thought it might be interesting.

    Story is their flagship infrared camera, the Infracam (an earlier incarnation of which had been used in the original Predator movie) had a 9600 baud serial port they were using to send data to flash the firmware and calibration data. But at that speed it took way too long for their production people to set up and test cameras for each update. So they were all like, hey, this camera has a PCMCIA slot, why don’t you figure out a faster way to send data from a (Windows 95) PC?

    The trick was, all parallel ports were different (might still be the case) in terms of what lines you could read and write to, beyond the standard ones. So I had to come up with a multi-stage handshake protocol where it figured out whether it could do 4 or 8 bits at a time and whether it could do full or half duplex. I had them make me a custom cable so that as many pins on one side that were likely to support reading were connected to as many on the other side that supported writing.

    Long story short, I ended up not going with an interrupt-driven arrangement. Instead, I wrote in blocks, with the block length at the front. Once communication had started, both sides were in a busy loop with the sender putting data on the line and raising a signal bit, the receiver reading the data off the lines, writing any back-channel data to its output lines, and raising its own signal bit, then the sender lowering and then the receiver lowering. (I’m pretty sure some of the back-data was CRC checks, but it was a long time ago.) Both sides were basically busy-waiting during the interaction but it was very, very fast.

    Not sure if that’s interesting or useful, but your post reminded me of the story.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s