This chapter deals with the aspects of the PX-8 involved with interfacing the
computer to other devices. Some of the devices are an integral part of the PX-8,
others can be purchased separately. Epson is continually developing further
products and so this manual cannot cover every device it is possible to use with
your PX-8. This manual does not mention specific products as in most cases these
items vary from country to country. You should consult your dealer for the
products available in your country and for details of new optional items. I
4.1 Storage of Files and Data
The PX-8 has many means of storing files. There are also ROM capsules on
which manufacturers of applications programs can provide their programs. These
can be read but not used for storing files. The other important method of
storing data is the Microcassette drive. It is also possible to add on floppy
4.1.1 Microcassette drive
The PX-8 is equipped with a built in Microcassette drive. This section describes operation of the drive.
a) Drive name and operation
The microcassette drive can be used in the same manner as other disk devices. It is assigned drive name H:. It is not possible to assign drive name H: to any other drive, nor to assign any other drive name to the Microcassette unit. Be-cause a cassette tape functions differently from a floppy disk, a special operat-
ing system has been added to the PX-8 CP/M. This is known as MTOS (Microcassette Tape Operating System). It means that CP/M can use the microcassette drive as the equivalent of a disk drive. Because of the physical differences in operation the use of a microcassette is slightly different from us-ing a floppy disk or RAM disk. This will become obvious as you study the oper-ation of the Microcassette drive.
The main difference you will experience between the use of a microcassette
and a conventional floppy disk or the RAM disk is due to the sequential method
of writing to the microcassette. When a file is written to the microcassette it
has to be written after the previous file. This applies even if the file is
upgrad- ing a previous file. If a file is erased from a tape, that portion of
the tape is lost. This is not the case with a floppy disk, since the operating
system can write to the disk so that the file is distributed in a random, though
documented man- ner. The directory of the disk contains a list of the sectors
which contain the information relating to a particular file. In the case of the
tape all the informa- tion in the file is written to the tape in the correct
sequence at one particular place. If a file were to be erased, and another file
written in the same place in the middle of the tape, the new file could overlap
the next file and so destroy part of it. If the last file on the tape is erased,
then the next file is written on the top of the erased file. In all other cases
a new file is written after the last file on the tape.
If more than one file is erased and rewritten, this can cause the tape to be full as far as the operating system is concerned, even though there are only two or more short files on the tape. Consider the following example of two files A and B continually being written to the tape as shown in the diagram.
When the tape has been initialized (line 1), the tape has the directory formatted on the tape. When the files A and B are written to the tape (line 2), they are added after the directory. If file A is updated (line 3), the file is first erased, and then rewritten after file B. There is then a portion of the tape which cannot
be written to again until files A and B are erased. If file B is written to the tape again, the original file is erased first, and then file B is written after file A (line 4). The portion of lost tape increases. If successive rewriting of the tape is carried out as in line 5, yet more of the tape is used up. However, if a file is rewritten when the last file can be erased (as in line 6), the length of tape used only increases by the amount of tape required to extend the size of the file.
It is not possible to determine how much of the tape is remaining by using STAT.
b) Microcassette selection and use
Consult your Epson dealer for supplies of microcassette tapes.
You should ensure that the tapes you buy are of the correct type as there are similar size cassettes which are not compatible with the PX-8 Microcassette drive.
Microcassettes are available in sixty-minute lengths (thirty minutes per side) and thirty-minute lengths (fifteen minutes per side). These are marked MC-60 and MC-30 respectively. Because a thirty-minute tape will store 10K to 50K bytes of information per side, it is usually adequate for storage of your most fre- quently used data and programs. It is recommended that you use the shorter tapes because it is often faster to change tapes (or flip one over) than to wind to the end of a long one. In addition, shorter tapes are less likely to jam. The microcassette directory can only hold 12 file names, so 12 short data files or programs will leave a long length of unusable blank tape.
Some of your most important data will be saved on microcassettes, so it is im- portant to care for them properly. To keep the tape clean, always keep it in its protective case when it is not in use. Never let your fingers touch the tape itself; the oil from your skin can contaminate it. Be sure to keep your tapes away from magnetic surfaces. Proximity to a magnetic field can erase your tapes. Magnetic fields are found in television sets and other devices that have trans- formers or speakers. Dirty recording heads in your microcassette drive can cause errors in reading and writing and can even damage your tapes. You should clean them periodically, using a head-cleaning cassette, a cleaning kit (available where you purchase your cassettes) or a cotton swab and isopropyl alcohol.
c) Tape insertion
To insert the Microcassette tape proceed as follows:
1) Press the EJECT key to open the microcassette compartment cover.
2) Insert a microcassette with the side to be used uppermost. This will have the majority of the tape as seen through the window on the right hand side.
3) Close the microcassette compartment cover.
d) Manual operation
The microcassette drive can be operated manually by using the System Display.
3) Place the PX-8 in the System Display mode by pressing the key together with the key.
The bottom line of the System Display can show two states depending on whether a tape has already been set up or ‘MOUNTed’ in the drive. Section 4.1.1.f describes this in detail, but for now it is sufficient to say that because a cassette tape accesses data sequentially along the tape and the directory is stored at the beginning, it is not practical to write the new directory to tape each time a pro-gram is saved. Consequently it might be possible to change tapes without up-dating the directory, and the MTOS would not be able to find a file or program. There is a safeguard built in to prevent this. It is not possible to move along a tape if the MTOS is in control of the tape. If a tape is MOUNTed then the bottom line of the system display will show:
REMOVal and MOUNTing of the tape is described in section 4.1.Sf. If the display shows REMOVE and you wish to continue with this explanation, press the SHIFT key and function key PF1, then wait until the display shows the bottom line:
The bottom line shows the microcassette drive functions assigned to the program-mable function keys.
These are best understood by following an actual operation.
When you have familiarised yourself with the controls you can now use the other controls on the function keys to prepare a tape on which to store programs.
e) Directory initialization (DIRINIT)
The tape directory is a tape block which contains various information required for the microcassette tape operating system to manage tape files. This infor-mation includes the number of files in the tape, the tape location of each file (the tape count at the beginning and end of the file), the name of each file, etc. The tape directory is always placed at the beginning of a microcassette tape.
Although the operating system manages the tape directory, you must initialize the directory block on to the tape before using a new tape. The procedure to do this is as follows:
If you do not wish to use the tape, press the key to exit to the state in which you were before you pressed the and keys.
f) Preparing Microcassette tapes for use – MOUNT and REMOVE
Since the tape behaves as if it were a disk, the directory is written to the tape in the same way as on a disk. However, if the tape directory were read each time a tape file was accessed, it would take a relatively long time to rewind the tape to the tape directory and then rewind to the file location. To overcome this, the contents of the tape directory are stored in RAM. The process of load-ing the directory into RAM ready for saving and loading from the Microcas-sette tape is known as MOUNTing the tape. This can be achieved in a number of ways:
i) By pressing the and keys simultaneously in the System Display
ii) By executing the MOUNT statement in BASIC, in direct mode.
i) By using the DIR H: command in CP/M, if the tape has not been mounted.
ii) By logging into drive H: from the CP/M command line if the tape has not been mounted.
iii) By saving a file to a tape which has not been mounted.
iv) By executing a command which loads a file or data from the Microcas- sette if the tape has not been mounted.
v) By exiting from a program when the tape has been REMOVEd, if the cur- rently logged in drive is drive H:.
vi) By using the MOUNT command in a BASIC program line.
The contents of the directory stored in RAM (RAM directory) are accessed each time a tape file is read from or written to, that is the directory is updated in RAM. This means that the contents of the tape directory must be replaced with the contents of the RAM directory before removing the tape, otherwise it would not be possible to access the files.
The tape can be REMOVEd by one of the following methods:
i) By pressing the and keys simultaneously in the System Display mode .
ii) By executing the REMOVE statement in BASIC.
Because of the danger of replacing tapes or mounting them when another is already mounted, the System Display will not allow any operation other than removing a tape, once a tape has been mounted.
It is best to get into the habit of checking whether a tape is mounted or not. ALWAYS press CTRL and WHELP to check the status of the tape before REMOVAL or INSERTION of a new tape. This is especially important since the tape could have been MOUNTed without you remembering having done so, for instance by a DIR access.
If you change a tape without executing the REMOVE statement in BAS-IC or using the REMOVE on the System Display, you will not only des-troy data on the new tape, but you will also destroy data on the old tape.
When you REMOVE a tape either in BASIC or through the System Display, the following will occur:
i) If the REMOVE option was taken from the System Display, the bottom three lines of the screen will clear to ask you if you wish to remove the tape. If you do not wish to do so press the w key. If you press the v key, the screen will clear and the message “remove” will appear on the screen for a brief moment. The directory will not be written back to the tape but will simply return to the System Display.
ii) If the REMOVE was executed from the BASIC command line, the cur- sor will simply return after printing "Ok".
iii) If the REMOVE was executed from a BASIC program, it will continue from the next line.
iv) The EJECT button can then be pressed and the tape removed or replaced. The directory will not be written to the tape, in any of these cases.
i) The tape will rewind.
ii) If the REMOVE option was selected from the System Display, the bot- tom three lines of the screen will clear to ask you if you wish to remove the tape. If you do not wish to do so press the w key. If you press the v key, the screen will clear and the message “remove” will appear on the screen to show that the tape is being removed.
iii) The REC light will go on and the directory in RAM will be written onto the tape.
iv) When the directory has been written back to the tape, the REC light will be extinguished. The System Display will return if that is where the RE- MOVE was initiated. If the BASIC command ‘REMOVE’ was used, either the cursor will return if REMOVE was executed from the command line, or it will continue with the next line of the program.
v) The EJECT button can then be pressed and the tape removed or replaced.
g) Checking if the tape is mounted
If you need to know if the tape is mounted, press the key together with the key to show the System Display. Look at the bottom line. If it says:
this indicates that the tape directory has been mounted. You can use to return to whatever else you were doing, or press the and key to REMOVE the tape.
h) Using software with the Microcassette drive
The microcassette drive can be used in the same manner as a disk device. The drive name H: is assigned to the microcassette drive.
i) Obtaining a directory of the Microcassette tape
Type DIR H: in the CP/M operating mode (that is, when the system prompt
ii) Executing a program from the Microcassette Drive
The microcassette drive is used in exactly the same way as any other drive. Since the Microcassette drive is drive H:, to run the program "PROG.COM" from the Microcassette drive type the following on the CP/M command line:
iii) BASIC and the Microcassette Drive
The BASIC statements and functions concerned with the microcassette drive are as follows.
|INPUT #||PRINT #|
|INPUT$||PRINT USING #|
|LINE INPUT #||PUT|
For details of these statements and functions, refer to the PX-8 BASIC Refer-ence Manual.
Note that the DSKF function does not return meaningful values with the Microcassette drive.
i) The Stop and Non-Stop mode and verification
Tape storage is different from a conventional floppy disk, in that the data is saved sequentially. On a floppy disk if there is a read error it is possible to go back to the area on the disk which was mis-read and try again. On a tape this is not possible unless the tape is rewound, which is not a practical proposition. The data is thus stored twice on the tape, so that if an error in reading occurs there is chance for another attempt. Another problem with tape access which does not occur on a floppy disk, is that frequently the tape can go past a block of data because the tape did not stop in time when the previous block was read.
These problems can be overcome by frequent stopping and starting of the tape, both when reading and writing. The System Display allows two different modes of reading and writing the data, the Stop and Non-Stop modes. See section 2.2.4.e. for how to set the Stop and Non-Stop modes. By stopping the Microcas-sette drive frequently the data can be placed on the tape more accurately when writing and will allow more accurate reading also.
When data is written to the tape, the following sequence occurs. A short length of the tape is erased then a header block is written. This contains information such as the name of the file and its type, and various data dealing with the length of the file, the tape counter etc. Then the data is written in blocks of 256 bytes each block of data being duplicated. Finally the data is followed by an end of file marker. If the Stop mode is set, the microcassette drive stops between each block as it is written. If Non-Stop mode is used when the data is written, the data is written without stopping.
In reading and writing files using the STOP mode this has the following effects:
|i)||More tape is used when the Stop mode is used to write a file.|
|ii)||The file takes longer to write.|
|iii)||When reading a tape written in the Stop mode, more accurate reading is possible.|
|iv)||In extreme cases errors can occur in reading files written in Non-Stop mode. This is most likely to happen when reading single records from a file as this requires the Microcassette drive to be stopped and started by the program. When the tape stops under program control it cannot al- ways stop in the correct position in front of the next record. Thus it can miss the record or part of it and generate an error. This can be overcome by reading the record in Stop mode. As further security against this error occurring read and write such files in Stop mode, by setting the STOP mode from the System Display before running the program.|
j) The Verify and Non-Verify mode
In order to ensure accurate recording of data on a Microcassette tape, it is pos-sible to have the data checked by specifying the Verify mode when the data is written. The Verify mode is switched on and off from the System Display. (See section 2.2.4.e.)
In the verify mode, each 256-byte block is verified after the entire file has been written to the tape. If an error is detected, one of the following messages is displayed.
BDOS ERROR ON H: BAD SECTOR (under CP/M)
Disk Read error (under BASIC)
In the Non-verify mode, files written to tape are not verified. It is recommended that the verify mode be used when writing files to cassette tape.
When a file is written, the Microcassette drive will carry out the following procedure:
|i)||The tape will be wound to the next available position. Sometimes it may rewind to the beginning of the tape and then wind on so that it can be sure to be at the correct position.|
|ii)||The REC light will come on and the file will then be written to the tape. The tape may stop and start if the Stop mode is set.|
|iii)||The REC light will go out.|
|iv)||If Verify is set, the tape will be rewound to the start of the file and the file will be checked.|
|v)||The tape will stop and the EJECT button will be unlocked.|
Verify does not operate when reading tapes.
k) Rules for day to day use of the Microcassette Drive
|1)||Always check that a tape has been REMOVEd before taking it out of the drive, otherwise the directory will not be written back to the tape, and could be written to another tape.|
|2)||Never use DIRINIT without checking the directory of a tape if it is not a new one.|
|3)||Never switch off while a file is being recorded or read. The file will not be appear on the directory if the power is switched off manually while record- ing is taking place.|
SUMMARY OF MICROCASSKTTE DRIVE OPERATION
|System Display mode||Execution in BASIC||Function|
|mount||SHIFT + PF2||MOUNT||Reads the tape directory|
|remove||SHIFT + PF1||REMOVE||Writes the tape directory|
|dirinit||SHIFT + PF3||Prepares a new tape for use|
|<<-||PF1||WINDn||Tape Fast forwrd|
|->>||PF4||WINDn||Rewinds the tape|
|<||PF2||Plays the tape through the speaker|
|erase||SHIFT + PF4||Erases the contents of the tape|
|PF3||Stops the tape|
|000||PF5||TAPCNT=O||Resets the tape counter to zero|
Many computers are able to plug in programs which are then instantly able 'to be run. The PX-8 has a slight variation on this concept. The programs are sup-plied in a ROM which is similar to the program cartridge, but is used by the PX-8 operating system as if it were a disk drive. There are two ROM sockets in the base of the PX-8 which contain the BASIC language and a number of CP/M Utility programs, when you purchase the PX-8. If you have been sup-plied with other programs in ROM you can change them as follows.
a) Changing ROM capsules
1) First check with the applications program manual that no special instruc-tions are given for changing ROMs. This is only likely to occur if the pro-gram requires more than one ROM for operation. An example of this is given below.
2) Carry out whatever operations are necessary to return to the MENU or to the CP/M command line.
3) Switch the power off using the power switch.
4) Remove the ROM compartment cover as shown below and lift the silver coloured flap. The two ROMs lie side by side and are held in a carrier.
5) Remove one of the the ROM capsules indicated by the arrows by lifting the tabs at the top and base of the ROM. Do not use excessive force
6) Now take the ROM capsule you wish to insert into the PX-8. The plastic carrier has two tabs. Hold it so that the tab with two holes is towards the back of the PX-8. Then place the carrier over the ROM socket so that it sits loosely in the socket.
The carrier and socket are made like a key and a lock. It is only possible to fit the carrier into the socket the correct way.
Now gently push the ROM and plastic carrier so that they fit level with the top of the socket. Use two fingers, one at the top and one at the bot-tom, to ensure even pressure.
7) Finally return the silver coloured flap to its original position and replace the outer plastic cover.
8) Turn the power back on.
9) If you are on the MENU page, press the key to go to the CP/M com-mand line. From the CP/M command line carry out a warm boot by press-ing - or the key.
10) The programs can be loaded from drive B: if the ROM has been placed in ROM socket 1, and from drive C: if placed into ROM socket 2. The assignment of the sockets to different drives, can be changed using the CON-FIG program described in Chapter 3.
WARNING: Only pick up the ROM by the plastic carrier. Do not touch the metal pins of the ROM with your fingers. This can cause the pins to cor-rode, and could also destroy the program contained in the ROM.
b) Using the ROM as a disk to contain data or BASIC programs
Some application programs may use data which is provided in ROM form. The manual which comes with the program will describe how to use this data. The program will have a command or specifically prompt you to change the ROM. Alternatively the manual may tell you to change the ROM in order to run the BASIC program. If the program is a BASIC program you can use it from ROM as follows:
1) When you have loaded BASIC, switch the computer off in the continue mode by switching the power off while pressing the key.
2) Remove the BASIC ROM, and insert the program ROM as in steps 4 to 7 of the description of changing the ROM.
3) Switch the power back on.
4) From the BASIC command line type the RESET command followed by the key.
5) You can now load the program or data from the ROM, treating it as any other drive.
Previous chapters have described the use of part of the memory area to store programs. This is referred to as the RAM disk. The size of RAM disk in the main memory is at most 24K bytes. If your applications require more memory space, an optional RAM disk unit of larger capacity can be connected to the system bus connector. This is known as an Intelligent RAM disk
Two types of optional RAM disk units are available: one is of 60K bytes (Model H102A) and the other is of 120K bytes (Model H103A). (These units actually contain 64K and 128K of RAM. However, some RAM is used by the firmware so is not all available to the user.)
When an Intelligent RAM disk unit is connected, the internal RAM disk can-not be used. When fitting an additional RAM Disk Unit the PX-8 must be in-itialized, and the disk formatted in the same way as the RAM disk which uses part of the internal memory. When initializing either pressing a 7508 (sub-CPU) reset switch or using the - keys while pressing the reset button, the PX-8 will know that an external disk is connected. There will be no request for the size of the RAM disk, but it will still be necessary to format the disk.
If you try to write to the RAM disk when the write protection switch is on, a BDOS error messaage will be displayed on the screen.
CP/M manages the organisation of saving and loading programs to the RAM disk, just like any other disk, with the following additional features:
|i)||Input and output speed is much higher than other disk devices even ordi- nary floppy disk drives.|
|ii)||The PX-8 is very little larger in size and weight than without the disk added.|
|iii)||The Intelligent RAM disk can be write protected with a switch and so per- manently protected.|
Apart from having more available memcry, the Intelligent RAM Disk Unit is used in exactly the same way as the normal RAM disk. It cannot be changed in size, nor can any of the PX-8 RAM be used if the Intelligent RAM disk is attached. Thus when initializing with an Intelligent RAM Disk connected, no message will come up asking for the size of the RAM disk. You will be asked whether it should be formatted however.
When an Intelligent RAM Disk Unit is fitted, a check of the contents is made each time on power up, to ensure the data is intact. This only occurs if DIP switch 4-5 is set to ON. If the data is corrupted, the screen will clear and a mes-sage will appear to ask if you wish the RAM Disk to be formatted. The check takes eight seconds. If DIP switch 4-5 is set to the OFF position this check will not be performed. Since it is unlikely that the data will be corrupted, it is often more convenient to set the switch to OFF. It is necessary to perform a reset in order to activate this DIP switch. Take care not to alter the country settings.
When setting the size of the RAM disk using the CONFIG program, if the In-telligent RAM Disk is connected, the size will be displayed but there will be no option to change the size.
The Intelligent RAM Disk unit has its own battery to preserve the contents of the memory when the PX-8 is not in use. This backup switch should be set to ON when the unit is installed. However, if the unit is disconnected from the PX-8 for long periods of time, the switch should be turned off so that the bat-tery does not completely run down.
The battery does not allow the Intelligent RAM Disk unit to be disconnected and then used on a different PX-8 while still keeping the contents of memory intact.
Additional Floppy Disk Drives are provided for use with the PX-8.
As the drives are a separate item, they have a their own manual to show how to use them. There are also separate programs for copying and formatting disks plus other software. Use of these programs is covered in the manual supplied with the disks.
Please consult your EPSON dealer for further details of the Floppy Disk Drives.
The PX-8 is equipped with an RS-232C interface and the operating system sup-ports a communication speed of up to 19200 bps. The RS-232C interface is used to communicate with other computers, to modems acoustic couplers and printers and other devices which support this communication standard.
The operation mode of the RS-232C interface can be specified with the CON-FIG program in Chapter 3 or by using the OPEN command in BASIC.
The SHIFT-IN/SHIFT-OUT and XON/XOFF functions are also supported by the operating system, but can only be set by BASIC.
The SHIFT-IN/SHIFT-OUT protocol allows the full ASCII code from 0 to 255 decimal, but only using seven bits. It only operates during seven bit trans-mission. When a code greater than 127 is required, the SHIFT-OUT (SO) code is sent to tell the receiving device to set the high bit, i.e. to add 128 to the code received. Thus if the code 65 is sent when the SO has been sent the receiving computer will interpret it as code 193 (65+ 128). The SHIFT-IN code reverses an SO condition. If a code 193 is sent at when an SI code has been sent the code will be interpreted as code 65. The SI/SO codes act as a switch. For exam-ple all characters will have the high bit set until the SI code is sent once an SO code has been sent.
When communication occurs with two devices using XON/XOFF protocol, the transmitting device can be told by the receiving device to wait until the receiv-ing device is ready to handle further information. This is important if the receiv-ing device is processing the information and needs time to carry out some operations before receiving more data.
The codes for SI/SO, XON/XOFF are: –
A warm boot will set the default setting of SI/SO and XON/XOFF to off, and thus to ensure they are not active, perform a warm boot before using the CON-FIG program to set the parameters.
The CONFIG program does not allow the XON/XOFF or SI/SO protocol to be set. This can only be done from BASIC, or a machine code BIOS call.
WARNING: When sending data which could contain these characters for example a machine code program, the SHIFT-IN/SHIFT-OUT and XON/XOFF options should be set to off. If this is not done, when the receiving device is sent any of the above characters it will be interpreted as such and the appropriate action will be taken. Consequently the data received will have the bit setting changed in the case of SI/SO. Also the particular character being sent as control data (SI/SO/XON/XOFF) will not form part of the data received as it will have been interpreted as a control character.
Before using TERM or FILINK execute a warm boot to set the RS-232 parameters to the default, and then change them using the CONFIG program if necessary. This ensures the SI/SO and XON/XOFF parameters are set to off.
The RS-232C interface can also be used in BASIC programs. For details of use, refer to the PX-8 BASIC Reference Manual.
The PX-8 uses the RS-232C interface to connect a printer unless the system configuration is changed with the CONFIG command.
The following command transmits the contents of file SAMPLE.TXT to the RS-232 interface.
PIP PUN: =A:SAMPLE.TXT
The following command receives data from the RS-232C interface and saves it on the disk in drive A: under the file name SAMPLE2.DAT.
PIP A:SAMPLE2.DAT = RDR:
The default settings of the RS-232C interface operation mode are as follows.
|Communication speed:||4800 bps||Parity check:||No|
|Character length:||8 bits||SI/SO control:||No|
|Number of stop bits:||2||XON/XOFF control:||No|
A warm boot will always return the RS-232C settings to these defaults.
The RS-232C interface connector is provided on the rear panel.
The pin assignments and signal descriptions are as follows.
The standard RS-232C interface is connected to external devices through a minia-ture connector. Pin assignments of this connector are as follows.
|Pin No.||Stol||Direction||Description of Signal|
|4||RTS||OUT||Request to send|
|5||CTS||IN||Clear to send|
|6||DSR||IN||Data set ready|
|7||DTR||OUT||Data terminal ready|
|8||DCD||IN||Data carrier detect|
The direction of signal is as viewed from the PX-8.
The meanings of the various signals are as follows.
This terminal is used as the return line for the following signals.
TxD is the signal used from transmitting data from the PX-8 to the device (acous-tic coupler, etc.) with which the PX-8 is connected. This is possible when the Clear to send signal is on.
RxD is the data signal from the acoustic coupler or other RS-232C compatible device to the PX-8.
RTS(Request to send)
RTS is the signal which controls the communication function of the device (acoustic coupler, etc.) connected to the PX-8. The connected device becomes ready to send when this signal is ON.
CTS(Clear to send)
CTS is the signal which indicates whether the connected device is ready to ac-
DSR(Data set ready)
DSR is the signal which indicates whether the connected device is ready for oper-ation. When this signal is ON, the applicable device is connected to the inter-face cable and is ready to accept data transmission/reception control signals.
DTR(Data terminal ready)
DTR is the signal output by the PX-8 to the connected device to indicate that it is ready to receive data.
DCD (Data carrier detect)
The DCD terminal is used for detecting the carrier signal from the connected device.
This terminal is connected to the chassis of the PX-8; ordinarily, it is also con- nected via the external cable to the corresponding terminal on the other device. RS-232C cables Please consult your Epson dealer for the correct type of cable to connect to the other equipment. The cables available from EPSON are as follows: – 1) Cable # 724 This cable is used to connect the PX-8 to a modem or acoustic coupler. 2) Cable # 725 This cable is used to connect the PX-8 to a computer which is equipped with an RS-232C interface and a DB25 connector. It is also used to connect the PX-8 with a serial printer or other I/0 device which is equipped with an RS-232C interface. 3) Cable # 726 This cable is used to connect two PX-8s through the RS-232C interfaces. This is also referred to as the null modem cable.
The serial interface is used to connect optional disk drives (drive D:, E:, F: and G: in the default assignments) or a serial printer. The location of the interface
The serial interface is connected to external devices through a miniature con-nector. Pin assignments of this connector are as follows.
The direction of signal is as viewed from the PX-8.
The communication speed is 38400 bps when disk drives are connected and 4800, 600 or 150 bps when a printer is connected. When the serial interface is chosen as the printer interface, the default setting is 4800 bps. Which device is con-nected is determined by the CONFIG program.
Cable # 723 (Fig. 4.20) is used to connect disk drives and cable # 725 (Fig. 4.16) is used to connect a printer.
The PX-8 can also detect than an EPSON Floppy Disk Drive is attached and will automatically set the baud rate to 38,400 baud without the need to use CONFIG.
When a printer is selected, logical device LST: is assigned to the serial inter-face. Therefore,
PIP LST: = A:SAMPLE. TXT
Many applications of the PX-8 will require the use of a printer, e.g.
documents entered using Portable WordStar™ . It is also convenient to have a
hardcopy (i.e. a copy printed on paper) of BASIC program listings, disk
directories and many other day to day transactions.
4.4.1 Connecting a printer
To connect an EPSON printer to the PX-8 an additional serial interface is re-quired. The printer must be connected to the interface connector (RS-232C or serial) which has been selected by the CONFIG command. The default setting is to the RS-232 interface. The data transfer rate should be set to 4800 bps on both the printer and the PX-8. This is the default setting on the PX-8, but may have been altered for other communication. The current setting can be found using the CONFIG program.
If the PX-8 and the printer have different transmission rate settings the result will be that the output to the printer will be unintelligible. For example:
The MX, RX and FX series printer have a DB25 connector on their serial inter-face and require cable #725. If you have problems in connecting your EPSON printers or any other printer please consult your EPSON dealer.
For details of printer specifications and control codes, refer to the
operating manual provided with the printer.
4.4.2 Using a printer with the PX-8
The printer is controlled automatically when you use Portable WordStar™ or other programs outputting data to the printer.
A printer connected to the interface selected by the CONFIG command is as-signed to logical device LST:. Therefore, any file data can be output to the printer using the PIP command as shown below.
PIP LST: = filename.ext
Any data output to the screen by CP/M, can be echoed to the printer if the - P key is pressed. This acts as a switch, turning the output on the first time it is pressed, and off the second time. Thus DIRectories of disks and output from utilities such as STAT can be obtained by pressing - P before giving the appropriate command.
The contents of the real screen can be output to the printer by pressing the key together with the key (screen dump). If the screen mode is 0, 1, or 2 then the code will be sent to the printer in ASCII format. If the screen is in mode 3 (the graphics screen), all data including alphanumeric characters l will be output in bit image mode (i.e. as dots). All EPSON printers can print such data, some other printers may not be able to. When data is sent as ASCII I codes, graphics characters can only be printed if the printer contains those characters in its character set. Some EPSON printers have the characters in-cluded. For upgrading of your printer, please consult your dealer. If you do not have the graphics characters on your printer, change the screen mode to mode 3 and use the - key combination to give a graphics dump of the screen.
The ASCII code for the graphics characters may produce unwanted characters to be printed where a printer does not support them. It is possible to have the graphics characters printed as a space by setting DIP switch 4-6. This will only occur when using the screen dump program (pressing CTRL and PF5).
If the switch is set to OFF the following characters will be printed as a space. This means the graphics characters will be printed.
Codes decimal: 00 to 31, 127 and 255
hexadecimal: 00 to 1F, 7F and FF
If the switch is set to ON the graphic characters will be printed as spaces and so the following characters will be printed as a space:
codes decimal: 00 to 31, and from 127 to 255
hexadecimal: 00 to 1F, and from 7F to FF
In changing the DIP switch, the reset button must be pressed to make the change effective.
When the BASIC interpreter is used, all printer-related statements and
control codes can be used for the printer connected to the interface selected by
the CON-FIG command. For details of operation in the BASIC mode refer to the
PX-8 BASIC Reference Manual.
The PX-8 is equipped with a built-in dynamic speaker. The sound volume con-trol is provided on the right hand side panel.
This speaker can be used to generate music composed by software. Sounds can also be output from the speaker in the following ways:
|i)||By the BEEP and SOUND commands of BASIC.|
|ii)||By calling the BIOS BEEP routine (see Chapter 5).|
|iii)||From the Microcassette Tape.|
|iv)||From the System Bus (see Section 4.9).|
An external speaker jack is provided on the rear panel. It is marked SP OUT.
|2||EXSP||External speaker output||0-6V||0|
|3||EXSP||External speaker output||0-6V||0|
Power: 200 to 300 mmW
When an external speaker is connected to this jack, the built-in speaker is dis-connected.
Avoid using an external speaker at high volume for an extended period of time.
The PX-8 has a built-in analog interface, which allows analog signals (voltages) to be converted into numerical data for handling by software in the PX-8. It is often referred to as an Analog to Digital converter (abbreviated to A/D). The interface is located on the rear panel marked A/D IN.
The analog interface is not supported by BASIC but can be used with a short machine code routine and a BIOS call. An example of such a use is given in Appendix H.
The specifications of the A/D converter are as follows:
|Input level:||O to 2.0 V|
|Resolution:||6 bits (32 mv)|
|Conversion time:||140 µs|
|Maximum input level:||4.5 V|
The PX-8 is equipped with a Bar Code reader interface.
Bar Code data is a specially printed bar-code which can be read with a special Wand, which is plugged into the BRCD socket on the back panel of the PX-8. Such codes are common on food packages and many other products through-out the world. Fig. 4.27.b shows an example of a Bar Code, and the Wand used to read it.
Bar code reader (3-pin jack)
|2||BRDT||Bar code read data||TTL||I|
|3||+5||Turned on and off by program||4.5 – 6V|
The use of a Bar Code reader requires special applications software. It is not supported by BASIC or the PX-8 operating system. Please consult your EP-SON dealer for further information on its availability.
Many users and hardware manufacturers may wish to make prototype versions of optional products for the PX-8. Also construction details of add units are often published in books and magazines. The Universal Unit is a printed cir-cuit board in a suitable case which makes it easy for such items to be constructed.
The system bus interface connector is provided on the rear panel. This connec-tor is used to connect an external RAM disk unit, the Universal Unit (section) or other special dedicated hardware.
The system bus cover can be removed with a screwdriver as shown below.
The pin assignments of the system bus connector are as follows:
|Signal name||Pin No.||I/0||Remarks||Signal level|
|AB15||7||0||Z-80 address bus (no buffer)||TTL|
|5||12||I/0||Z-80 address bus (no buffer)||TTL|
|BB 7||24||I/0||Z-80 Data bus (no buffer)||TTL|
|Signal name||Pin No.||I/0||Remarks||Signal level|
|WAIT||28||I||Z-80 wait signal||TTL|
|BURQ||25||I||Z-80 bus request||TTL|
|BUAK||26||O||Z-SO bus acknowledge||TTL|
|MRQ||36||O||Z-80 memory request||TTL|
|RD||35||O||Z-80 data read||TTL|
|WR||37||O||Z-80 data write||TTL|
|IORQ||40||O||Z-80 I/0 request||TTL|
|MI||27||O||Z-80 Ml (machine cycle 1) signal||TTL|
|CLK||38||O||Z-80 main clock, 2.45 MHz (1 buffer stage)||TTL|
|RS||33||O||System reset signal (backup)||TTL|
|INTEX||43||I||External interrupt signal||TTL|
|SPI||34||I||External speaker input (D-MDM)||0 to 5V|
|BK2||48||I||Bank 2 switching signal BK2=0:BANK2||TTL|
|DW||42||O||RF control signal for expansion DRAM||TTL|
|DCAS||41||O||RF control signal for expansion DRAM||TTL|
|OFF||44||O||Logic power supply (+ 5V) ON signal;
logic power turned on when PON=0
|TXD||46||O||82C51 TXD output signal||TTL|
|RXD||45||I||RXD signal to 82C51 from external option||TTL|
|VB1||47||P/S||Battery power supply; not affected by SW
|HLTA||30||O||Battery power Supply: turned On/Off by
SW on board
|VCH||39||P/S||Power supply for battery charging (AC
|6 to 8V|
|VL||29||P/S||Logic power supply||4.5 to 6V|
The direction of signal is viewed from the PX-8
With an acoustic coupler, you can connect the PX-8 to a computer (such as another PX-8, Epson Qx-10 or a large computer) in another place using the telephone line. Data is transfered through the RS-232C interface.
The TERM and FILINK utility programs described in Chapter 3, enable com-munications to be handled with a minimum of effort. More information is given under these programs.
Such communication can also be achieved in BASIC.
Cable # 724 is required to attach to an acoustic coupler with a DB25 connector.
The acoustic coupler models available differ from country to country. See your Epson dealer for detailed information.