Professional Documents
Culture Documents
9V
LED
D3
R1 + C1 LED
10k 120 F L1 D4
22 H
LED
5 D1
I-LIM VCC 6 R4 D5
1N5817
15
3 IC1 7 1
SHDN SW LED
LT1300
8 4 C2 + D6
P-GND SENSE R2 Q1
10 F 100k 2N4402 R5
1 2 1k LED
GND SEL
D7
2
D2 LED
1N5248 D8
C3 18V
R3
1 F LED
9V RETURN 1k
D9
3
LED
D10
S1
ON/OFF
Figure 1
RA6
VDD 14
VDD
+2
ⳮ
34ⱕN0ⱕ255; Ktwo, four, Figure 2 N0
+
eight, or 16; and 0ⱕⱕ0.5,where MAXIMUM fOUT
HALF-PERIOD
f is the frequency, fCLK is the clock fre- PERIOD
quency, N0 is the maximum clock-fre-
quency cycle count for each output-fre- PERIOD REGISTER
quency half-period, is the phase of the FOR TIMER 2
output frequency relative to the input fOUT 8-BIT fCLK
frequency, and K is the division factor for TIMER 2
the clock-frequency cycle count that rep-
resents the output phase of the output An XNOR-gate phase detector provides good performance with noisy signals, and a microprocessor
frequency relative to the input frequency. handles signal processing.
Adding a constant value of 2.5 to the out-
put frequency’s period count compen- a center frequency of 9266 Hz, a mini- You can adapt the digital PLL’s basic
sates for interrupt-service-routine oper- mum frequency of 8989 Hz, and a lock design to a variety of applications by
ations that slightly affect the timing. The range of 555 Hz. modifying the software and extending
calculated value of phase-lock frequency Resolution of the DCO using Timer 2 the interrupt-service routine. For exam-
is accurate to within 1.5% over most establishes the time jitter of the output ple, stopping updates to Timer 2’s peri-
of the PLL’s usable range. Because the frequency relative to the input frequency. od register puts the PLL in “coast” mode.
PLL comprises only digital circuits and Depending on the integer count written Other expansion possibilities include im-
software, operation with any combina- to its period register, Timer 2 produces plementing more sophisticated lock-de-
tion of parameters is repeatable. discrete frequencies for output frequen- tection circuitry to determine whether
You can manipulate Equation 2 to cy. When the input frequency falls be- the input frequency falls within a certain
solve for any variable in terms of the re- tween discrete output frequencies that frequency range and making dynamic
maining four. To calculate the upper and two adjacent counts produce, the PLL adjustments of the values of N0 and K for
lower limits of the lock range, set at 0.5 switches between the counts to produce better performance. You can download
and 0, respectively. To calculate the digi- an averaged but jittery output-frequency Listing 1, which is the assembly-language
tal PLL’s “center frequency,” set at 0.25, signal at the same frequency as the input source code, as well as the hex program-
which corresponds to a 90 phase angle. frequency. Using a relatively large value of ming file for IC3, from the online version
In the previous example, maximum fre- N0 reduces jitter, whereas a smaller value of this Design Idea at www.edn.com.왏
quency is 13,408 Hz, center frequency is increases jitter. To improve resolution and
11,204 Hz, and minimum frequency is reduce jitter, you can increase the clock Reference
8989 Hz. The lock range is 13,408 to frequency to 5 MHz by configuring the 1. Gardner, Floyd M, Phaselock Tech-
8989, or 4419 Hz. Increasing K to 16 microprocessor’s on-chip oscillator to use niques, Second Edition, Wiley-Inter-
yields a maximum frequency of 9544 Hz an external 20-MHz crystal. science, 1979, ISBN 0-471-04294-3.
IC IC
38-kHz carrier. The same
1 4A 2 3 4B 4 1 3
Q0
HEF4069 HEF4069
VCC
CLK
2 EN IC 5A Q1
4 B NODE circuit structure produces
HEF4520 Q2 5
R R
R 13
7
R Q3 6 LR- and L R-channel
10 11
R 330
10 10
22M
12
generation without chang-
9 11
10
CLK Q0
12 ing components’ values. Po-
ⳮV EN IC 5B Q1 C NODE
CC HEF4520 Q2 13 tentiometer P1 allows a
15 R 14
X 1 Q3
4.86 MHz 9010 fine phase adjust-
Figure 2 ment to correct distortion
and to resynchronize at zero
The pilot-tone-generator circuit uses low-cost CMOS-logic circuits plus an analog multiplexer. crossing.왏