ZX PRINTER OPERATING INSTRUCTIONS

Sinclair ZX Spectrum
The interface
The printer is wired as a Z80 I/O port, selected by A2 being at a low level - no other address lines are recognised. So to send information to the printer, use the Z80 command

OUT (FB),A - opcode D3 FB

assuming the data is in register A. The data bits have the following meanings:

(D2) High level means stop the motor, low means start it.
(D1) High level means put the motor on slow speed - this line is overridden by D2 being high. (D7) High level applies power to the stylus.

All these lines remain in the stat they were at last, until new data is sent to the printer. At switch on, or after pressing the feed button, D1 and D7 are set low; D2 is left high once feed is finished. The other data lines aren't used.

To fetch information from the printer, the Z80 instruction: IN A, (FB) - opcode DB FB; will put the data into the accumulator. These bits are used:

(D6) Will be erased as low if the printer is there, high if it isn't, and is used solely to check the printer is connected.
(D0) This line is the signal from the encoder disc. (D7) This line is high when the stylus hits the paper.

D0 and D7 are both latched so that they remain high until the computer writes something to the printer. So even if you don't make use of the information you've read in, you should output instruction (with appropriate data) to reset the latches until the next signal. These bits may be in either state on switch on, and aren't affected by the feed button. The paper detect signal is also used internally by the printer to make sure that the styli stop off the paper. Note that if power is applied to the stylus, the paper signal will go high even if the printer is between scans, and so the stylus must be turned off before attempting to detect the edge of the paper.

Sinclair ZX Spectrum

  Previous Page Back Next Page