Pro-Lite PL-2100 Computer Interface
Update 2006-06-14: The schematic that was posted here before was incorrect in a couple of ways. (It left out the connections from the parallel port to the counter's preset inputs and tied the carry in pin high instead of low.) This has been fixed.
This is a circuit to replace the keyboard on a Pro-Lite PL-2100 scrolling LED display with a computer. The interface connects to the PL-2100 keyboard port and the computer's parallel port.
I got much helpful information about the interface from the website of Tim Petersen, who posted a schematic for a similar programmer along with a table of keycodes.
[top] Circuit
gschem PDF Postscript (gzipped)
[top] How it works
The actual keyboard is pretty simple. Like most keyboards, it (electrically) consists of a grid of wires with switches at the intersections. On the PL-2100 keyboard the columns (this choice is arbitrary, but we'll call them columns) are connected to the outputs of what amounts to a 16-bit serial-in parallel-out shift register (actually two daisy-chained 74LS164 8-bit shift registers).
The display supplies a clock signal and a "seed bit" signal to the keyboard. The clock signal alternates low for something like 500 nanoseconds and then high for about 22 microseconds. The seed bit is normally high and is connected to the serial input of the shift register.
When the display wants to scan the keyboard, the seed bit goes low for about 800 ns coincident with a clock pulse. Each subsequent clock pulse then shifts the seed bit through the shift register. This pulls low one column of the keypad. If a button is pressed, the corresponding row line will thus also be low. In this manner, the sign reads one column of the keypad at a time.
We want to pretend to be the keypad. The computer will send a row and column code to our circuit. When the circuit receives a seed bit that coincides with the sign clock going low, it will set a counter with the column value. The counter then counts down on every clock. When it gets to zero, it outputs the row code to the sign. The counter will then repeat, but the sign doesn't care; if it wants to scan the keyboard again, it'll output another seed bit and the counter will reset.
The 4029 is a popular and versatile, although rather old, counter. In this circuit, it's configured to count down in binary mode. One problem is that it's a CMOS device, so the parallel port, which uses TTL logic levels, may not be able to drive it. The sign's seed bit and clock are also probably TTL levels. In practice this hasn't been a problem for me. However, a 7400 series chip may be preferable. If you want to try this you'll probably want a 74191 or 74193. The carry out on these chips is not active for the entire clock cycle, so you may have to do some tweaking to get these to work.
The carry out line on the 4029 is connected to the output enable on a tri-state buffer (the 74541). When the counter reaches zero, the buffer is enabled and the row code is sent to the sign. There are five row lines, and they are active low. For some reason, the rows are labeled 4 through 8 on the circuit board inside the keyboard, and I have kept this same convention. To signal row 4, you send 01111; row 5 is 10111, row 6 is 11011, row 7 is 11101, and row 8 is 11110. When you want no key to be pressed, set all lines high (11111).
The parallel port has eight data lines. We need nine: four for the counter value (column address) and five for the row. I used D0 through D3 (pins 2-5) for the column address, D4 through D7 (pins 6-9) for the low bits of the row, and the /Auto Line Feed line (pin 14) for the high bit of the row address, which corresponds to row 4. (You could quite easily rearrange these things so that the high bit of the row address corresponds to row 8, which would make more sense.)
To simulate a keypress, just write the appropriate value to the parallel port, wait a bit, set all row lines high, and wait a bit more.
The sign does debouncing and keyboard auto-repeat, probably in firmware, which sets upper and lower bounds on speed. I got good results with both delays set to 50 milliseconds. 40 ms was a bit too fast. Auto-repeat seems to start after about 700 ms. You may have to do some experimenting to find out how fast you can get without missing input.
As an example, let's say I want to pres the PROGRAM key (row 4, column 6). Assuming we're starting with all of the row lines high, I would do the following steps:
- Set the /Auto Line Feed line low
- Write 0xF6 (high nibble all bits set, low nibble 6) to the parallel port data lines
- Wait 50 ms
- Set the /Auto Line Feed line high
- Write 0xFF to parallel port data lines (doesn't actually matter in this case.)
- Wait 50 ms
Now if I want to press 'Q':
- (Keep /Auto Line Feed high)
- Write 0xDF (D = 1101 = row 7, F = column 15)
- Wait 50 ms
- (Keep /Auto Line Feed high)
- Write 0xFF to the parallel port data lines (the low nibble doesn't actually matter; you could write 0xF0)
- Wait 50 ms
A downside of emulating the keyboard is that the keyboard interface was designed for humans, not computers. There are several problems with this:
- The computer can't tell what state the sign is. It's therefore difficult to place the sign in a known state prior to programming a new message. (Always sending DEMO before RUN/STOP will ensure that the sign is stopped unless it is in program mode or graphics editing mode initially. Doing this twice will work unless it is in graphics editing mode.)
- It's hard to program new custom symbols, because the interface for this only lets you toggle pixels, which means you need to know the initial state.
- The sign flashes while you're programming it. It should be easy to add a display blanking function.
Soon I'll post some python code for writing to the sign. I have it working now, but it needs more features before it's fully functional or even generally useful. In the meantime, you can try the Drop Day subversion repository.
