PIC Frequency Counter with Frequency Lock function

PIC Frequency Counter with Frequency Lock function Written by: OH6CJ Osmo 13th of January 2002 E-mail: [email protected] This PIC software combines freque...
Author: Horace Lloyd
6 downloads 0 Views 156KB Size
PIC Frequency Counter with Frequency Lock function Written by: OH6CJ Osmo 13th of January 2002 E-mail: [email protected] This PIC software combines frequency counter and frequency lock functions. By adding couple of transistors and operation amplifier TL082, it is possible to lock the LC oscillator frequency. Let’s look at the following block diagram. Software functions are presented inside the dashed area.

Closed Loop Control of Frequency Lock Freq. Input

0V Integrator

COMP

Frequency Counter

+

I1 >> I2 I1 I1> I2

SUB Frequency Reference

100ms

>1

&

fine tuning

2.4ms

I

I1 = 0

-

f out

I2 I1< I2

2.4ms

0 State Machine, Freq_lock Logic & Parameters

VFO

>1

I1 0 then default values are loaded on the next power-on.

00h

FFh

32h = = 5 s. 05h ==5 samples

Final test If the previous tests and settings have been successfully performed, it is a time to do connections between the frequency counter and frequency lock printed boards as well as connections to the oscillator circuit. Activate the Freq_Lock function by par. 0Bh. Reconnect the voltages to the boards and start to observe the LEDs D3 and D4. When the frequency reference has been sampled and set, the character “L” is displayed in the LCD. Observe the LEDs. Only short pulses should be seen seldom if there is a need to fine-tune the oscillator frequency. Long pulse can only been seen if the VFO drifts over 20 Hz within the 100 ms. A long pulse can be seen as a bright light (D3, D4) and short pulse as a dimmed one. The VFO that I have used in my transceiver, with the “warm” oscillator only few pulses can be seen during the 10-second period. At the beginning with “cold” VFO long pulses with short ones can also be seen. The effect of the control is too big, if correction to one direction causes immediate correction to other direction. Then reduce the effect by turning R25 a bit to counter clockwise. If a long pulse lasts several seconds before out of lock situation, effect is too small. Turn the R25 a bit to clockwise. It is good also to monitor the output voltage from the pin 7. The voltage should stay within the range of the amplifier output (about 0.5 V…7.5 V depending on the type of the used op. amplifier) so that minimum or maximum limit is never reached during the normal operation.

Page 5(6)

Conditions to go out of Lock State are the consecutive number of samples (0Eh) which are outside of +/-100 Hz window. It is good to receive a stable carrier on the band and listen it when pulses are controlled. The audio frequency of the carrier must be remained stable. As well you can observe the stability of the 10 Hz decade in the LCD. I have now tested this few months in my 80 m SSB/CW transceiver. I had to add a buffer amplifier using JFET to isolate the RF effect to the frequency measurement circuit. Otherwise during the transmit RF caused disturbation to the measurement. RB2 Function A frequency lock function can be frozen with digital input RB2. How ever the last frequency reference is still set in the registers. This function can be used e.g. with direct conversion RX where TX offset is needed during the transmit period. A character “F” (Frozen) is displayed instead of “L” after the MHz text in the LCD display. Is this worth to build it? Above all this software is as is. No guarantee for any functions. However I am satisfied for this SW and electronics. I don’t need a separate switch in the front panel to lock or unlock the frequency. This SW with HW does it automatically. Remember that this circuit does not repair a bad VFO at all, but with a good one, it compensates the long term drifting and makes it even better to use. It is nice to listen to the certain frequency on the band without continuous frequency corrections after a little while by means of the VFO knob.

Page 6(6)

Suggest Documents