A computer components & hardware forum. HardwareBanter

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.

Go Back   Home » HardwareBanter forum » General Hardware & Peripherals » Printers
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Interfacing the printer port



 
 
Thread Tools Display Modes
  #11  
Old December 5th 10, 02:20 PM posted to comp.periphs.printers
David[_24_]
external usenet poster
 
Posts: 9
Default Interfacing the printer port

Thank you. I have sent them an email describing my scenario and asking if
their device will be suitable for my uses.

I had spent ages looking for something like this. I had found one, but it
only seems to be available in USA and Australia. I had found another device
that appears to do what I need, however, it is very expensive.

I went to buy the extra components from Maplin yesterday, they are really
dropping their electronic component lines and appear to be concentrating on
the consumer electronics. No more components for the hobbyist now. I used
to use a 74LS373 many years ago. They only have 74HC373, while stocks last
and none in the stores.

A bit bad really.
--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"Andrew Smallshaw" wrote in message
.. .
On 2010-12-03, David wrote:


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




  #12  
Old December 5th 10, 10:17 PM posted to comp.periphs.printers
Bob Eager
external usenet poster
 
Posts: 116
Default Interfacing the printer port

On Sun, 05 Dec 2010 13:20:33 +0000, David wrote:

I had spent ages looking for something like this. I had found one, but
it only seems to be available in USA and Australia. I had found another
device that appears to do what I need, however, it is very expensive.


If you get up a £50 order (!), Digi-Key are really good and it'll be free
carriage. Order one day, get it second working day after (by UPS from the
USA!)

http://www.digikey.co.uk/

I went to buy the extra components from Maplin yesterday, they are
really dropping their electronic component lines and appear to be
concentrating on the consumer electronics. No more components for the
hobbyist now. I used to use a 74LS373 many years ago. They only have
74HC373, while stocks last and none in the stores.


Useless - and expensive.

Try Rapid Electronics too...they aren't too bad for a lot of stuff.

http://www.rapidonline.com/
--
Use the BIG mirror service in the UK:
http://www.mirrorservice.org

*lightning protection* - a w_tom conductor
  #13  
Old December 7th 10, 05:12 PM posted to comp.periphs.printers
David[_24_]
external usenet poster
 
Posts: 9
Default Interfacing the printer port

Hi Jeff,

Does windows require any signals coming in to let it know that a printer is
there?

I have connected just 11 lines... namely,
/STROBE
D0 - D7
BUSY
GND

However, when printing from windows, I am getting an initial /strobe and
data, but nothing else. (That is probably actually just the connection when
I connect the cable).

My printer queue (windows 7) just says "Error - Printing".

I am wondering if windows is expecting anything else coming into it, for
example, paper error, select out, slet in (whatever that is...) or any other
lines?

--
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.




  #14  
Old December 9th 10, 12:14 AM posted to comp.periphs.printers
Fred McKenzie
external usenet poster
 
Posts: 158
Default Interfacing the printer port

In article ,
"David" wrote:

Does windows require any signals coming in to let it know that a printer is
there?

I have connected just 11 lines... namely,
/STROBE
D0 - D7
BUSY
GND


David-

As I understand it, the computer uses the STROBE line to signal the
printer that data on D0 - D7 is valid. The printer then uses the BUSY
line to keep the computer from sending more data while it is processing
the current data. When the BUSY line is reset, the computer can send
more data as soon as it is ready to do so.

If the BUSY line is never active, the computer might be programmed to
wait for a time-out period in case the printer is not connected.

I don't know the polarity of STROBE or BUSY. Does /STROBE indicate it
is active low?

Fred
  #15  
Old December 9th 10, 09:06 PM posted to comp.periphs.printers
David[_24_]
external usenet poster
 
Posts: 9
Default Interfacing the printer port

I sort of have it working, but it is incredibly slow...

I have set up a Generic / Text only printer on my Win7 machine and am
reading the data on my XP machine via a USB input output device.

The /Strobe is normally high, but flicks low to tell the printer that data
is on the bus.

It seems that strobe is held low until a busy (high) is received. However,
as I am polling my I/O device (no other way, as it doesn't have an
interrupt), I appear to be missing the strobe, but I have worked another way
around it. (What I ended up doing is I needed to know I was in the same
character, the only way I could do that was electronically rather than
programmatically, I ended up tying the BUSY (output line on my USB) to a
spare input line (on my USB), so that I know that while I have a high on my
local busy, I don't attempt to poll the next character)

I was getting something like....


TTTTTThhhhiissssss isssssaaaaa eeeest

(This is a test)

However, I am now getting the proper text, but for some reason, it is
incredibly slow. I will look at speeding it up somehow.

--
Best regards,
Dave Colliver.
http://www.AshfieldFOCUS.com
~~
http://www.FOCUSPortals.com - Local franchises available


"Fred McKenzie" wrote in message
...
In article ,
"David" wrote:

Does windows require any signals coming in to let it know that a printer
is
there?

I have connected just 11 lines... namely,
/STROBE
D0 - D7
BUSY
GND


David-

As I understand it, the computer uses the STROBE line to signal the
printer that data on D0 - D7 is valid. The printer then uses the BUSY
line to keep the computer from sending more data while it is processing
the current data. When the BUSY line is reset, the computer can send
more data as soon as it is ready to do so.

If the BUSY line is never active, the computer might be programmed to
wait for a time-out period in case the printer is not connected.

I don't know the polarity of STROBE or BUSY. Does /STROBE indicate it
is active low?

Fred



  #16  
Old December 12th 10, 06:26 AM posted to comp.periphs.printers
Andrew Smallshaw
external usenet poster
 
Posts: 115
Default Interfacing the printer port

On 2010-12-09, David wrote:
I sort of have it working, but it is incredibly slow...

I have set up a Generic / Text only printer on my Win7 machine and am
reading the data on my XP machine via a USB input output device.

The /Strobe is normally high, but flicks low to tell the printer that data
is on the bus.

It seems that strobe is held low until a busy (high) is received. However,
as I am polling my I/O device (no other way, as it doesn't have an
interrupt), I appear to be missing the strobe, but I have worked another way
around it. (What I ended up doing is I needed to know I was in the same
character, the only way I could do that was electronically rather than
programmatically, I ended up tying the BUSY (output line on my USB) to a
spare input line (on my USB), so that I know that while I have a high on my
local busy, I don't attempt to poll the next character)

I was getting something like....


TTTTTThhhhiissssss isssssaaaaa eeeest

(This is a test)

However, I am now getting the proper text, but for some reason, it is
incredibly slow. I will look at speeding it up somehow.


I see two reasons for that: firstly you are not acknowledging the
bytes sent - not all host interfaces check them but ISTR the Windows
driver for a standard prallel port is one that does. That means
it has to time out before sending a new byte.

Secondly you don't say what you mean by your "USB" but I assume
you mean a general purpose interface board. That is going to cause
issues in and of itself. USB is not very fast when it comes to
latency - don't expect anything to happen faster than a couple of
milliseconds. If you want to do this via polling the polling
frequency must be fairly fast - 2MHz or greater - and quite simply
USB is not up to the job.

The way I would suggest therefore needs some additional logic to
make up for the deficencies of your interface. For a start I would
drop an octal latch or D flip flop in there so you grab hold of
the data when the strobe is lowered. I would also hook up the
strobe line to an SR flip flop - you can check if it is set to see
if a character has been resceived and then reset it via software.
I'd also use that flip flop output to drive the BUSY line so that
is asserted automatically until you clear it. You may be able to
get away with a software controlled acknowledge line but I'd be
tempted to drop in a monostable triggered by the falling edge of
the BUSY signal - a 555 should be perfectly up to that job.

--
Andrew Smallshaw

  #17  
Old December 12th 10, 11:21 AM posted to comp.periphs.printers
David[_24_]
external usenet poster
 
Posts: 9
Default Interfacing the printer port

Hi Andrew,


I see two reasons for that: firstly you are not acknowledging the
bytes sent - not all host interfaces check them but ISTR the Windows
driver for a standard prallel port is one that does. That means
it has to time out before sending a new byte.



I am sending an ACK back, I wouldn't have done because the equipment I have
to connect to doesn't require it (no wire), but for testing against Windows,
I had to put it in.

I think what it actually was is the polling and as it used the
System.Threading timer rather than the regular timer, I couldn't pause it as
easily, so it kept polling.

What I have now is an input line connected to my BUSY (ouput) line and am
monitoring that. I have changed my timer and am able to stop the polling
while reading.

I am going to see if I can optimise it programmatically. When I say SLOW, I
mean... It is taking something like 1 second per character. It should NOT be
that slow.


Secondly you don't say what you mean by your "USB" but I assume
you mean a general purpose interface board. That is going to cause
issues in and of itself. USB is not very fast when it comes to
latency - don't expect anything to happen faster than a couple of
milliseconds. If you want to do this via polling the polling
frequency must be fairly fast - 2MHz or greater - and quite simply
USB is not up to the job.



My USB is an input/output interface. I know it is fairly slow, but I didn't
realise it would be THAT slow. The designer told me the fastest I could
probably drive it is about 20ms.



The way I would suggest therefore needs some additional logic to
make up for the deficencies of your interface. For a start I would
drop an octal latch or D flip flop in there so you grab hold of
the data when the strobe is lowered. I would also hook up the
strobe line to an SR flip flop - you can check if it is set to see
if a character has been resceived and then reset it via software.
I'd also use that flip flop output to drive the BUSY line so that
is asserted automatically until you clear it. You may be able to
get away with a software controlled acknowledge line but I'd be
tempted to drop in a monostable triggered by the falling edge of
the BUSY signal - a 555 should be perfectly up to that job.



Yeah, I was trying to buy a 74HC373 from maplin, but they are stopping
stocking it now. I have found another that might work similarly, but not
sure. 74HC573

I don't know what an SR flip flop is.

I think this might be getting a bit too complicated now. Last time I played
to this level (and deeper) of electronics was 20 years ago, though I guess I
am going to have to get my brain into gear and learn it again to solve this
problem.

Thanks to everyone for their advice so far. I will keep you all updated.

Regards,
David.


  #18  
Old December 18th 13, 04:24 PM posted to comp.periphs.printers
[email protected]
external usenet poster
 
Posts: 1
Default Interfacing the printer port

On Tuesday, November 30, 2010 7:36:52 AM UTC-5, 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.


Hello All -

I have a similar situation as David - I have a device printing to the same printer and I'd just like the data ( now being sent to the printer ) to end up in an excel spreadsheet - a csv file would work too -
It's just ascii text I am trying to capture - does anyone know of a converter I can use ? I do not have time to build anything - thanks

Marty B. PA USA -
  #19  
Old December 19th 13, 04:20 AM posted to comp.periphs.printers
David H. Lipman
external usenet poster
 
Posts: 408
Default Interfacing the printer port

From:

On Tuesday, November 30, 2010 7:36:52 AM UTC-5, 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.

Hello All -

I have a similar situation as David - I have a device printing to the same
printer and I'd
just like the data ( now being sent to the printer ) to end up in an excel
spreadsheet - a
csv file would work too - It's just ascii text I am trying to capture -
does anyone know
of a converter I can use ? I do not have time to build anything - thanks

Marty B. PA USA -


You can't print to an XLS. You may be able to generate a pure ASCII output
in a CSV format. What you have to look at is what is generating the data
and to use OLE or WMI or other OS construct to extract the data or generate
the output as desired.

--
Dave
Multi-AV Scanning Tool - http://multi-av.thespykiller.co.uk
http://www.pctipp.ch/downloads/dl/35905.asp

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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 06:10 PM
tip: lpr printer to the router's printer port lew@csus_abcdefg.edu Printers 0 January 4th 05 03: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 09:06 PM
interfacing PXA255 with peripherals banu Intel 0 August 11th 03 12:17 PM


All times are GMT +1. The time now is 12:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 HardwareBanter.
The comments are property of their posters.