Serial to Parallel converter

Anyone got a serial to parallel converter lying around that they'd like to convert to beer tokens? I need to take in RS232 data at 9600 baud and bung it out to a Centronics equipped laser printer, so it's relatively low spec.

AWEM

Reply to
Andrew Mawson
Loading thread data ...

I have a feeling that my first laser printer had parallel *and* serial inputs. I presume you're sure that yours doesn't?

Is this a one-off job, or an ongoing requirement? I was wondering whether you could use a computer as the converter?

The only stuff I can see on Ebay is USB to serial or USB to parallel, but not what you need.

Reply to
Roger Mills

No definately only network and parallel

AWEM

Reply to
Andrew Mawson

Sir may like to peruse

formatting link

Reply to
Owain

Yes it's already on my watch list and I've messaged the seller, but as advertised it's parallel to serial not serial to parallel

AWEM

Reply to
Andrew Mawson

not got a spare old trashy PC you can convert to Linux then? and stick a serial parallel card in?

Reply to
The Natural Philosopher

Not really a very energy efficient solution though

Think of the windmills !

Reply to
geoff

Its one of those things that used to be common, but is now quite difficult to find at a sensible price. Black Box will do you one for £100 and up, but probably not really the sort of money you are looking for!

There is a DIY option:

formatting link
that, it would also be trivial to do on a PC, but that is a bit big for a fit'n'forget interface box!

Reply to
John Rumm

It's pretty simple if you have an old PC with QBasic. OPEN "COM1:9600,N,7,2,RS,CS,DS,CD" FOR RANDOM AS 1

and buffer whatever comes in.

Reply to
Jim Wilkins

Indeed, although its worth remembering that reading from the serial port using any technique that uses the BIOS serial comms routines, is often rather dissapointing in performance, and often results in occasional loss of characters - especially if you are running 3 wire with no handshaking (the serial input BIOS code is polled and makes no use of the FiFo (if present) - and so is frequently as much use as an ashtray on a motorbike). Having said that, its trivial to write your own ISR for it instead and sidestep the system code, then you can quite happily swallow 115k2 without handshaking.

Reply to
John Rumm

Well you can buy them, it appears from anywhere between a fiver and 20 quids depending on what you are doing. I did a search, but of course nobody seems to want to say whether they will actually work. The most common ones seem to use usb, not serial.

Brian

Reply to
Brian Gaff

No doubt you can set the baud rate on the source to limit overruns, but it's not difficult to program hardware or xon/xoff flow control. It's easier though just to limit the baud rate at source and most pc uarts have a fifo these days anyway.

I would write it in Borland or Watcom C, both free, where you have support for flow control in the serial line library functions, but that's just my own preference.

As another option, I have hp 1630g and hp16500A logic analysers in store which do have hpib interfaces and the 16500A has also has the option of selecting hp laserjet printer via serial interface...

Regards,

Chris

Reply to
ChrisQ

Do they allow you to read and write the I/O address space, such as the parallel port data, control, and status registers beginning at hex

378?

I've stayed with QBasic under DOS because Windows polls the port and hampers using it to control external hardware, which I need more than a pretty user interface. Visual Basic dropped the INP and OUT instructions.

jsw

Reply to
Jim Wilkins

Indeed its easy if you write all your own low level code and bang the hardware directly. I was just highlighting it does not work well if you use a IO stream abstraction that ends up using the ancient Int 14 IO routines in the BIOS.

I toyed with the idea of buying a 1630g on ebay the other day (went for £56) ;-)

Reply to
John Rumm

Linux has proper interrupt driven drivers for serial and parallel. So all you need is a straight distro install and then write a silly little daemon that does wait, fetch, and push, on the ports.

Probably about 20 lines of C, if that.

>
Reply to
The Natural Philosopher

so has windows - we are talking 25 years ago in DOS!

Reply to
John Rumm

Reply to
Andrew Mawson

yebbut windows comes with windows that needs at least 512Mb or ram to pain the window. And kernel memory leaks which gobble that all up in a week or so. And costs money

You can run a linux to do this in less than 128M of RAM..no windows..no memory leaks.

DOS would be better than windows but its more work.

Reply to
The Natural Philosopher

A dozen years ago perhaps... Win 2K onward will run for months without a problem. 512MB machines up to the task, can be had for next to nothing these days... (in fact I have enough left over parts here to build a few for nothing)

Linux or any modern OS will also do it obviously, but old 128MB machines are likely to be getting too geriatric to be reliable now unless you are talking about new hardware.

A cheap linux based print server with serial and centronics ports could likely be hacked about a bit to do the business.

Not true these days. Decent async libraries are available for nothing (like Turbopower's Async Pro), and with that, comms "glue" jobs like this are trivial and don't require detailed hardware knowledge. To do it under DOS without a library is not that difficult, but only if you have experience of low level hardware programming.

(windows has not really had any problem with high speed serial comms since win 3.1 on a moderate 486. I once had a P90 box running win 3.1 doing 9600 bps *synchronous* serial comms without any additional hardware - doing all the bit by bit clocking in software using the handshake lines on the serial port for data and clock reception - with no data loss problems. It generated and extra 10,000 interrupts per second mind you ;-))

Reply to
John Rumm

If your printer has a network connection then surely this would be the easiest?

Reply to
Mark

HomeOwnersHub website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.