Tone (Frequency, Duration)
This command will produce the specified tone for the specified duration. Frequency is measured in Hz, and Duration is in 10 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
'Sample program to produce a constant A note (440 Hz)
'on PORTB bit 1.
#chip 16F877A, 20
#define SoundOut PORTB.1
dir SoundOut OUT
Tone 440, 1000
For more help, see:
This site hosted for free by: