#include <FREQOUT.bas>
SUB FREQOUT ( pin, milliseconds, freq1, freq2) ' declared in FREQOUT.bas
Generate a sine-wave signal on pin for milliseconds.
A single frequency or mixed dual frequncy tone may be
generated. Set freq2
to 0 for a single frequency.
The IO direction of the pin will be set to output.
The output pin might be connected to a speaker or audio
amplifier.
The sine wave signal is generated using pulse width modulation, for more details see that link.
A sample filter to make this signal compatible with an audio amp would be similar to that below
