Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
02/24/01 00:30
Read: times


 
#9573 - RE: Interface a 8051 to a Printer (Alex)
First of all, I think you need to go to epson website to search for the respective printer programmer manual.

OKay, the following example is for my printer Epson Stylus Color 800.

- Reset the printer pin 16 "Init", it's an active low signal.

-Make sure all the signal is in place which means it must be in it's standby mode.

pin 1 strobe : High
pin 16 init : High
pin 10 ack : High
pin 11 Busy : Low

-Just before you send any data to the printer, check that the busy line is low

-If Busy low, float a byte of data on the data bus plus an active low strobe of about 500ns on pin 1(based on Epson Singapore branch).

-this step is optional cause the printer has some amount of buffer in it.
Before you send the next byte into it, wait for acknowledgement receipt (an active low signal from pin 10) from the printer.

-That's basically end the cycle of a single byte transmission.

Okay, the question is what to send to the printer pior the data. For MY CASE,
the following data :

#define ESC 27

unsigned char

reset_printer[] = {ESC, '@'},
char_width[] = {ESC, 'P'},
right_margin[] = {ESC, 'I', 80},
left_margin[] = {ESC, 'Q', 10},

so in your code, you can create a function that send a byte of data to the printer. So you just send the above code to the printer in sequence than follow by your data.

REMEMBER, always send "Carriage Return" follow by "Line Feed" to printer after every LINE OF DATA.

send(data);
send(CR);
send(LF);

send(next_line_of_data)
send(CR);
sned(LF);

At the end of everything, remember to send "reset_printer" code to the printer again.

Wow ! So sorry for being long winded.
Hope it helps you in one way or another.

Best Regards
Andy

List of 14 messages in thread
TopicAuthorDate
Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
   Help!! Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      
Interface a 8051 to a Printer            01/01/70 00:00      
RE: Interface a 8051 to a Printer (Alex)            01/01/70 00:00      
RE: Interface a 8051 to a Printer (Alex)            01/01/70 00:00      
RE: Interface a 8051 to a Printer            01/01/70 00:00      

Back to Subject List