EasyManua.ls Logo

Commodore Plus 4 - Page 396

Commodore Plus 4
464 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
384
Using
Peripheral
Devices
Handling
the
Phone
with
the
1660
Auto
modem
The
1660
can
be
used
to
dial
and
answer
the
phone.
Dialing
can
be
done
with
touch
tone
frequencies
or
standard
pulse
dialing.
Location
64784
($FD10)
controls
the
phone.
First,
make
sure
the
phone
is
hung
up:
POKE
64784,PEEK(
64784)
OR
64
Then,
wait
briefly
and
pick
up
the
phone
with
POKE
64784,PEEK(64784)
A1TO
191
Touch
tone
dialing
is
done
by
sending
two
tones
to
the
phone
simultaneously.
Each
tone
corresponds
to
a
row
or
column
on
the
touch
tone
pad.
Column
1:
SOUND
1,931,5
2:
SOUND
1,940,5
3:
SOUND
1,948,5
Row
1:
SOUND
2,864,5
2:
SOUND
2,879,5
3:
SOUND
2,893,5
4:
SOUND
2,905,5
Pulse
dialing
is
done
by
repeatedly
picking
the
phone
up
and
putting
it
down
(as
described
above;
see
the
example
program).
To
answer
the
phone,
first
hang
it
up
(as
above);
then
wait
for
a
ring
with
linenumber
IP
PEEK(64784)AKD1S8
THEN
linenumber
When
the
phone
is
ringing,
bit
7
is
cleared
and
the
logical
statement
is
false,
so
the
program
continues.
Then
execute
the
statement
that
picks
up
the
phone.
Example:
This
example
uses
the
touch
tone
frequencies
to
dial
the
phone,
and
then
starts
communicating,
until
a
G
Q
is
typed.
For
communication
with
many
systems,
the
data
received
and
sent
has
to
be
translated
to
and
from
Commodore
CHR$
codes.
This
program
does
not
perform
such
a
function.
Also,
it
may
sometimes
be
necessary
to
check
the
status
variable
after
a
GET#
or
PRINT#.
10
VOL8
20
PORI=0TO2:READNC(I):NEXT
30
FORI=0TO3:READNR(I):NEXT