We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hello, I have interfaced a centronics dot matrix printer with the 8051 controller. I am able to print the text on it. Now I have a application in which I have to print a graph using its graphics mode on to it. How can we print a graph using the dot matrix printer through a microcontroller. Also, what is the ASCII code for the form feed (FF) character? Regards, Mohit
Printing graphics is matter of the printer. Usually a printer has some sort of ESC sequences that will be used to send commands to that printer, like switching between text and graphics mode. You should refer to the software manual of the printer.
Hi, By ESC sequences, what exactly is meant? suppose the manual says that to reset the printer, the sequence is ESC @ then which codes are to be sent. What is the ascii code for ESC that is to be sent? Mohit
ESC is an ASCII character. The code for it is 27(decimal) or 1B(hex). @ is also an ASCII character. The code for it is 64(decimal) or 40(hex). Jon
Doesn't the printer manual contain an ASCII table somewhere? Maybe as an appendix?
In the ASCII table, only the ascii symbols are given. It doesn't specify which is the ascii symbol for CR etc.
Hi Mohit! Well, there is more than just the ascii table. Usually there are some kind of escape sequences to send commands to a printer, like switching to bold or italic and also for switching to graphic mode. After switching for graphic mode, the graphic data is transmitted byte by byte to the printer (usually there is another escape sequence that will tell the printer,. how man bytes of graphic will follow for each line). These escape sequences don't follow a standard, they can be different for every sort of printer. I haven't done that printer programming in a long time now, so I don't know, if these escape sequences are shown in the printer manuals anymore. Maybe you have to contact the company that is building the printer you want to use. There are some quasi-standards though like HPGL (which is a plotter language) or HP-LaserJet, which probably all work in a pretty similar way. Good luck Sven
That's very unhelpful of them - giving you an incomplete ASCII table! It's impossible to drive a printer without knowing all those "device-control" code like CR, ESC, FF, etc.
Don't you have an ASCII table at hands? Don't worry, there's a lof of tables online on the web... http://www.asciitable.com/
Form feed - 0Ch Line feed - 0Ah Carriage return - 0Dh on some printers you need to send both CR & LF, or ther is usually a switch setting that interprets a CR as a CR & LF.
Dear Sir; hi; I want to need assembly routine of 8051 for Dot matrix printer driving. Could you help me in this regards; regards; Baig