Sound – Remote Processing CAMBASIC User Manual
Page 150

Comm ands - 117
SOUND
COMMAND
SYNTAX:
S O U N D frequency
S O U N D
PURPOSE:
Gener ates a squar e wave sig nal at frequency.
REMARK S:
frequency is from about 8 Hz to about 60 KHZ, depending upon the system
Using SOUN D with out any parameter s turns it off.
The frequency argum ent is used in a C PU tim er. For the RPC -150 and R PC- 2300, the clock is
230.4 KH z. F or the RPC -2350 it is 460.8 KHz. If frequency is an exact multiple of this number,
the output will be accurate.
F o r a ny f re q ue n cy , t he a ct ua l f r e qu e nc y is c al c ul a te d as fo ll ow s . A n e x am p le f re q ue n cy o f 1 0 00 H z
on the RPC-2350 is used.
1
Internal c lock (230. 4 KHz o r 468. 8 KHz) / desire fr equency = ratio
468800 / 1000 = 468.8
2
Round the ratio (468.8 become s 469)
3
Actual frequency is determined.
Internal clock / ratio = Actual frequency
468800 / 469 = 999.6
NOTE:
The RPC -2350 uses the same timer as SOUN D for RS-485 com munications. You
c a nn o t u s e R S -4 8 5 a t t he s am e ti m e a s SO U N D .
RELATED:
none
EXAMPLE:
10
SOUND 1000
ERROR:
< Data neg> - if frequency is < 0
No err or occurs when frequency > 65, 535, but output is not cor rect.