PIC Based Enhanced 555
Since I retired in 2012, I have been volunteering
technical assistance at a network of FM radio stations
throughout the state. One of the issues they have had is
that a device they use at several remote transmitter sites
does not connect to the Internet router properly after a
power outage. The station manager asked me if there was
anything I could design that would help.
What I needed to build was basically a delayed one
shot where the delay is retriggerable. The operation is
such that if the audio stream coming from the target unit
stops for some period of time, it will reset the unit.
The circuit and software I developed led me to this
project: an “enhanced” multivibrator which I have used as
a 555 replacement.
The features of the software are eight decades of time
resolution, from 1 µs (range = 0) to 10 seconds (range =
7); each range has a span of 10 bits. For example, the 1
ms range spans from 1 ms to 1,023 ms in 1 ms steps.
Also, there are currently six operating modes:
1. One shot monostable multivibrator
2. Delayed one shot
3. Retriggerable one shot
4. Delayed and retriggerable one shot — both delay
and pulse width are retriggerable
5. Astable multivibrator with separate control of both
the on-time and the off-time
6. Same as 5, but with a synchronous gate
All of this is accomplished without having to reprogram the PIC in any way. The only “programming”
needed is to configure the PIC using up to four resistor
dividers. By changing some definitions in the source code,
the analog inputs may be swapped. However, RA3 and
RA5 must be kept as shown.
RA3 (pin 4) has special internal handling due to its
possible usage as the MCLR/VPP input. Its only other
allowed use is as a digital input. RA5 cannot be used as
an analog input. Due to the different pin functions, there
is no way to make the device pin compatible with a 555.
One obvious reason is that the 555 has ground on pin 1
In 1984, Forrest Mims wrote a very popular booklet
published by RadioShack: Mini-Notebook 555 Circuits. It
contains 28 circuits using either a 555 or 556. All of the
circuits are relatively simple, but they do form a very good
basis for learning how to use the 555/556. The following
article is the first of several which will detail the emulation
of a 555 or 556 using a PIC. This particular
implementation does both the monostable and astable
modes, and is meant to be used only as a 555 or 556
emulator. Future articles will discuss the software needed
to share the PIC's resources so that the emulation can be
embedded within another application.
Replacing the
555 with a PIC
By Larry Cicchinelli
34 December 2016
Post comments on this article and find any associated files and/or
downloads at www.nutsvolts.com/magazine/article/
December2016_Replacing-555-with-PICs.