ZX Printer: Difference between revisions

From Sinclair Wiki
Jump to navigation Jump to search
(The printer, its port, and BASIC commands to drive it)
 
mNo edit summary
Line 1: Line 1:
The '''ZX Printer''' prints on a roll of special metallised paper; it has a stylus which passes an electric current through the paper and blackens the surface.
The '''ZX Printer''' prints on a roll of special metallised paper; it has a stylus which passes an electric current through the paper and blackens the surface.


It responds on any port with a<sub>2</sub> low, such as 0xFD.
It responds on any port with A2 set low.


==OUT effects==
{| class="wikitable" style="text-align: center;"
* d<sub>7</sub> - stylus power: 0=off, 1=on
|-
* d<sub>2</sub> - motor power: 0=go, 1=stop
! rowspan="2" style="width: 5em;" | &nbsp;
* d<sub>1</sub> - motor speed: 0=fast, 1=slow (no effect if motor stopped)
! colspan="8" | Bit
Any OUT to the printer also clears the latched IN signals (see below).
|-
! style="width: 5em;" | 7  
! style="width: 5em;" | 6
! style="width: 5em;" | 5
! style="width: 5em;" | 4
! style="width: 5em;" | 3
! style="width: 5em;" | 2  
! style="width: 5em;" | 1  
! style="width: 5em;" | 0
|-
! style="height: 5em;" | Read
| Paper start latch || 0 || 1 || 1 || 1 || 1 || 1 || Next pixel latch
|-
! style="height: 5em;" | Write
| Stylus power || || || || || Motor Power || Motor speed ||
|}


==IN response==
* Paper start latch: raised when the stylus reaches the start of the paper, or when stylus power is turned on.
* d<sub>7</sub> - latched '''1''' when the stylus reaches the start of the paper
* Next pixel latch: raised when the stylus reaches the next pixel (approximately every 250 T-states when motor fast)
* d<sub>6</sub> - pulled '''0''' if ZX Printer connected
 
* d<sub>0</sub> - latched '''1''' each time the stylus reaches the next pixel (about every 250T when motor fast)
* Stylus power: 0=off, 1=on
All other bits '''1'''.
* Motor power: 0=run, 1=stop
Note that IN does ''not'' clear the latched signals.
* Motor speed: 0=fast, 1=slow (no effect if motor stopped)
Any I/O write to the printer also resets the latched signals.


==BASIC commands==
==BASIC commands==

Revision as of 22:10, 25 November 2012

The ZX Printer prints on a roll of special metallised paper; it has a stylus which passes an electric current through the paper and blackens the surface.

It responds on any port with A2 set low.

  Bit
7 6 5 4 3 2 1 0
Read Paper start latch 0 1 1 1 1 1 Next pixel latch
Write Stylus power Motor Power Motor speed
  • Paper start latch: raised when the stylus reaches the start of the paper, or when stylus power is turned on.
  • Next pixel latch: raised when the stylus reaches the next pixel (approximately every 250 T-states when motor fast)
  • Stylus power: 0=off, 1=on
  • Motor power: 0=run, 1=stop
  • Motor speed: 0=fast, 1=slow (no effect if motor stopped)

Any I/O write to the printer also resets the latched signals.

BASIC commands

  • COPY (Z) will print the current screen (pixel data only; the state of attributes is ignored, so you might get some bits of your picture inverted).
  • LPRINT (Extend-C) acts like PRINT but sends output to the printer.
  • LLIST (Extend-V) acts like LIST.