RetroBrew Computers Forum
Discussion forum for the RetroBrew Computers community.

Home » RBC Forums » General Discussion » Parallel Printer Port driver for Z80 (Looking for Z80 assembler code example)
Parallel Printer Port driver for Z80 [message #9820] Wed, 16 March 2022 14:17 Go to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi

I am looking for Z80 assembler code example for a parallel printer port driver. This is for the Z80 PRINT V1 board just introduced for the Z80 MBC. Hopefully this code will be incorporated into RomWBW to support IBM PC compatible LPT: (aka Centronics)

This particular parallel port is implemented using discrete logic chips although there are several ways to implement such as using a PPI, PIO, etc. What I would like to capture is the parallel port protocol for handshaking with the parallel printer or other device

Any help greatly appreciated, Thanks, Andrew Lynch
Re: Parallel Printer Port driver for Z80 [message #9821 is a reply to message #9820] Thu, 17 March 2022 02:56 Go to previous messageGo to next message
phil_g is currently offline  phil_g
Messages: 32
Registered: November 2020
Member
This was discussed recently on the RC2014 group if its of interest: https://groups.google.com/g/rc2014-z80/c/IFp3S_yX4ws
Phil
Re: Parallel Printer Port driver for Z80 [message #9822 is a reply to message #9821] Thu, 17 March 2022 04:58 Go to previous messageGo to next message
lynchaj is currently offline  lynchaj
Messages: 1080
Registered: June 2016
Senior Member
Hi Phil
Thanks! That will help quite a bit. Even though the hardware is somewhat different the protocol should be the same and that's what I am seeking.

The Z80 PRINT V1 board is based on a IBM PC compatible bi-directional 25 pin parallel port built from discrete logic chips rather than a PIO.

This is the same circuit as is present on the ECB CVDU board if people remember it. I don't think anyone ever wrote driver software for the parallel port on the CVDU which is a shame but understandable since parallel printers have gone obsolete for some time now. If anyone does have a parallel port driver for CVDU please let me know.

https://www.retrobrewcomputers.org/forum/index.php?t=msg&th=568&goto=9514&#msg_9514

Thanks, Andrew Lynch

PS, the rest of the parts I needed for the Z80 PRINT V1 board arrived yesterday so I can finish building mine. Looking forward to some testing
Re: Parallel Printer Port driver for Z80 [message #9823 is a reply to message #9822] Thu, 17 March 2022 18:34 Go to previous message
cluso99 is currently offline  cluso99
Messages: 40
Registered: June 2017
Member
Andrew,
The centronics interface is just a plain 8 bit parallel interface with a couple of pins for handshaking. There is no protocol as such. You just send the characters in ASCII to be printed and terminate with <cr> or <Cr><lf> depending on the printers' settings.

There are two ways for handshaking. Once you set the valid 8bit data out you strobe the data available pin (sorry, cannot recall precise naming) and then you either look for Busy to complete, or look for the data ack strobe to indicate completion of the character transfer. Either method works. Search for a Centronics protocol description - this is a standard that all printers comply with - I interfaced many of these to the mini I worked with in the 80's.

<ff> will advance the paper to TOF (top of form) although this may require a VFU (vertical format loop - used to be done with a punched paper tape loop on older printers) loop to be soft loaded, and this mechanism is often specific to the printer.

Some printers have extra character sets which can use the 8th ASCII bit, and others can use <esc> sequences or <si>...<so> sequences. All these are specific to the printer.

Hope this helps,
Ray

[Updated on: Thu, 17 March 2022 18:40]

Report message to a moderator

Previous Topic: DOS/65 Updated Version to 3.04 ROM
Next Topic: ECB-DMA


Current Time: Wed Mar 19 02:50:35 PDT 2025

Total time taken to generate the page: 0.00673 seconds