If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Interfacing the printer port
Hi all,
My client has a device that prints to an Epson LX300+II printer. It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. The device output to the printer is using 11 wires, they are D0 to D7, GND, Busy and Strobe, going into a regular centronics type connector into the printer. I have mapped all pins to their identical on the PC. I was initially thinking a crossover like laplink, but realised that laplink uses 4 data bits rather than 8, so was not suitable. I am writing in C# and using inpout32.dll on Windows XP. My port is 0x378 I am having trouble when the device sends, to read it. At the moment, I have a loop just monitoring what is on 0x378, but it is missing the whole communication. I think I need to raise the busy line (re-map it to a output control line) but then how do I monitor the strobe? I think that needs to be mapped to an input line... however, I need C# to be able to respond to the strobe as an event. I have no idea how to do that... Also, I am assuming that it is ascii data that is sent to the printer (ascii on the data lines). Am I correct in this assumption? Any help would be greatly appreciated. -- Best regards, Dave Colliver. http://www.AshfieldFOCUS.com ~~ http://www.FOCUSPortals.com - Local franchises available |
#2
|
|||
|
|||
Interfacing the printer port
On Tue, 30 Nov 2010 12:36:52 -0000, "David"
wrote: Hi all, My client has a device that prints to an Epson LX300+II printer. It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. The device output to the printer is using 11 wires, they are D0 to D7, GND, Busy and Strobe, going into a regular centronics type connector into the printer. I have mapped all pins to their identical on the PC. I was initially thinking a crossover like laplink, but realised that laplink uses 4 data bits rather than 8, so was not suitable. I am writing in C# and using inpout32.dll on Windows XP. My port is 0x378 I am having trouble when the device sends, to read it. At the moment, I have a loop just monitoring what is on 0x378, but it is missing the whole communication. I think I need to raise the busy line (re-map it to a output control line) but then how do I monitor the strobe? I think that needs to be mapped to an input line... however, I need C# to be able to respond to the strobe as an event. I have no idea how to do that... Also, I am assuming that it is ascii data that is sent to the printer (ascii on the data lines). Am I correct in this assumption? Any help would be greatly appreciated. Have you looked at the avaiable refes for this printer? http://www.epson.com/cgi-bin/Store/s...odoid=63061037 |
#3
|
|||
|
|||
Interfacing the printer port
My client has a device that prints to an Epson LX300+II printer.
It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. This book is essential reading: http://www.lvr.com/parport.htm Jan Axelson's "Parallel Port Complete" Programming, Interfacing, and Using the PC's Parallel Printer Port It ought to clearly show - how to use the PC's parallel port in 8 bit input mode, accessing it via C# or other languages and operating systems - how the printer normally handshakes so you can tap the data by monitoring the data & strobe lines. A "data logger" or logic analyzer may help since they're external high speed devices that are now USB interfaced. |
#4
|
|||
|
|||
Interfacing the printer port
Thanks Jonas,
I had a look at the website and then followed the link to the codeproject article. The codeproject C# article only demonstrates outputting on the ports, however, I started reading the comments and one of the comments linked to http://moebiusit.com/blog/pabloroman...parallel-port/ I think this may do what I need... If I move the strobe wire to a status line, I should be able to use the strobe to "interrupt" the PC to be able to collect the data. It seems the strobe line is an output line, I need to be able to respond to a strobe rather than set it. It may not even need the strobe... I may be able to respond to just the changes on the data lines, but I think that is risky. Hopefully, my experimentation can be done from another computer set to print to the same type of printer. The actual equipment is about 75 miles (1.5 hours drive) away and I don't have the internet access that I would use to help me. -- Best regards, Dave Colliver. http://www.AshfieldFOCUS.com ~~ http://www.FOCUSPortals.com - Local franchises available "Jeff Jonas" wrote in message ... My client has a device that prints to an Epson LX300+II printer. It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. This book is essential reading: http://www.lvr.com/parport.htm Jan Axelson's "Parallel Port Complete" Programming, Interfacing, and Using the PC's Parallel Printer Port It ought to clearly show - how to use the PC's parallel port in 8 bit input mode, accessing it via C# or other languages and operating systems - how the printer normally handshakes so you can tap the data by monitoring the data & strobe lines. A "data logger" or logic analyzer may help since they're external high speed devices that are now USB interfaced. |
#5
|
|||
|
|||
Interfacing the printer port
On Tue, 30 Nov 2010 12:36:52 -0000, "David"
wrote: Also, I am assuming that it is ascii data that is sent to the printer (ascii on the data lines). Am I correct in this assumption? Epson ESC/P language. Google it for PDF refs. |
#6
|
|||
|
|||
Interfacing the printer port
Thanks,
Looking into it. -- Best regards, Dave Colliver. http://www.AshfieldFOCUS.com ~~ http://www.FOCUSPortals.com - Local franchises available "me" wrote in message ... On Tue, 30 Nov 2010 12:36:52 -0000, "David" wrote: Also, I am assuming that it is ascii data that is sent to the printer (ascii on the data lines). Am I correct in this assumption? Epson ESC/P language. Google it for PDF refs. |
#7
|
|||
|
|||
Interfacing the printer port
Hi Jeff,
I have now come up with another problem here, perhaps you might be able to enlighten me... I am programming on a laptop, which does not have an LPT port. I bought an Express card parallel port and was trying to interface directly to that. However, it is not working. I connected the card up to a laserjet to ensure that I had not blown the card and that came up, but it came up as USB003. Any idea how I might interact with the parallel port which is via a USB (Actually, an express card that is showing as USB)? Any help would be very much appreciated. -- Best regards, Dave Colliver. http://www.AshfieldFOCUS.com ~~ http://www.FOCUSPortals.com - Local franchises available "Jeff Jonas" wrote in message ... My client has a device that prints to an Epson LX300+II printer. It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. This book is essential reading: http://www.lvr.com/parport.htm Jan Axelson's "Parallel Port Complete" Programming, Interfacing, and Using the PC's Parallel Printer Port It ought to clearly show - how to use the PC's parallel port in 8 bit input mode, accessing it via C# or other languages and operating systems - how the printer normally handshakes so you can tap the data by monitoring the data & strobe lines. A "data logger" or logic analyzer may help since they're external high speed devices that are now USB interfaced. |
#8
|
|||
|
|||
Interfacing the printer port
My client has a device that prints to an Epson LX300+II printer.
It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. I have now come up with another problem here, perhaps you might be able to enlighten me... I am programming on a laptop, which does not have an LPT port. I bought an Express card parallel port ... Any idea how I might interact with the parallel port which is via a USB I'm afraid I've not yet programmed USB devices, so I'm unusure you can guarantee the response time without using some intelligence at the other end such as microcontroller. Perhaps a better approach would be to use a USB "Logic Analyzer" or "data logger" to capture the data since that's their intended purpose. A digital oscilloscope is overkill since you're capturing digital data. This one is open source and rather affordable and is on my "wish list" (I don't have one, yet) http://www.sparkfun.com/products/8938 That ought to speed up your progress. Keep us posted, for it's an interesting project you have on your hands. |
#9
|
|||
|
|||
Interfacing the printer port
Hi Jeff,
I have an idea... The logic analyser you suggest might take too long to get here (UK), plus it is prob a little too much (overkill) for me. I have been thinking laterally, I was trying to find things to do with parallel ports, but coming stuck everywhere. I changed my search to home automation usb and found a 16 line output, 16 line input device that will do almost what I want. I spoke to the designer and the main issue would be the strobe and the length of the pulse. The device can only poll down to about 20ms, where the pulse may only be 100us. However, I remember from my early days of playing with computer control, that I can use an octal latch. Feed the pulse straight into the latch and it latches the data, while I am reading it, I send a busy. Now, that should work all being well. In my program, I will read the data in, then handle the data with a thread. (I think I need to send the data to 2 files, one with the actual ascii text and one with the numbers generated, where I can't see the actual text, I can refer to an ascii chart to determine the numbers and control characters) -- Best regards, Dave Colliver. http://www.AshfieldFOCUS.com ~~ http://www.FOCUSPortals.com - Local franchises available "Jeff Jonas" wrote in message ... My client has a device that prints to an Epson LX300+II printer. It is not a computer, but an electronic measuring device. I need to capture the data coming from the device. I have now come up with another problem here, perhaps you might be able to enlighten me... I am programming on a laptop, which does not have an LPT port. I bought an Express card parallel port ... Any idea how I might interact with the parallel port which is via a USB I'm afraid I've not yet programmed USB devices, so I'm unusure you can guarantee the response time without using some intelligence at the other end such as microcontroller. Perhaps a better approach would be to use a USB "Logic Analyzer" or "data logger" to capture the data since that's their intended purpose. A digital oscilloscope is overkill since you're capturing digital data. This one is open source and rather affordable and is on my "wish list" (I don't have one, yet) http://www.sparkfun.com/products/8938 That ought to speed up your progress. Keep us posted, for it's an interesting project you have on your hands. |
#10
|
|||
|
|||
Interfacing the printer port
On 2010-12-03, David wrote:
I have been thinking laterally, I was trying to find things to do with parallel ports, but coming stuck everywhere. I changed my search to home automation usb and found a 16 line output, 16 line input device that will do almost what I want. I spoke to the designer and the main issue would be the strobe and the length of the pulse. The device can only poll down to about 20ms, where the pulse may only be 100us. However, I remember from my early days of playing with computer control, that I can use an octal latch. Feed the pulse straight into the latch and it latches the data, while I am reading it, I send a busy. Now, that should work all being well. That's the kind of thing you're probably going to need. I'd go further than that: you're probably going to need the BUSY line asserted in hardware until you de-assert it in software since you'll never achieve the latency you need otherwise. A year or two ago I built a serial to parallel converter that with a couple of wiring changes to the printer port and new software could be adapted to work in reverse - I'll send you my schematics and code if you want. However, some commerically available converters do that as standard, e.g. http://www.bb-europe.com/product.asp?SKU=232SPS2 For £80 I wouldn't think it worth assembling a unit and writing new code. -- Andrew Smallshaw |
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Printing: Parallel Port PC to USB Printer Port converter needed | ptrwrb | General Hardware | 1 | March 7th 05 05:10 PM |
tip: lpr printer to the router's printer port | lew@csus_abcdefg.edu | Printers | 0 | January 4th 05 02:28 AM |
IDE problem interfacing with 8051 | bob | General Hardware | 0 | April 29th 04 07:03 PM |
interfacing | avijitrintu | General Hardware | 0 | November 18th 03 08:06 PM |
interfacing PXA255 with peripherals | banu | Intel | 0 | August 11th 03 12:17 PM |