Explanation:
This command will produce the specified tone for the specified duration.
Frequency is measured in units of 10 Hz, and Duration is in 1 ms units.
Please note that this command does not produce the exact frequency
specified. While it is accurate enough for error beeps and small pieces of
monophonic music, it should not be used for anything that requires a highly
precise frequency.
Example:
'Sample program to produce a tone on PORTB bit 1,
'based on the reading of an LDR on AN0 (usually
'PORTA bit 0).
#chip 16F88, 20
#define SoundOut PORTB.1
dir SoundOut OUT
do
ShortTone ReadAD(AN0), 100
loop
For more help, see:
This site hosted for free by: