monostable pulse width.
Mims Circuit 19
Circuit 19 is titled as a Three-State Tone
Generator; refer to Schematic 10. Both
sections of the 556 are wired as astable
multivibrators. The components of Section
1 cause it to operate at a frequency of
about 2.1 Hz with close to a 50% duty
cycle, while those of Section 2 cause it to
operate at about 960 Hz with a 66% duty
With the switch in position 1, the
output of Section 1 is used as a gate for
Section 2. Section 2 will output its 960 Hz
signal only while the output of Section 1 is
high; about 230 ms. With the switch in its
center position, the output of Section 2
will be a continuous signal. When in
position 3, the output of Section 1 will
affect the charge and discharge of C2,
so that Section 2 will output two
different frequencies. The difference
between the frequencies is affected by
the value of R3. The smaller the value,
the larger the effect.
You can do the same thing using
two of the PIC 555 replacements.
NCO_ 3_State ToneGen.asm (also with
the article downloads) uses a single
PIC16F18313 to emulate the same
circuit with somewhat more flexibility;
see Schematic 11.
Pins 5, 6, and 7 are an astable with separate on-time
and off-time controls, and a frequency range of about 0.1
Hz to 100 Hz. To get this low
frequency range, I used one of the
timers to generate a 200 Hz interrupt.
In the Interrupt Service Routine (ISR),
I count the number of interrupts in
order to determine when to turn the
pulse on and off. Initially, I wanted to
use one of the PWM systems but was
unable to get the low frequencies I
wanted and still maintain a higher
CPU clock frequency.
Pins 1, 2, and 3 are an astable
which uses the NCO system to
generate a square wave with a
frequency range of about 7. 5 Hz to 8
kHz. The source code in the
downloads is well documented and
should be easy to modify if you have
a need to change any of the operating characteristics. The
switch and its three positions duplicate the operation of
February 2018 43
SCHEMATIC 11. PIC three-state tone generator.
SCHEMATIC 12. 555 sound effects generator.