Tone/Phone 2068?

Author(s): J. Kevin Paulsen
Pub Details: Time Designs Magazine v3 n1 (Volume 3, Issue 1)
Date: November/December 1986
Pages: 27

No, this is not about modems…this is about using the TS 2068’s sound chip to have a little fun. We leave it to the individual as to how enthusiastic one’s fun becomes.

What we plan on doing here is simulating the tones produced by a touch tone type phone. Each button or key on a tone phone produces two tones when it is pressed. Since the 2068 has three channels of sound on the sound chip (plus another if you include the BEEP command), we easily have enough equipment to do the job.

In order to find out what tones are used I had to do some investigation. Luckily, a friend of mine at the plant where I work was taking an electronics course, and had a book at home that contained the information…and so, we’re in business.

The diagram shows the layout of a standard tone phone keypad. To the left of each row of numbers is the frequency for one of the two tones produced by that number key on the phone. At the bottom of each column is the frequency for the other tone produced by that key. For example, if you press the “1” key on a phone it simultaneously produces a tone at a frequency of 697 and a tone at the frequency of 1209.

 697 !  1  !  2  !  3
 770 !  4  !  5  !  6
 852 !  7  !  8  !  9
 941 !  *  !  0  !  #
     ! 1209! 1336! 1477

What we need to find is the coarse/fine values for the tone registers of the sound chip. On page 194 of the TS 2068 User Manual is a short program just for this purpose. A little rounding of numbers is required to get the values that come reasonably close to producing the tones we need.

Once this is done, a short subroutine like the one in the listing can be written to simulate tone dialing. The example listing is based on the assumption that it is part of an address book type file. In this case, the file is stored in a string array–d$–whose DIMensions are something like 75 different files each 128 characters long [DIM d$(75,128)]. The phone numbers are stored starting at the 117th character in each file.

Let’s review the listing: Line 2850 executes the command to open the sound chip channels, A and B, and sets up the FOR/NEXT loop for reading the phone number off the file. Lines 2852 and 2855 skip over characters which are not numerals, but are usually found in phone numbers. Line 2857 figures which line further below to call based on the number it is “reading” and calls it [GO SUB 2860+n]. Lines 2860 thru 2869 do the actual execution of the tones. The last digit of the line number corresponds to the number of the telephone key which is being simulated. Line 2870 off the tones and gives a proper break (silence) between the current and next tones. Line 2880 ends the subroutine and RETURNs you to your main program.

WARNING: You should not use this on your phone as your 2068 in not FCC approved for use as telephone dialing equipment. This is merely for simulation and fun. You certainly don’t want the boys from Washington knocking on your door.

Enjoy your Tone/Phone 2068!

2840 PRINT "Press D to dial"
2842 GO TO 2842+(INKEY$="d")
2850 SOUND 7,60: FOR d=117 TO 128
2852 IF d$(f)(d)="-" THHEN GO TO 2875
2855 IF d$(f)(d)=" " THEN GO TO 2880
2857 LET n=VAL (d$(f)(d)): PRINT n;: GO SUB 2860+n
2858 GO TO 2870
2860 SOUND 8,15;9,15;0,116;1,0;2,82;3,0: RETURN
2861 SOUND 8,15;9,15;0,156;1,0;2,90;3,0: RETURN
2862 SOUND 8,15;9,15;0,156;1,0;2,82;3,0: RETURN
2863 SOUND 8,15;9,15;0,156;1,0;2,74;3,0: RETURN
2864 SOUND 8,15;9,15;0,142;1,0;2,90;3,0: RETURN
2865 SOUND 8,15;9,15;0,142;1,0;2,82;3,0: RETURN
2866 SOUND 8,15;9,15;0,142;1,0;2,74;3,0: RETURN
2867 SOUND 8,15;9,15;0,128;1,0;2,90;3,0: RETURN
2868 SOUND 8,15;9,15;0,128;1,0;2,82;3,0: RETURN
2869 SOUND 8,15;9,15;0,128;1,0;2,74;3,0: RETURN
2870 PAUSE 10: SOUND 8,0;9,0: PAUSE 1
2875 NEXT d
2880 RETURN
Touch-tone desk telephone
Touch-tone desk telephone

Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.