Updated 3 January 2002
Connecting the Z88 to a Modem
BACKGROUND
When I started to use modems in 1991, it was with a Z88. So I learnt most of this the hard way.
Sometime 1991/1992 I started writing a text on using modems with the Z88. It was intended for publishing in Z88 EPROM, the Z88 Users' Club newsletter. After a lot of typing I had a system crash and lost all the text so I gave it up. Fortunately I had a printout of most of the text which I have now scanned and OCR:d. So here comes with some additions:
MODEMS
The Z88 demands very little on modem specifications. Even though you can set the Z88 baudrate to 9600, 19200 and 38400 bps, there is no gain in speed above 9600. Even at that speed there are gaps between bytes sent making an effective throughput in the region 3500 to 4000 bps. I would recommend any external modem which supports at least V.22bis (2400bps), MNP4 error correction and MNP5 data compression (throughput up to 4800 bps). In other words, pick up just about any used modem not older than 1992 or buy the cheapest new you can find as long as it is external.
CABLES
For older modems without speed buffering, error correction or data compression there is no support for, or use of, leads for hardware handshaking (flow control). The Cambridge serial cable does not have them. It is wired Z88-modem, 2-2, 3-3, 7-7. Z88 pin 5 is connected to the Z88 positive voltage source pin 9, for the Z88 to be able to send. Z88 pin 8 is also connected to the Z88 pin 9, but to be able to receive. The Z88 pin 9 is connected to the modem pin 20, for the modem to know that the Z88 is on. The pin numbering assumes a 25 pin modem port.
Reasons for using flow control between computer and modem.
- When two modems have established an error correcting link and the receiving modem detectes an error, the sending modem must resend the data until it is correctly received. Then the sending modem must stop the sending computer from sending more data to the modem than it can pass on.
- When a modem is set up for speed buffering the computer to modem baudrate can be set to the highest they both can manage (9600 bps for the Z88). Then when the modem make the connection to another modem they detect the highest speed they both can handle (300, 1200 or 2400 bps for an old MNP5 modem) and use that speed on the telephone line. Also in this case the computer can send faster than the modem can pass on.
- With proper flow control, not one single character should be lost between the two computers.
Reasons for using hardware flow control between computer and modem.
- If you are tranfering files using the Xmodem protocol, the Xon or Xoff control characters interfers with the protocol.
- If you are tranfering binary data in some other way, the data it self can contain the Xon or Xoff control characters.
- Hardware flow control is more reliable and easier to set up.
For hardware handshaking the cable should be connected Z88-modem, 2-2, 3-3, 4-4, 5-5, 7-7. The Z88 pin 8 is best connected to Z88 pin 9, and Z88 pin 9 to modem pin 20.
The Z88 pin 9 DTR to modem pin 20 DTR connection results in most cases in that when the Z88 is turned off (by timing out), the modem hangs up and you loose the connection. Wether this is good or bad is up to the user to decide. The modem command AT&D0 can be used to avoid it.
Z88 Modem
----- -------------
DB25 DB9
2 TxD ------> TxD 2 3
3 RxD <------ RxD 3 2
7 GND <-----> GND 7 5
4 RTS ------> RTS 4 7
5 CTS <------ CTS 5 8
8 DCD <-+
|
9 DTR --+---> DTR 20 4 Corrected HTML coding of '<' and '>' 3 January
This cable can be equally well used for most modems, software handshaking Xon/Xoff aswell as hardware handshaking RTS/CTS.
HAYES COMMANDS
Most modems use the Hayes AT command set to a greater or lesser extent. When the modem is turned on it is initialised to a default configuration determined by dip switch settings or saved in Non-Volatile memory. Most settings can be overridden by commands. Chanses are good that the default setting is OK, so start testing.
TALKING TO THE MODEM
- Connect the modem to the Z88. If there is a switch for VOICE/DATA flip it to DATA before turning the modem on.
- Go to Panel on the Z88 and set Transmit and Receive baudrate to a value you know the modem can handle. Maybe 300, 1200 or 2400 baud. Set Parity to None and Xon/Xoff to No.
- Go to terminal on the Z88 and type AT followed by [Enter]. AT stands for attention. Most commands starts with AT and ends with an [Enter]. In between can be one or more commands, upper or lower case, separated by spaces or not.
- If AT was not printed on the screen while typing, enter the command ATE1 [Enter]. E1 tells the modem to echo the commands you type back to the Z88.
- If the response to the AT or ATE1 command was not OK printed on the next line of the screen, but a 0 in the beginning of the same line, enter the command ATV1 [Enter]. V1 enables word response codes.
- If there was no response code, enter ATQ0 [Enter]. Q0 enables response codes.
Now you know if the Z88 and the modem can talk to each other. If not check the voice/dataswitch, the baudrate, the cable or consult the modem documentation.
TELEPHONE LINE
- Connect the modem to the telephone line. Enter the command ATX4D [Enter]. X4 enables all response codes. D stands for dial.
- If your modem has a speaker and you can't hear the modem picking up the phone and receiving a dialtone, type [Enter] ATM1L2 [Enter]. The first [Enter] quits the previous command. M1 enables speaker on until an answering modem is detected. L2 enables medium volume.
- If the response code on screen is NO CARRIER after usually 30 or 45 seconds (max 255), it is ok.
- If the response code on screen is N0 DIALTONE after 5 seconds, the connection to the telephone line is not ok.
DIALING
The first time you try dialing chose a number to an answering phone or a friend. In the example I use the number to the Liverpol Mailbox BBS which has a Special interest Z88 section. (Well, in 1992 it did).
- Enter ATDT(051)428 8924 [Enter]. T stands for touch-tone dialing. Paranthesis, hyphens and spaces are ignored.
- If the call is unsuccessful your telephone switchboard might only handle pulse dialing. Enter ATDP(051)428 8924 [Enter]. P stands for pulse dialing.
- If calling is still unsuccsessful, Enter AT&Pl [Enter]. &Pl enables make/break pulse ratio suitable for UK.
If I were to call from work 1 would enter ATDP 0 W T 009 44 W 51 428 8924. P0 pulse dials a zero to get through the company switchboard to the line. W makes the modem wait for a second dialtone. T switches to touch-tone dialing. 009 is the Swedish number for telephone calls to other countries. 44 is the UK country number.
CONNECTING TO ANOTHER M0DEM
If you call another modem you will hear some strange sounds while the modems negotiates which protocol and speed to use. Touching a key while modem negotiation will cancel the connection. When negotiation is setteled, the noice will go away and you will see a CONNECT message on the screen and the CD LED will ligth up on the modem. Now it is time to start communicating with the remote system. If you have not already got some form of command prompt or similar, press Enter a couple of times.
What you can do now depends on the remote system. You could for instance use the Z88 to connect to a UNIX shell account or a BBS system.
Screen height is often a problem since many BBS systems assume a screen of 80 columns by 25 rows and often ANSI graphics. Often the screen height can be changed by the user at least down to 10 lines, and terminal emulation changed from ANSI to TTY to make things easier. I have files describing how to set up UNIX and VMS systems screen size for using the Emacs editor from the Z88.
If you need to do binary file transfers I doubt that you are so fortunate that the remote system has an implementation of the native Z88 Import-Export protocol. I have source code for you to compile on your system if you have the ability, or friend, to do it.
Else it is easier to use Xmodem file transfers which is supported on most systems. The common UNIX/VMS SZ/RZ programs for Zmodem transfers can do Xmodem transfers if you supply the correct switches on the command line (or rename them!). There exists at least three Xmodem implementations for the Z88. The most common freely available being Z88COM by Phil Wheeler but ZCP by Richard Haw is better in most respects except it has no dialing directory.
Kermit-88 by Walter Wright is also an alternative.
Download ftp://kermit.columbia.edu/kermit/archives/z88ker.zip
Download ftp://kermit.columbia.edu/kermit/archives/z88ker2.zip
Back to Cambridge Computer Z88