Contents / Reference section / Previous chapter / Next chapter / Index
The Model B BBC computer can be used with the vast majority of printers available today. It is not possible, though, to drive old 'Teletypes' which operate at 10 characters per second, or printers requiring a 20mA current loop connection. To use a printer with your BBC computer you will need to do three things.
As the above implies there are two possible sockets (ports) to which you can connect the printer: The "parallel printer port" is often called a "Centronics® compatible" port. Printers that need to be connected to parallel ports usually have a 36 way "Amphenol" socket. To connect the printer to the computer you will need a cable made up as follows from a 26-way Insulation Displacement Connector (RS part number 467-295), 1 metre of 26-way ribbon cable (RS part number 358-062), and 1 36-way Amphenol plug.
The 26-way cable should be inserted into the 36-way plug so that pins 1 to 14 and 19 to 32 are connected. The cable should be inserted into the 26-way plug so that pin 1 of the Amphenol 36-way plug is connected to pin 1 of the 26-way Insulation Displacement plug.
A suitable, ready made lead is available as BBC Microcomputer system part number ANG 04.
Both plugs viewed looking at the pins on the underside of the plug body.
Parallel printer connections
|Name||36-way plug pin number||26-way plug|
|Ground||19 to 32||All even numbers|
The "serial printer port" is often referred to as an "RS232-C" or "V24" port. The standard connector plug is a "Cannon 25-way D type" and there is also a standard for the connections to the plug. Predictably however, different manufacturers disagree on the interpretation of the standard! The serial port on the BBC computer emerges via a 5-pin DIN plug and it will normally be possible to drive a serial printer with just 3 wires. The views of the two plugs are shown below from the outside of the case and looking into the respective sockets.
Connect a wire between GND and pin 7
Connect another wire between DATAOUT and pin 3
The position of the third wire varies from printer to printer.
For Qume printers connect CTS to pin 20.
If that doesn't work then try CTS to pin 4.
Those who require a more complete RS232 connection should try the following:
1 Data in to pin 2 (Transmit data)
2 Data out to pin 3 (Receive data)
3 CTS to pin 4 (Request to send)
4 RTS to pin 5 (Clear to send)
5 GND to pin 7 (Signal ground)
*FX 5 is used to inform the computer whether it is to send printer output to the parallel or serial port. Type in either:
*FX 5,1 if you are using a parallel printer
*FX 5,2 if you are using a serial printer
The computer defaults to (assumes unless you tell it otherwise, that you are using) a parallel printer.
If you have selected a serial printer then you will have to set the "baud rate" to match that on the printer. The default setting is 9600 baud but many printers run at other rates. Select one of
|*FX 8,8||19200||baud (this rate is not guaranteed)|
This is often called "turning the printer on" - but, of course, we are not referring to switching the printer on at the mains but rather to enabling and disabling its printing.
To turn it on type CTRL B and to turn it off type CTRL C.
In a BASIC program VDU 2 will turn the printer on and VDU 3 will turn it off.
Note that all output will now appear on the screen and printer. To send output to the printer only you can use *FX 3. See page 422.
Some printers automatically move the paper up one line when they receive a CARRIAGE RETURN. Since the computer also moves the paper up one line (by using a LINEFEED), the paper may move up two lines instead of one. It is possible to tell the computer not to send any particular character to the printer. The most common requirement is to ignore LINEFEED which has an ASCII code of 10. *FX6 is used to set the printer ignore character, so *FX 6,10 will set it to ignore "line feeds". *FX6 should be set after *FX5 has been used to select the printer type. The default is to ignore line feeds.
Thus the complete set up sequence for a Serial printer running at 1200 baud and which does not require "line feeds" would be:
|*FX 5,2||- serial printer|
|*FX 8,4||- 1200 baud|
|*FX 6,10||- no line feeds (default so it may be omitted)|
A few more detailed points:
Data is transmitted using 1 start bit, 8 data bits and 1 stop bit.
Receive baud rates may be the same or differ from transmit baud rates. Receive baud rates are set by *FX 7.
The user may supply his or her own specialist printer driver routine. The address of the user routine should be placed at location &222 and the user defined routine can be selected as the printer output routine with *FX 5,3.
If the user intercepts the Operating System Write Character routine (OSWRCH) then all the VDU control codes must be dealt with. When a BASIC program executes DRAW 10,10 a string of 6 bytes is sent to the VDU driver via OSWRCH. In this case the bytes would be 25,5,10,0,10,0, so beware!