Chapter 9 speaker – Remote Processing RPC-150 User Manual
Page 23

CHAPTER 9
SPEAKER
RPC-150
Page 21
Figure 9-1 Speaker pin location
Figure 9-2 Interface schematic
DESCRIPTION
Pin 16 on the card edge connector is the speaker output
from the 64180 C PU c hip. This por t can be used to
drive a sp eaker. The SO UN D com mand is use d to
generate a frequency.
Connecting a speaker
Refer to figure 9-2 below for circuit connections to a
speaker. T he series resistor determines the volume. the
Capacitor sets the lower frequency limit. Generally,
values from 100 uF to 470 uF ar e adequate. The
speaker may be any value but those with 50 ohms or
greater produc e higher s ound output.
WARNING:
Do not connect pin 16 directly to a
speaker, ground, or + 5V, even
momentarily, as damage to the CPU
will result.
SYNTAX
S O U N D frequency[,time]
Where: frequency = 2 0 to 1 50 0 0 H z
time = time in seconds
SOUN D stops executing when CAM BASIC is not
running a progr am. The outpu t will be at frequency until
SOUND is executed without a parameter or the optional
time is timed out.
frequency is not exact. It is, however, accurate enough
for most alar m or aud io feedback applications.
NOTE: When SOUN D is used with a time parameter,
program execution is suspended until it is timed
out.
Program ming ex ample
The following example produces tones from 200 to 5000
hz and back dow n again in 500 hz increm ents.
10 FOR N = 200 TO 5000 STEP 500
20 SOUND N,.5
30 NEXT
40 FOR N = 5000 TO 200 STEP -500
50 SOUND N,.5
60 NEXT
70 GOTO 10
To stop program execution, press the < esc> key.