English
Language : 

AN912 Datasheet, PDF (8/16 Pages) Microchip Technology – Designing LF Talkback for a Magnetic Base Station
AN912
The PIC16F648A has various comparator options.
Figure 10 shows the topology that was chosen for this
application. The main filter output signal “ENV_IN” is
connected to comparator C1 via RA0. Resistor R10
was placed in series with the output of the filter to have
10 kΩ impedance. Together with the 4.99 MΩ resistor,
R11 adds an additional 10 mV of hysteresis. The
comparator has a combined offset and hysteresis of
10 mV, in the worst case, making for a total of 20 mV of
hysteresis, in the worst case, and about 15 mV on
average. It should be noted that the output of compar-
ator C1 has to be inverted by setting bit C1INV, in the
CMCON register. The output inversion is needed to
result in positive feedback, via R11, as is shown in
Figure 9. At first glance, it seems as if R10 can be
removed and R11 changed to a 2.43 MΩ resistor, but
the capacitor C12 will cause delay and that can lead to
instability.
FIGURE 10:
Two common Reference Comparators with Outputs
CM2:CM0 = 110
RA0/AN0
RA3/AN3/CMP1
A VIN- -
D
VIN+
C1
+
C1VOUT
RA1/AN1
RA2/AN2/VREF
RA4/T0CKI/CMP2
A VIN- -
A
VIN+
C2
+
Open Drain
C2VOUT
There are additional aspects around the decoupler that
need to be explained for the system as it is imple-
mented. The port pin RB7 is essentially an open circuit
when it is configured as an input and the input voltage
is between VDD (5V) and ground. All the general
purpose I/O pins have internal ESD protection diodes
that become conductive when a pin voltage is forced
outside the VDD to ground range. This has the effect
that the RC time constant for the decoupling stage is
reduced to 11 µs from 177 µs whenever the “BIAS”
signal is about 0.6V above VDD, or below ground even
if RB7 is configured as an input. The addition of R3
works well, but keep in mind, the stable DC voltage for
signal “A”, shown in Figure 11, is 2.5 VDC and the signal
“BIAS” is either 5V or ground. One can implement one
of two approaches to correctly bias the signal at point
“A”.
The first solution is to toggle RB7 between high and low
with a 50% duty cycle at 20 kHz or more. This is
equivalent to connecting the “BIAS” signal to the
desired 2.5 VDC. This is only done for a short period
after the tank is turned on or off, to force the decoupler
to stabilize faster than it would with just R4. The second
approach is to force the signal “A” in the required
direction. The voltage at “A” will go above VDD if the
tank is turned on after it has been turned off for some
time. The “BIAS” signal can be grounded during the
turn-on transient period until the voltage at point “A”
reaches the desired 2.5 VDC or VREF. By monitoring
either of the comparator output signals, it is possible to
detect when the voltage at point A goes through VREF.
Pin RB7 can be turned into an input as soon as the
cross over is detected resulting in a decoupler RC time
constant of 177 µs. The filters introduce delay that
cause some overshoot of the voltage at point “A”. The
overshoot can be resolved by allowing some additional
stabilizing time with R4, before LF communication is
interpreted as data.
DS00912A-page 8
 2004 Microchip Technology Inc.