Hi my name is santhosh, i am trying to inerface printer(epson lx
300) with microcontroller. But the problem is i am getting junk
characters in the printing...
i have used 8 data lines,strobe and busy lines. I am using
parallel port to interface printer.
can any one help me..
examine your printer, first.
Nowadays, low-cost printers depend on Windows process
Before sending data to a printer, Windows device driver for the
printer renders page images. And then, compressed images are sent to
the printer. The printer just places dots on papers following the
images, like a copy machine. On this type of printers, you can't
print documents by sending ASCII character codes from your MCU like
in old days.
If your printer is this type, find an old printer.
The printer Epson LX300 sas two intefaces a Parallel(Centronics)
and a Serial(DB9)
It might be easier to interface the MCU to Printer using the serial
with typical settings as baudrate 9600, no Parity, 8 Data, 1 stop
The 8051 microcontroller has at least one serial interface and many
eqquipped with more. So the serial connection would be easier.
This printer can also print either ASCII or graphics using the ESCP/2
that is standard for so many years.
Some potential problems.
1) Wrong voltage levels.
2) Incorrect timing (settle and hold times)
3) Permutated data bits.
4) Bouncing signals.
5) Too high signal load.
Thanks for the reply, i am using old printer only..i have one
doubt. To sent commands like printer init.,printer select etc. we are
using ascii charecter and for data also we are using ascii char how
to diff. between data and commands. to diff. between data and
commands we any lines or any thing to be enabled.
The printer control codes starts with an unprintable ESC
The centronics port (36pin) uses 8data lines + 9control lines.
The control of BUSY and ACK is not enough for regular operation.
More control lines have to be observed, set to specific condition
and controlled to have the printer port work properly.
The standard for ESCP/2 is described here
Short description of the signals on the interface:
View all questions in Keil forum