PDA

View Full Version : CP/M 2.2 and an Espon Parallel printer



Mike_Z
April 15th, 2016, 09:30 AM
The other day, at a garage sale, I picked up an Espon FX86 printer. I finally got the printer to work. I'm interested in connecting this printer to my CP/M 2.2 machine. I have a 8255 PPI on my 8080 computer that I plan on using.

I'd like to know whether or not I'm thinking this out correctly? Is the best way to handle this in CP/M to use the I/O BYTE? Then change the LIST and LISTST of the CBIOS to check the I/O BYTE to redirect the output to either my serial printer or this new parallel printer?

Thanks Mike

Chuck(G)
April 15th, 2016, 10:09 AM
That's the more-or-less standard way, but to my knowledge, the implementation of IOBYTE by a CBIOS was always optional. It gives somewhat more flexibility, however.

Look at the CP/M alteration guide. The example CBIOS illustrates how to use IOBYTE in your CBIOS. Basically, it's a matter of indexed jumps, nothing more. Some of the entries for the LIST device are, of course, going to be no-ops (i.e. you can't read or get input status from a printer!).

EDIT I'd recommend that you buffer the output of the 8255--it's not particularly suited for long-cable driving otherwise. It would probably work unbuffered, but an LS240/241/244 (take your pick) is certainly cheaper if you zap it than an 8255.

MicrocomputerSolutions
April 15th, 2016, 11:12 AM
I'm into doing things the easy way when possible.

Have you had a serial printer working on your computer already? If so, why not just buy a serial to parallel printer buffer, and let the buffer do the work? A print buffer will speed your computer's I/O operation by allowing the system to work more seamlessly with the computer not waiting to send little bits to the printer (send larger chunks to the buffer at one time instead.

Of course the big bonus is not having to write the code to make a parallel port work with the Epson printer (unless you like that kind of thing).

Mike_Z
April 17th, 2016, 09:21 AM
MS, the serial to parallel buffer is a good idea, but I could not find one in my price range. Being on a very low budget for computers, I'm going with the 8255 PPI.

I do have a serial printer that works fine with the 8080 CP/M machine. It's a teletype Model 43, but the ribbons are very difficult to find, although I have successfully re inked them. And the paper is odd sized and expensive.

I figure that I'll just change the LIST and LISTST routines in my CBIOS to check the IOBYTE. If it is zero (normally) I will use the serial port. If set to LPT, I'll jump to the parallel port routines.

After looking at the Espon wiring, there are some inputs from the printer to check for ready to print. I figure that the Parallel LISTST would check for BUSY=low, ACK= HIGH, ERROR= HIGH and PE (out of paper) = LOW. If these indicate ready, the routine will return a 1 and if not ready a zero. Then the Parallel LIST routine will just output the data. Very similar to the serial requirements.

Chuck, interesting that you mention buffering the output of the 8255. I have two 8255's in my machine (both not buffered) and use them for experimenting with controls. Most times I have no trouble, but occasionally there are some flakey operations. I wonder if this trouble is because of the non buffering. I'll try adding buffers to one of the 8255 and watch it to see if it works better.

Thanks Mike.

Chuck(G)
April 17th, 2016, 09:30 AM
Most of the problems that I've had with 8255s were with driving longish cables. A buffer took care of that in all cases, though maybe you could alleviate the problem with some pullups as well. The 8255 is a very old IC, so I wouldn't really expect much using the outputs "naked".

An interesting aside is that if you look at the 5150 BIOS listing, they refer to the parallel port in a couple of places as an 8255. That probably was the original plan--and maybe why the PC parallel port is quasi-bidirectional.