Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Looking for resources on printing ascii codes

Not open for further replies.


Newbie level 1
May 31, 2005
Reaction score
Trophy points
Activity points
ascii codes serbian

hi, i have to do a system prints ASCII characters typed in the keypad by using 89C52 MCs. i need some documents about it and conneting printer . pls help?

printing ascii codes

Have you chosen a printer?

If you want to use a printer intended for use with a PC you will have to use one with a parallel or RS232 serial interface. Your microcontroller can't be a USB host on it's own.

The PC parallel printer interface is well documented. Google. There is plenty of information on the web.
There are books such a "parallel port complete".

printing ascii codes

i havent chosen a printer yet.

the system consists of only keypad, microcontroller circuit which i will design and printer, not with PC. i have learnt that i have to use parallel port but this time, i dont know if there is any commands for using printer.

printing ascii codes

At minimum you will have to connect the 8 data lines and the strobe line of the printer to your microcontroler.

You can use the busy line or just have a small delay between sending characters.

Here is a page with a description of SPP mode.

**broken link removed**

Re: printing ascii codes

That sounds pretty compicated. An OS does an awful lot in sending data to a printer. Does your printer have any documentation on the low-level stuff needed for interfacing to it? Nowadays a lot of companies like to hide that stuff and give the info out to companies they feel certain have a need for it. I guess the reasoning is, one of the ways to make equipment idiot-proof is to keep it out of the reach of idiots. I found this out when trying get low-level stuff on Creative Labs SoundBlaster DSP. They wanted to see my company site and so on. Never got the info I wanted.

Re: printing ascii codes

That sounds pretty compicated.

It isn't.

An OS does an awful lot in sending data to a printer.

The complication is in stuff like stuff like different fonts and graphics.

Printing letters and numbers using the printers character set just
requires sending ascii characters to it in most cases.

Dot matrix printers buffer one line of text. It will print the entire
line in one go when it has received a full line or it is sent line-feed
and carridge-return characters.

Other printers will print a whole page at once. Sending ascii character
0x0c will make it print the page and start on the next sheet of paper.

Most printers with a parallel interface will print text when sent ascii
codes. There are a few printers around which are "GDI printers" aka
"winprinters". The pinter is made cheaper by having less intelligence
in it. The windows driver tells the printer what dots to print using
an undocumented protocol.

Not open for further replies.

Part and Inventory Search

Welcome to