|
| |||||||||||||||||||||||||||
©2008 AirBorn
|
A serial to parallel converter using the AT89C2051The example program included with the PG2051 evaluation kit is a basic serial to parallel converter written in 8051 assembler. This is probably a good example of the uses to which an AT89C2051 can be put - it would be hard to get a serial to parallel converter much simpler than the single 20 pin IC in this circuit. The program is meant to serve as a useful example of 8051 serial routines and other programming, whether or not you actually need a serial to parallel converter.
The converter runs at 9600 baud, 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 example program should be assembled with the shareware assembler TASM. This is actually a very good assembler for 8051, 68HC11 and other 8 bit micro work, with 32 bit arithmetic, conditional includes, and multiple CPU support. There is also a linux version of the assember available from Squak valley software - and our PG2051 and PG8951 programmers will work well under linux. The example program was intended to run on the AT89C2051 in the prototype board supplied with the evaluation kit. 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.
Note the pin functions are not shown on the circuit, as the circuit is 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 three parts you should download (below). You are welcome to download and use the circuit for the evaluation board and the program, whether or not you purchase an AT89C2051 programmer and evaluation kit from AirBorn Electronics.
Serial to Parallel converterThe serial to parallel converter design is a free project - If you require quantities of these devices we can produce them for you in whatever format you require, with the features you require - our business is custom electronics. We can produce this device in a gender changer style case. The only downside is that you will need to produce more than 100 units to make the cost of custom design and manufacture (of this product) worthwhile. If you were after an RS232 to RS485 converter, we have this also. | ||||||||||||||||||||||||||