| ??? 02/20/01 10:49 Read: times |
#9477 - RE: Interface a 8051 to a Printer |
I have managed to locate the programmer manual for Espon Stylus 800
at the following URL: http://support.epson.com/hardware/...ation.html Since my office have that printer, so I will just try out that first and see how things go from there. Since I do not have a 8052 debugger or emulator, I try to program my parallel port to control the printer instead of using a 8052. After that, it's easier for me to port to 8052 in assembly. However, the program still did not work at all. Sigh.......:( The following is my code : #include <stdio.h> #include <string.h> #define BASE 0x378 #define data BASE // SPP Data #define status BASE+1 // SPP Status #define control BASE+2 // SPP Control #define NULL 0 // Null Character #define ESC 27 // Escape key #define LF 10 // Line Feed #define FF 12 // Form Feed #define CR 13 // Crash Return void send (unsigned char); void main () { unsigned char message[] = "This is Andy working hard on this printer !", counter; outportb(control, 0x00); // Init all control signal send(ESC); send('@'); // Init printer code for (counter = 0; counter < strlen(message); counter++) send(message[counter]); send(CR); // Crash Return send(LF); // Line Feed send(FF); // Purge out the page send(ESC); // Reset the printer once more send('@'); } void send (unsigned char content) { outportb(data, content); // Float data on bus outportb(control, 0x01); //Assert the active low STROBE Signal outprotb(control, 0x00); //DE-assert active low STROBE signal } |
| Topic | Author | Date |
| 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 |



