Do you like my hacking? If so, please consider leaving something in the
Fediverse (Mastodon etc): @Sprite_tm@social. spritesmods.com
To talk to the Laserjet, I decided on using the Centronics parallel port. I could have used the serial port too, but I remembered the parallel port protocol was easy to implement, and the Centronics-port was said to have a +5V from the printer available. That would help me a lot because I wouldn't have to find an external supply of power for the microcontroller.
For the microcontroller itself, I decided on my good old pal the ATTiny2313. I could have used an other avr, but I've got dozens of this type laying around and they're cheap enough, so I decided on this one.
The schematic is as simple as it gets:
The AVR is directly connected to a Centronics-connector which can be mated with
the socket on the LaserJet. Apart from the AVR, only a capacitor is needed to
filter the power supply.
The hardware itself was easy: I just took a Centronics-connector, an AVR, a 20-pin
IC-socket and a capacitor and soldered them all together to a nice and compact unit:
The firmware running in the AVR is almost trivial. The parallel Centronics-protocol is documented in many places, but basically, you have to wait till the busy signal is low, output the character you want to write on the data pins and then pull down /strobe for a ms or so. I use that routine to print a PJL-program to change the display messages to one of 18 messages, and display a new message every 2 seconds.