RESEARCHll.N MACHINES

RM Nimbus PC-1 86 Parallel l/O Port (with User Port) Fitting and Using

PN 2s640 Contents

Chapter 1: Fitting Parallel l/O Card to a PC-186 with 102-key Keyboard 3 2: Fitting Parallel l/O Card to a PC-186 with 84-key Keyboard 7 3: lnstalling the Sottware on a Standalone PC-186 10 4: lnstalling the Software on a Networked PC-186 13 5: Using the Parallel l/O Porl for Printing 20 6: Configuring the Parallel l/O Port 23 7: Using the User Poil 2s 8: Port Pinouts 30 9: Technical lnformation 32 10:Troubleshooting 35

Contents of your upgrade kit

Your upgrade kit consists of the following:

o A Parallel l/O card.

o The user pon (socket on ribbon cable for connection to the l/O card) with mounting bracket.

o A 3.5" containing the files PARALLEL.SYS and INSTALL.COM.

o Two self-tapping screws and washers.

o These upgrade instructions. r A booklet "Nimbus PC Printing Made Simple'. PC-l86 Parallel l/O Port

About this Upgrade

The Parallel l/O port and user port

The Parallel l/O port is a socket for connecting a parallel printer. lt is attached to a card that you slot into your PC-186. We refer to the card as the Parallel l/O card.

fhe user porf is an optional socket on the end of a ribbon cable that connects to the card. The user port is similar to the port on a BBC micro. You can use this port for sending data to a printer or receiving data (i.e. itis bi-directionafl.

How to use this booklet

This booklet shows you how to:

1. Fit a Parallel l/O card and user port to your PC-186, if not already fitted. 2. Use the Parallel llO port and user port for basic printing tasks.

lf you are fitting the l/O card yourself, first read the appropriate chapter for your computer. Your PC has either an 84-key or a 1A2-key keyboard, and the internal layout of each type is different. lf you are unsure what you have, the 102-key keyboard has the function (F) keys along the top.

When fitting is complete, install the software as shown. Read the appropriate chapter for standalone or networked computers. (This is where you start if the l/O card was supplied already fitted.) Chapter 5 then tells you how to use the parallel printer port.

Finally, there are specialist chapters for experienced users and a troubleshooting chapter to help if problems occur.

ll you have olher optional cards in your PC, particularly a data communications (DCC) card, GPIB card, or cartridge tape controller card, read the information given in chapler 6, "Conliguring the Parallel l/O Port'. PC-l86 Parallel l/O Port

Chapter 1 Fitting the Parallel l/O Card to a PC-186 with a 102-key Keyboard

Before you begin

Read chapter 10 of your Owners Handbook for details of dismantling the computer and inserting cards. We reler to the handbook in the following instructions.

Note: ll you have a diskless nelwork station (TN) or il there ale no spare connectors on the bus cable because of the expansion cards already filled lo your computer, you will need a new bus cable. To order a new bus cable contact lhe RM Sales Desk,

Preparing your computer

Use the HARDDISK command to secure (park)the heads of the winchester disk, if fitted. Remove the cover of the computer.

Find the bus cable: this is the ribbon cable that connects the main board to the disk controller card. This bus cable attaches to the main board and connects to the edge of the disk controller card and any optional card(s).

lf you are replacing the old bus cable, disconect the old one from the option board and main board and remove it. PC-l86 Parallel l/O Port

lf you have a diskless network station (TN), this does not apply but you should connect the new bus cable to the mainboard before inserting your new option card.

Fitting the card

There are three horizontal slots for cards to slide into. The top slot may contain the disk controller card and you may have optional cards fitted in other slots. You need at least one free slot to fit the card and user port. You normally use the middle slot to fit the card, and this corresponds to the top opening on the rear panel.

o lf you have two slots free, follow the instructions "Two slots available", below.

r lf you have only a single slot free, follow the instructions "Single slot only".

r lf you have no free slots, you must remove at least one of the optional cards and then read the appropriate set of instructions mentioned above

o lf you want to use the user port of the l/O card as well as the parallel printer poft, connect the 20-way ribbon cable provided with this package to the socket on the l/O card as in the diagram below.

Two slots available

1. Release the bus cable lrom the disk controller card.

2. Remove the blanking plates f rom the slots in the rear panel.

3. There is a wide notch on the top edge of the l/O card's mounting bracket. The ribbon cable comes out from the top of the card. Hold the card with the notch upwards and bend the cable down and underneath the card as shown. PC-l86 Parallel l/O Port

4. Slide the card into the middle slot and push it into place as indicated by the arrow. Slide the user porl mounting bracket into the bottom slot and push it inlo place.

5. Connecl the bus cable to the parallel printer card and the disk controller card, if litted.

6. Refit the cover as described in the handbook.

Now you need to installthe software. lf you are installing on a standalone computer, skip to chapter 3. tf you are installing on a networked computer, skip to chapter 4.

Single slot only

You have two choices: if you no longer need the optional card fitted, remove it and lollow the instructions given above. Alternatively, follow the instruclions given here.

1. Release the bus cable f rom the optional card and lrom the disk controller card, if fitted.

2. lf the optional card is in the middle slot, move it to the bottom slot.

3. Remove the mounting bracket from the user por1.

4. There is a wide notch on the edge of the card's mounting bracket. Hold the card with the notch on top. The ribbon cable comes from the top of the card. Bend the cable so that it fits over the notch on the mounting bracket, as shown.

5. Feed the cable through the opening in the back panel, so that it hangs out ol the back of the computer. (You first need to remove the blanking panel if it is stillfitted.) The notch in the mounting bracket provides space lor the cable when you slide the card in. Slide the mounting bracket into the middle slol and push it into place. PC-l86 Parallel l/O Port

6. There are two lugs with screw holes above the top opening on the outside of the rear panel. Bend the ribbon cable so that the user port aligns with the holes. Place a washer over each of the self{apping screws supplied and screw the user port to the rear panel. The fitting of the user port socket is now complete.

user port parallel printer port

7. Connect the bus cable to the disk controller card (if fitted), the l/O card and the optional card. Also connect any other cables you may have removed from the optional card.

8. Refit the cover of the computer as described in the handbook. Now you need to installthe software. lf you are installing on a standalone computer, skip to chapter 3. lf you are installing on a networked computer, skip to chapter 4. PC-|86 Parallel l/O Porl

Chapter 2 Fitting the Parallel I/O Gard to a PC-186 with an 84-key Keyboard

Before you begin

This upgrade kit is designed for use in both models of PC-186. For your computer the two setf{apping screws and washers will not be needed and can be discarded

Note: ll you have a diskless network station (TN) or il there aIe no spare connectors on the bus cable because of the expansion cards already fitled to your compuler, you will need a new bus cable. To order a bus cable conlad the RM Sales Desk.

Preparing your computer

To fit the Parallel llO card you must first remove the computer's @ver. This is described in the module in the Nimbus Owners Handbook entitled "How to take it apart'. Read the first two chapters of this module, up to the end of "To remove the case top". Please pay pailicular attention to the section on sa{ety. Remember to park the heads of any winchester disk.

Fitting the card

You are now ready to lit the card into the computer. lt slots vertically into any ol the four slots and is connected to the main board by means of the l/O bus cable.

You need to connect the l/O bus cable to the main board. PC-186 Parallel l/O Part

I/O but connector

blanking platc

parallel printer port uler I/O port +l2vDC +5vDC

lf you have a tape streamer, a GPIB card, or any other add-on card that uses the l/o bus (except for the disk controller card), a -card l/o bus cable will already be fitted and you will not need a new one. otherwise, you will need to remove your present l/o bus cable, i{ any, and replace it with the bus cable you purchased separately.

The levers at each end of the cable-mounted connectors lock the cable in position. To release an l/o bus connector, push both levers outwards: the connector mounted on the cable will be pushed out. Do Nor try to separate the connectors by pulling on the cable.

When f itting a new cable, it is easier to connect it to the main board f irst (the main board is the circuit board that is mounted horizontally in the base of the computer, and its l/o bus connector is near the rear panel). A /acffi, -.--PlffiFl l/ PC-186 Parallel l/O Port

I/O bur connector

platc -blanking parallel printer port

lf you have a tape streamer, a GPIB card, or any other add-on card that uses the l/O bus (except for the disk controller card), a 4-card l/O bus cable will already be f itted and you will not need a new one. Othenruise, you will need to remove your present l/O bus cable, if any, and replace it with the bus cable you purchased separately.

The levers at each end of the cable-mounted connectors lock the cable in position. To release an l/O bus connector, push both levers outwards: the connector mounted on the cable will be pushed out. Do NOT try to separale the connectors by pulling on the cable.

When f itting a new cable, it is easier to connect it to the main board f irst (the main board is the circuit board that is mounted horizontally in the base of the computer, and its l/O bus connector is near the rear panel).

BsFrl--ru Fr F l/ PC-|86 Parallel l/O Port

Some PCs are fitted with larger power supply units than others. lf yours has a large power supply unit, lhe main board l/O bus connector is less easy to see. You may find it helplulto remove allof the verticaloptional cards that extend allthe way to the rear panel before connecting the new l/O bus cable to the main board.

The only way to gain a completely clear view of the main board l/O bus connector in a Nimbus with a large power supply unit is to remove the disk drives and the power supply unit. lf you need to do that you willfind detailed instructions in the "How to take it apad" module of the Nimbus Owners Handbook. Atter you have connected the lio bus cable to the main board, be very carefulto replace all components and connectors in their original positions. o lf you are only going to use the parallel printer socket you do not need to connect the user port cable supplied. r lf you want to use the user port of the l/O card as well as the parallel printer pofi, connect the 20'way ribbon cable provided with this package to the socket on the llO card labelled "User l/O Port'in the diagram at the beginning of the chapter. At the other end of the cable there is a connector with a mounting bracket.

o Remove the blanking plate from one of the free slots in the back panel. Slide the liO card into the slot with the l/O bus connector uppermost. lt does not matter which of the four slots you use.

o lf you are fitting the user port, remove another blanking plate from an adjacent {ree slot and slide the user port cable (fitted with a socket and attached to the l/O card by ribbon cable) into that slot. o Connect the l/O bus cable to the top of the l/O card and reconnect any other cards.

o Put the cover back on the Nimbus as described in the Owners Handbook.

Now read chapter 3 or 4 - as appropriate - to installthe software. PC-lBO Parallel l/O Port

Chapter 3 lnstalling the Software on a Standalone PC-I86

lf you are installing lhe software on a networked PC, go straight lo chapter 4.

The procedure for installing software on standalone computers depends on whether you have just litted the l/O card as an upgrade. lf so, you will have an upgrade disk containing the software. lf the l/O card was supplied already fitted, the software is on the MS-DOS System Disk.

lnstalling with the upgrade disk

The steps are:

o Start up your Nimbus f rom its startup ("boot") disk - either floppy or winchester - as normal and make sure you are logged onto this disk drive. Copy both of the files PARALLEL.SYS and INSTALL.COM from the upgrade disk to the root directory of the startup disk.

o Type:

INSTALL

You see the prompt: Please enter the card select number:

Enter the number of the l/O card. lt is in the range 1-4. You should always enter 1 unless you have changed the card number (as discussed in chapter 6 "Configuring the Parallel l/O Poft").

The above command automatically appends a new command line to CONFIc.SYS. The line is: DEVICE = PARALLEL SYS /N

where n is the number you entered.

lf you did not have a CONFIG.SYS file present originally, a new one is created. When finished, you see the message: Installation successful-

l0 PC-|86 Parallel l/O Port

Now, each time you restail the computer it installs the parallel printer driver software and gives the message:

fnst.alling Parallel Printer Driver Vn.nX

lf you get another message see 'Error Messages", later. CIherwise, skip to chapter 5 to find out how to print f rom this port.

lnstalling from the M$DOS disk

Your MS-DOS System Disk contains the three files PARALLEL.SYS, PRLCFG.SYS, and RAMPRCFG.SYS. The latter two files are configuration files intended to replace your current configuration file CONFIG.SYS.

o ll you are operating a 0"5Mb silicon disk on your Nimbus (using RAMDISK.SYS)then you should replace CONFIG.SYS with RAMPRCFG.SYS.

o lf you do not use RAMDISK.SYS, replace CONFIG.SYS with PRLCFG,SYS.

lmportant: ll you have a 'customized'CONFIG.SYS lile that you wish to keep, ignore the lollowing instructions. Simply append the line pgylQt=PARALLEL.SYS /1 to the lile, restart your Nimbus, and go straight to chapter 5.

o Start up your Nimbus f rom the startup disk (either floppy or winchester) and make sure you are logged onto this disk drive. Rename your existing CONFIG.SYS file as CONFIG.OLD. Then rename either RAMPRCFG.SYS or PRLCFG.SYS as CONFIG.SYS.

Now, each time you restart the computer, it installs the parallel printer driver software and gives the message:

f nsiail-ing Paral-iel Prinier Driver Vn.nX

lf you get another message, see "Error Messages", below. Othenryise, skip to chapter 5 to f ind out how to print lrom this port.

11 PC-l86 Parallel l/O Port

Error messages

An error or inconsistency during software installation will usually resuh in a message being displayed on the screen. The only messages you may see are:

ERROR - invalid card select Using default value of 1

ERROR - board not fitted or board error

The first message is displayed il the value of n that you have in your CONFIG.SYS lile is outside the range 1-4. You should edit the file so that the number is the same as the iard number of the l/O card (see chapter 6'Coniiguring the Parallel l/O Port').

The second message is displayed if the value of n used in the CONFIG.SYS file iJnot the'same as the card number set on the l/O card. The message will also be displayed if the l/O bus cable is not properly connected to the board.

Read these instructions again carefully to try to resolve the problem'

lf you cannot correct an error, please contact your supplier for assistance.

12 PC-186 Parallel l/O Port

Chapter 4 lnstalling the Software on a Networked PC-186

advice of the This procedure should be carried out by, 9r with the , network manager. h is assumed that you have your network fully operational.

You can install l/O cards in your Nimbus PC network station, or in your PC network seryer, or in both.

network can lf you lit a card to the network server, any station 9n tl]e spool printer output to a parallel prinler connected to the server. [-io*"rrr, il your Nimbus PC network station is the only one in the network requiring a parallel interface, then you will achieve greater efficiency by fitting the card to the station.

To use the l/O card, the Nimbus that has the card fitted rnust be running under the control ol the network which includes the necessary extra software for controlling the card. H an individual station is fitted with a parallel interface, then it is stillthe operating system on the server whiin has to be extended, because that is the operating system normally received by the station when it is started up.

You can installthe software for use on the server only, for USe on stations only, or for use on both. This chapter, therefore, is divided into three sections.

When installing the software, you will need to append a command to one or both of ine COfqflG.SYS files on the network disks. This command automatically installs the parallel printer driver software on the stations or on the server, or in both, on start up.

The server must be in standalone mode when you install the software.

13 PC-l86 Parallel l/O Port

To install tor use on the server only (NETI, NET2 and NET2.01 only)

o Use a text editor, such as Steed, to append the following line to the end of the CONFIG.SYS file on the server startup disk:

DEVICE : PARALLEL.SYS /N

where n is a number in the range 1-4 and is the card number of the l/O card (probably 1, but see "Configuring the Parallel l/O Port" in Chapter 6).

r lf you have just fitted the l/O card, copy the file PARALLEL.SYS from the upgrade disk to the root directory of the server startup disk.

(lf the l/O card was supplied fitted to your computer, the server startup disk already contains the file PARALLEL.SYS.)

o Press

is displayed. lf you get another rnessage, see "Error Messages" in Chapter 3.

o You now need to give the Parallel l/O port a name which it can be referred to by the network stations, and the way to do this depends upon whether you are using Release 1 or Release 2 of the network software (i.e. NET1 or NET2).

Naming under Release 1 (NET1) Use the manual "Managing Your Nimbus Network" for reference, particularly the section "Setting Up the Network Printer" in Chapter 3. lf you use the server it should be in standalone mode.

o Edit the OFFERS file in CIMGR and insert the following line:

SHARE parallel = LPT0

where parallelis the name by which you want the Parallel l/O port on the server to be known to network stations.

o Run MAKENET and then restart the server.

14 PC-l86 Parallel l/O Port

To access the Parallel llO porl from a station, use the command:

USE PRN : \\servername\parallel at the station, where seruername is the name of your Server (which is SERVER1 if you haven't changed it) and parallelis the name allocated above.

You could create one or more batch files if you wanted users to be able easily to select which printer to use. Create a lile called, say, PARALLE L. BAT co ntai ni ng :

U-ctr PRN: ,/D >NUL USE ?RN: \\SERVER1\parailei >NUL

(/D disconnects the active network printer and allows the connection of the selected printer.)

Copy the file(s) to the \PUBLIC directory and set them to read-only using ATTRIB so that users can access them.

Users can now select the parallel printer by running PARALLEL from their N: direclory.

You may now, if you wish, make the Parallel l/O port the default printer for all network stations. Do this by editing the PRN: line in the PUBLIC section of lile USERS.TXT to be:

PRN: \\se::vernarne rparaJ. le1

Naming under Release 2 (NET2)

You must perlorm the lollowing operalions on the network server, nol on a station.

The seruer should have the card fitted and the driver PARALLEL.SYS installed on the seryer starlup disk.

o Start the server as normal, at the server prompt type: STOP.

o At the C:\> prompt, type \MGR\MANAGE.

o Select F4, Edit user/group/public options to run NETMAN, which displays its main menu.

r Select F1O, Network options, and another menu is displayed.

15 PC-186 Parallel l/O Port

o Select F4, Edit printer defals, to give a name to the Parallel l/O port. Move the cursor to an unused printer line on the screen, set "Connection" to LPTO, and set "Name'to the name by which you want the Parallel l/O port to be known (PARALLEL or EPSON, for example).

o Select F2, Keep these details.

o Select F7, Main Menu - keep details.

You can now, if you wish, make the Parallel l/O port the default printer for all network stations so that all output sent from any station via PRN goes to the parallel printer on the seryer. To do this:

r Select F6, Edit public options, then F8, Public printers. Move the cursor down to cover the name of the Parallel l/O port and press or click the left-hand mouse button.

o Select F2, Keep these details.

r Select F7, Main Menu - keep details.

o Select F9, Quit NETMAN - Keep details. (The process takes a while.) Press the spacebar to return to the menu.

o Press to quit the menu.

o Press

For users of NET 1 and NET2 Whether you are running NET1 or NET2, when a station is started up you can type:

USE

to display the server devices that are being used by this station. The list should include lhe name of the Parallel l/O port. For example, if you called the pofi PARALLEL, you would see:

PF.N \ \ SERVERNAME\PARALLEL

16 PC-186 Parallel l/O Port

To install for use on stations only

NET1 and NET2

lmportant: ll you are using stations on a Network Release 2.1 or 2.2, with an X Series server, skip to 'NET2.1 and2.2'.lf you are using Network Release 3.0 skip to "Net 3'.

o You have to edit the file coNFlG.sYS in the root directory (c1) of the server's winchester disk. To do this, you should first set the file to read/write using: ATTRIB -R C:\CONFIG.SYS

o Use a text editor, such as Steed, to append the following line to the end of the CONFIG.SYS file: DEVICE = PARALLEL.SYS /n

where n is a number in the range 1-4 and is the card number of the Parallel l/O card (probably 1, but see chapter 6 "Configuring the Parallel llO Port").

r lf you have just fitted the l/o card, copy the file PARALLEL.SyS from the upgrade disk to the root directory of the server startup disk.

(lf the l/O card was supplied fitted to your computer, the server staftup disk already contains the file PARALLEL.SYS.)

o Set both CONFIG.SYS and PARALLEL.SYS to read-only using:

ATTRIB +R C: \* . SYS

Now, when network stations starl up on the network they receive an operating system which includes the parallel printer driver software.

lf a station doesn't have a card fitted, it will receive an error message:

ERROR - board not fitted or board error which should be ignored.

17 PC-l86 Parallel l/O Port

NET2.1 and 2.2 If your network is Release 2.1 or 2.2 with an X Series server, you should read this section carefully. You have to edit the CONFlG.xxx file in the subdirectory CINETWORKNETPC on the server's winchester disk, as described here.

o On NET2.1, this file is CONFIG.SYS.

o On NET2.2, CONFlG.xxx is specific to the address of the station (e.9. CONF|G.0O1 for station address 001). You must create the file CONFIG.xxx and copy the contents of CONFIG.SYS to it. Then edit CONFlG.xxx as shown here.

Bear the above points in mind as you work through these instructions.

1. Set CONFlG.xxx to read/write using:

ATTRIB -R C: \NETWORK\NETPC\CONFIG.xxx

2. Use a text editor, such as Steed, to append the following line to the end of CONFlG.xxx:

DEVTCE = PARALLEL.SYS /n

where n is a number in the range 1-4 and is the card number of the Parallel l/O card (probably 1, but see chapter 6 "Configuring the Parallel l/O Port").

3. Copy the file PARALLEL.SYS from the upgrade disk to the \NETWORI(NETPC directory of the winchester.

4. Set both CONFlG.xxx and PARALLEL.SYS on the winchester to read-only using:

ATTRIB +R C: \NETWORK\NETPC\CONFfG.xxx ATTRIB +R C:\NETWORK\NETPc\*.SYS

Now, when network stations staft up on the network they receive an operating system which includes the parallel printer driver software.

On NET2.1, if a station doesn't have a card fitted, it will receive an error message:

ERROR - board not fitted or board error

which should be ignored.

18 PC-l86 Parallel l/O Port

To install for use on stations only

NET 3.0 The CONFIG.SYS files are in the suMirectory CINETWORKNETPC. On Net 3.0, station CONFIG.SYS files already include the line:

DEVICE = PARALLEL.SYS /1 lf the card number is not 1, copy CONFIG.SYS CONFIG.XXX where XXX is replaced by the station address and edit that file accordingly.

To install for use on both server and stations (NET1, NET2 and NET2.01 only)

Append the new line:

DEVICE = PAP.A-LI:.SYS /n to both CONFIG.SYS files in C:\ and A:\, as described under "NET1 and NET2".

19 PC-l86 Parallel l/O Port

Ghapter 5 Using the Parallel I/O Port for Printing

How to connect your printer

The Parallel l/O port is designed for use with a BBC parallel printer cable (RM Order No. 018-553). This allows you to print using any printer with a Centronics interface. A parallel printer cable for a BBC micro will also work.

For instructions on how to connect the printer cable to your printer, refer to your printer manual.

All Centronics parallel printers should be compatible with the Parallel l/O card. To ensure that your printer is suitable, confirm with your printer manual that the Centronics interface is as shown in Chapter 8 "Port Pinouts".

Standalone PC

Even after you have installed the hardware and software and connected your parallel printer, all printer output will still be sent to the serial port marked "printer" by default. Therefore, before you run the program or utility, you must first type the following command:

PRINTER LPTO

(The last digit in LPTO is a zero.)

Once this is done, the paraliel port automatically becomes the default system printer port and you do not need to repeat the command until the next time you reset your computer.

On a standalone Nimbus you can include PRINTER LPT0 in lhe AUTOEXEC.BAT lile on your system disk so that it is executed each time you start up.

Network station

lf the l/O porl and software were installed at the server, station users have the option of selecting the parallel printer depending on how the network manager has set it up.

20 PC-l86 Parallel l/O Port lf the l/O port and software were installed at the station, the printer is 'local". Before you run a program or utility, you must first type the command:

PR]NTER LPTO

(The last digit in LPTO is a zero.)

Network server

See Chapter 4 for details of using the port on a networkeci PC-186. The network manager is responsible for making the port available to users when the software is installed.

Printing lrom applications

The PARALLEL.SYS driver manages all communication between the mmputer and the printer, but it has no knowledge of the characters that are sent to the printer. Many applications, such as Word, also have printer drivers to manage the specialfeatures (bold text, underline etc.) of a specific printer.

When running an application you should ensure that the printer driver for your printer is installed. Consult the manualthat came with your application for further details.

Windows To set up your parallel port for use with Windows, on a standalone PC or locally at a network stalion, you should edit your WlN.lNlf ile to contain the following line in the lports] section:

LPTC : =

You could use NOTEPAD in Windows, or Steed, to do this. Once this is done, run the Windows Control Panel and select Connections in the Setup menu; you can then select LPT0 as the connec{ion for your printer.

21 PC-l86 Parallel l/O Port

Printer error messages

1. On standalone computers

If a printer error is detected during printing, MSDOS issues the message:

Writ.e fault error writing device LPT0 Abort, Retry, fgnore?

This is usually due to one of the following problems:

The printer is r off-line o oUt of paper r disconnected from the mains or from the computer o faulty

2. On a network seryer

No errors are returned to a network server if a printer connected to the Parallel l/o card becomes faulty. Files are stored by the spooler untilthe printer is ready to print them. see your managers handbook for details.

22 PC-l86 Parallel UA Port

Chapter 6 Configuring the Parallel IiO Port

Setting the card number

The Parallel l/O card uses the internal llO bus. h shares this bus with various other cards, such as the disk controller card. Up to four different cards can be connected to the l/O bus cable, and each one must be given a unique number by which it can be identified.

This number is called lhe card number, and is a number between 0 and 4. The number 0 is reserved for the disk controller card, if there is one, and this is preset at the factory. This leaves the card numbers 1 to 4 free for any other card which may be fitted. Consider the following:

o lf you have a tape controller card {or a cartridge tape unit, its card number is set at 4.

o The l/O card leaves the factory set at 1. This may clash with the Data Communications card (or GPIB card).

lf the l/O card conflicts with any other card, then the number of the other card should be changed. This is because the liO card is selected by a soldered wire link but the GPIB and Data Communications cards have moveable push-on links and can be changed easily, lt is therefore best to change the number of one of these cards and leave the l/O card as 1.

lf you have lo alter one of the other cards the link is a push fit, but a small screwdriver may be helpfulto lever it off.

Write down the card numbers of :

o The UO card.

o Any other cards already fitted that use the l/O bus.

You will need to know the card number of the l/O card when you install the extra software.

23 PC-l86 Parallel l/O Port

Bus interrupts

On the component side of the l/O card, near the mounting bracket, there are lhree pins, two of which are connected with a soldered wire link. This link determines which interrupt is used. The centre pin is normally connected to the in-card pin, resuhing in the use of interrupt BUSINT2. (This is labelled '2* on the card.)

lf you want to use interrupt BUSINT1, you should cut that link and connect the centre pin to the pin nearer the mounting bracket. lf you use interrupt BUSINT1, however, the supplied software will no longer work.

24 PC-l86 Parallel l/O Port

Chapter 7 Using the User Port

Applications are currently being written to include the use of this port. Follow the instructions with the application where they apply to the port.

Access from Assembler

Here is a listing of a BBCBASIC(86) program for the user port. (The comments are to help you and need not be included in the actual program.) This program displays the bytes that the poft receives. tt stops when it receives a byte with bit 7 set (i.e. 127 decimal/7F hex).

10 MCDE3 Run the assembler code tc drirre the card:

2C PROC_asser,bl,e

Set r.he DDR (data directory reEister) f or port B t o 0:

30 PRCC_setup_dcir (1, C) qU LLs

Cojlect each byte received at port B:

5C REPEAT 50 PRCC_in Transfer the byte to variabl-e A anci subtract it from lFF. Home the cursor and display the hex value of AA. The val-ue if no byte is presenL is &FF: TCAA=eFF-?A 8C VDU 26 9O PRlNT-AA If bil 7 is not set, get another byce. If bit 7 is set, siart the next routine:

1OO UNTIL AA > &7F 14C END

25 PC-l86 Parallel l/O Port

Define the assembler code procedure to drive the card:

160 DEFPROC assemble 170 DIM CODET 128 lSOFORZ:OTO3STEP3 190 Pt : CODE* 200 [ oPT Z Define and labef variabl-es to be used in the program:

210 .b ddrt DB 0 220 .baset DW 0 230 .byte* DB 0 240 .A DB 0

Label DDRB (data directory regist.er for port B) code. Trans- fer b ddrt to AX and transfer the base address (see chapter 9, "Technical- information") to DX. Add an offset of 4 to the DDRB address and send the low byte of AX to DDRB:

250 .DDRB 260 MoV AX. [b_ddr&] 270 MOV DX, [base&] 2BO ADD DX, 4 290 ouT Dx, AL 3OC RETE

Label- IN code for collect.ing a byte received at port. B. Transfer the card base address to DX. Set AX t,o zero. Trans- fer byte received at port to AX and transfer byte to vari* abl-e A:

310 . rN 320 MOV DX, lbase%] 330 MOV AX. 0 340 rN AL, DX 350 MOV [A] , AL 360 RETF

Label- OUT code for sending a byte to port, B. Transfer byte_* to AX and transfer the card base address to DX. Send the l-ow byte of AX to port B:

370 .ouT 380 MoV AX, [bytet] 390 MOV DX, [base?] 400 our DX,AL 410 RETF 420 l 430 NEXT Z 440 ENDPROC

26 PC-l86 Parallel l/O Pon

Define the procedure fcr setting up the DDR for each of the fcur possible cards on the cable:

450 DEFPROC_setup_ddr (cardt, b_ddrt ) Finci the card base address and transfer the card base ad- dress to the variable base* (a 16-bit number): 46C base = &400 + (cardt * c80) 410 ?baset= ( (INT (base/256) ) (base/255) ) *256 480 ? (base* + l") = INT (base/256)

Call code to transfer b ddr* to DDRB:

4 90 CALL DDRB 5OO ENDPRCC

Procedure to ccllect a byte received at port B:

5LC DEFPROC in 52C CALL IN 533 ENDPROC Procedure to send byLe Lo port B:

510 DEFPROC_ouI 55C CALL OUT 5 5 O EI.JDPROC

Tc specify a byte to send out, set DDR for port B to 255 (ajl ouiputs) and call PROC out. Use the following code (where nn is the nurnber to Eend out) :

lCCC PR.OC_setup_ddr (1, 255 ) 10iC ?byt.et = nn l-C2C PROC cut

27 PC-|86 Parallel l/O Port

Using the program on a BBC micro

To make the program run on a BBC micro, change line 70 to: TOAA:&FF-A.

and replace the procedures as follows to drive the BBC 6522 VtA (Versatile lnterface Adapter). Replace lines 450 to 500 with:

450 ?&F862 = nn

Replace lines 510 to 560 with:

510 A = ?&F850 520 ?&PE60 : byre&

The assembler code is not needed, nor is the code for selecting cards

Direct access from BBCBASIC(86)

Although the user port is not memory-mapped in the same way as on lhe BBC micro, it is possible to address the user pod directly from BBCBASIC(86) in much the same way as on a BBC micro, without having to reson to the use of assembler.

This is achieved with the use of two BASIC keywords, GET and PUT, which allow BASIC to read and write values on l/O ports. Allthat is required is a knowledge of the parallel card number (and hence its base l/O port address) and the register address offsets that controlthe functions of the 6522 chip (See chapter 9).

The following example code assumes that the parallelcard is installed as card number one, with a base address of 480 hex.

To output the value n on the user port, use the following two lines of BASIC:

10 PUT &484, &EF 20 PUT c480. n

(Line 10 sets the user port into write mode by setting all bits in the Port B Data Direction Register to '1". Line 20 then outputs the value n by placing it in the Port B l/O Register).

28 PC-|86 Parallel l/O Port

t,o* lhe user port into variable A, use the following two HJlHtf^rr1,J:

;3 i:3.;i3i;5i' \_ (Line 30 sets the user port into read mode by setting all bits in the Pod B Data Direction Register to "0'. Line 40 then reads the Port l/O Register and places the value found into variable A).

Refer to chapter 9 for more information.

29 PC-|86 Parallel l/O Port Chapter I Port Pinouts

Parallel printer port wiring

The 26-way Parallel l/O port is for use with an externaldevice having a parallel interface. The wiring is:

Pin No. S igna) Purpose

7 CA2 St robe 3 PAO Data bit 0 5 PA1 Data bit 1 1 PA2 Data bit 2 9 PA3 Data bi-t 3 11 PA4 Data bit 4 13 PA5 Data bit 5 15 PA6 Data bit 6 1,1 PA7 Data bit 7 19 CA1 Acknowledge A11 even numbers Signal ground except 25

Making a cable for a Centronics interface

To make up a cable to connect to a printer with a Centronics interface, you should use lnsulation Displacement Connectors (lDC) at both ends - fitting a strain relief clip on both - and wire pin 1 to pin 1 on the correspond ing connector.

Connect a26-way ribbon cable, with a 26-way IDC SOCKET (RS Part No 469-897) at the card end, and a 36-way IDC DELTA PLUG (RS Part No 470-948) at the printer end.

30 PC-|86 Parallel l/O Port

Centronics standard interface

Pir No Purpo se

1 St robe 2 Data Bit 0 3 Data Bit 1 4 Daia Bit 2 q Data Bit 3 6 Data B:t 4 1 Data Bit 5 8 Data Bit 6 9 Data Bit 1 10 Acknowledge

Your Centronics printer will work with the PARALLEL.SYS driver providing its porl conforms to the above standard.

User port wiring

The 20-way user porl socket is for use with an external device having a parallel interface. The wiring is:

Pin &'o S igna I 1 +5V .) CB1 3 +q\i 4 CB2 5 PBO B PB1 1C PB2 i2 PB3 vBq i5 Pts5 :.8 PB6 ')^ Pts7 r:urbers 5 - l- 9Grcund

31 PC-l86 Parallel l/O Port Chapter I Technical lnformation

Hardware interfaces

The l/O card provides a connector on the rear panel of the Nimbus, containing:

o A 26-way BBC-compatible parallel printer port.

o A +5V dc supply socket.

r A +12V dc supply socket.

The optional user port provides a 20-way BBC-compatible port.

The +5V dc and +12Y dc sockets can be used to supply power to an external device. The maximum currents that can be drawn from these sockets are:

+5V: 1.70A

+12Y: 0.65A

The +12V dc socket is the one nearest the printer socket.

Software interfaces

1. MS.DOS

Once the software is installed, the CONFIG.SYS file includes the entry:

DEVICE : PARALLEL.SYS /N

(where n is the number of the card).

When you start up your system the parallel printer driver software is included automatically in the operating system.

The printer port has the devicename LPT0.

2. Application program interface

Printer output from all RM Nimbus utility programs and from most application programs takes place through MSDOS handle 4.

32 PC-l86 Parallel l/O Port

All output f rom MS-DOS handle 4 can be redirected by means of the PRINTER utility to any device. All you have to do on a standalone system, therefore, to direct all normal printer output to the Parallel l/O card is to issue the operating system command:

PRINTER LPTO

(the last digit in LPTO is a zero).

Such redirection is not necessary for network stations using a parallel printer on the server. The network manager will have set this up during installation.

3. Sub-BIOS

Assembler code programmers may need to know that:

t_characLer EQU 1 d_paralLe] EQU 3

are provided at sub-BIOS level by the extra software, with functions similar to functions 1, 2 and 8 only of t_character, dprinter. For f ufiher details see the Nimbus PC Advanced Programmers Reference Guide (RM Order No.014-989).

Register addressing

The 6522 VIA chip on the l/O card is treated as a set of 16 l/O ports.

On a BBC micro, the 6522 is'memory mapped" (i.e. uses memory) at FE60 to FE6F. To write lo a6522 register on a BBC micro, pokelhe appropriate memory location. For example, ?&FE62-255.

On your PC-186, the l/O card connects to a set of l/O ports that start at a base address depending on the card number. To write to a 6522 register, you write to the appropriate l/O poft. As on the BBC micro, the printer pod uses port A of the 6522 and the user port uses port B. You cannot peek or poke these registers from BBCBASIC, although you can easily access the appropriate l/O ports using BASIC's GET and PUT commands (see chapter 7).

33 PC-|86 Parallel l/O Port

The card numbers and corresponding base addresses are as follows:

Card Number Base Address

1 0480 hex

Z 0500 hex

3 0580 hex

4 0600 hex

The register addresses are at the following offsets from the base addresses:

Register Register Designation Address Number and Description (Hex Offset)

0 ORB/fRB Port B f/O register 00

1 oRA/IRA Port A I,/O i--egisLer o2

Z DDRB Port B data directory register 04

3 DDRA Port A data directory regist-er 06

4 T1C-L T1 Iow-order Iatches/counter OB

q. T1C-H T1 high-order counter OA

6 T1L-L T1 low-order latches OC

1 T1L-H T1 high-order latches OE

B T2C-L T2 low-order latches/counter 10

9 TZC-H T2 high-order counter LI

10 SR Shift register 14

11 ACR Auxiliary control register 16

)-2 PCR Peripheral control register _1 (,

13 IFR Interrupt flag register 1A

L4 ICR Interrupt contrcl register 1C

15 ORA/IRA Port A I/O register 1E

For more details of the operation of the 6522, see the Rockwell Data Sheet "R65C22 Versatile lnterface Adapter (VIA)" or the "6522 Greenfile". These documents are available from NEMEC Publications, Ronse lla, Lo rdswood, H ig hbridge, Eastleig h, Hants (Tel. 0703 617 627).

34 PC-|86 Parallel l/O Port

Chapter 10 Troubleshooting

\-- lf your printer doesn't work:

1. Check that your Parallel l/O card is fitted correctly and that the levers at each end of the cable-mounted connectors are locked in position.

2. Make sure the PARALLEL.SYS file is on your startup disk and the file CONFIG.SYS has a new line:

DEVICE = PARALI,EL.SYS /n

Does the number'n'correspond to the card number of the l/O card? *Error 3. lf there is an installation error message, refer to Messages' in Chapter 3.

4. lf trying to print, is your printer connected, switched on and on-line?

o Are allthe cables pushed in correctly?

o Have you issued the command PRINTER LPT0 before running \- the application?

o Refer to 'Printer Error Messages' in Chapter 5 for f urther fault remedies.

Help and Advice

lf you have any problems or queries, contact your supplier. lf you bought direclly from RM, contact the RM Technical Support Hotline on 0865 796197. Before you phone, make a note of the serial number(s) of the compute r(s) concerned.

35