The other night I came across a 7-segment LED display and decided to interface it to a parallel port. I added a button as well. The 7-segment LED lines (each leg of the display plus the dot LEDs) are connected to the parallel port data pins (D0-D7). I have the button hooked up to nInitialize (bidirectional) and nAck (input only). I've never done a parallel port interface project before, so I figured this would be a good start.
I wrote some quick prototype software in Perl, of all languages. It requires Device::ParallelPort for parallel port access, which for some reason didn't work well with writing data bytes, so I had to resort to doing everything bit by bit in software. For the switch, I bring nInitialize down, and poll nAck for changes. When nAck goes low, the switch has been pressed.
Actually the idea from the start was to make a New Message email checker on my desk. I'd like to be able to press a button and get a report of new email messages on the LED display. I achieved exactly that with the Mail::POP3Client module for perl. It works well, but for some reason I couldn't get IO::Socket::SSL working in Windows ActiveState perl, so it doesn't work with POP3 servers where SSL is required (Gmail). Other than that, it works perfectly.
If there are more than 9 new messages, it displays a 9 with the dot, otherwise it shows the number of new messages on the LED display. When it is connecting and checking the email, only the dot is displayed. When there is an error connecting or retrieving the number of new messages, an 'E' character with a dot is displayed. I would record a mini video demo but I just can't seem to find a parallel port cable extension.
If you would like to take a look at the Perl code, feel free to download it here: POP3 New Messages Checker with 7-Segment Display in Perl