Commodore 128 Programmer's Reference Manual page 115

Hide thumbs Also See for 128:
Table of Contents

Advertisement

n
ONE STEP BEYOND SIMPLE BASIC
105
Here is the procedure to dial and originate a communication link:
H
1.
Set the modem's answer/originate switch to the "O" for originate.
! I
2.
Program the telephone to be OFF the hook.
3.
Wait 2 seconds (FOR I = 1 to 500:NEXT:REM 2-SECOND DELAY)
p
4.
Dial each digit and follow it with a delay (FOR I = 1 TO 50:NEXT)
If
5.
When a carrier (high pitched tone) is detected, the Modem/300 automatically
goes on-line with the computer you are connecting with.
pn
6.
Program the phone to hang up when you are finished.
'
Here is the procedure to answer a call:
PI
1.
Set the modem's answer/originate switch to "A" for answer.
i |
2.
To manually answer, program the telephone to be OFF the hook.
3.
To automatically answer, detect if the phone is ringing then program the
phone to be OFF the hook.
4.
The Modem/300 automatically answers the call.
5.
Program the phone to hang up when you are finished.
DETECTING CARRIER
Your Commodore Modem/1200 and Modem/300 are shipped from the factory with the
ability to detect a carrier on the Commodore 128.
That ability is useful in an unattended auto-answer mode. By monitoring the
carrier detect line, the computer can be programmed to hang up after loss of carrier.
Since a caller may forget to hang up, your program should monitor the transmit and
receive data lines. If there is no activity for five minutes or so, the modem itself should
hang up.
To detect carrier on the Commodore 128, the following statement can be used in a
BASIC program:
OH = 56577:
IF ((PEEK (OH) AND 16) = 0) THEN PRINT ' 'CARRIER DETECTED"
If bit 4 of location 56577 contains a value other than 0, then no carrier is detected.
ROTARY (PULSE) DIALING
In order to dial a number with a modem, the software in the computer must generate
pulses at a prescribed rate. In the United States and Canada, the rate is between 8 and 10
pulses per second with a 58% to 64% break duty cycle. Most people, however, use 10
pulses per second with a 60% break duty cycle.
So to make a call, your software must first take the phone "off-hook" (the
equivalent of you picking up the receiver). Then to dial the first digit, a 3 for instance,

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents