Apollo the pig

A serial to parallel converter using the AT89C2051

This page describes a serial to parallel converter that was originally included as part of our PG2051 evaluation kit. It is a basic serial to parallel converter written in 8051 assembler, and is written in the format of an example or tutorial. The circuit, gerbers and software - everything you need to build the project - are here. It would be hard to get a serial to parallel converter much simpler than the single 20 pin IC in this circuit.

The 89C2051 evaluation board is also documented in our circuits library.


The converter runs at 9600 baud, 89C2051 and outputs each byte received on a centronics style parallel port, together with a nominal 50 microsecond strobe. The converter buffers up the bytes received if busy is active, and is bidirectional - when the sample switch is pushed, the converter samples the parallel port and transmits the value back out the serial port. All the parameters are adjustable in the code.

The firmware provided should be assembled with the shareware assembler TASM. This assember is actually a very good assembler for 8051, (and other 8 bit micros) with 32 bit arithmetic, and a linux version available. TASM is produced by Squak valley software.

The serial-to-parallel example program was intended to run on an AT89C2051 using the prototype board that was originally supplied as part of the evaluation kit in our programmer. But the circuit is pretty darn simple, and a competent electronics person could build one up themselves, by hand, if they need to. The code should run on any 8051 target with modification to the port locations - the equates for the pin & port locations are near the start of the code.

Serial-parallel PCB

Note the pin functions are not shown on the circuit, as the circuit was intended to be a general purpose evaluation board, not just a serial to parallel converter. The pin functions and a good thorough description are included in the firmware which is one of the parts you should download (below).

You are welcome to download and use this material, but if you publish something useful with it, please include a link back to this web page as an attribution.

Serial to Parallel converter

Serial to parallel PCB

©2013 AirBorn - Last updated 27 April 2013