To 'stabilize' the frequency from the 'twisted' wire oscillator as described in previous posts, and to be able to set it via RS232 and read it, I wrote some PIC 18F14K22 asm and added a simple 2 line LCD. The first line shows the requested frequency ,as typed in via RS232. The bottom line shows the measured frequency (against a 10 MHz xtal).
On the little board a PIC18F14K22, and a MAX232.
The board with the LEDs on the left is my PIC programmer.
The 'twisted' wire oscillator I replaced with simple 2 lead electricity wire, as I stated earlier, this thing works with capacitive coupling, as twin-lead is easier to cut...
The PLL is done in software, and for now only has the integral part. The measure frequency after multiplying with the prescalers, is subtracted from the requested frequency. If sign bit is set the PIC PWM out is increased else increased by a given value (1 now). The PWM is filtered and used to control the frequency of the twin-lead oscillator. Works like a charm. Not due to the prescalers and the measurement time resolution is limited, this is no problem in this case. I now measure once per second. PIC timer 0 is the frequency counter (16 bits with :8 prescaler). PIC timer 1 is the clock tick (1 second measurement gate). PIC timer 2 and 3 are part of the PWM I think, used old code I had. There is a :256 prescaler on the twin-lead oscillator board, and a buffer amplifier.
It is nice, you can dial a frequency in this band..
asm source is here:
'jps' stands for Jan's Positioning System of course ;-)
Code is not finished by a long shot, just a proof of concept I hacked together today. Hopefully that will wake the 4046 PLL club too.
No diagram, but the LCD connections are clearly indicated in the source code. The rest is simple and I described before in an other thread. Nothing is very critical except the LCD initialization, type 'R' in terminal to restart if nothing shows, will probably work OK on a real 5 V supply. but the load of the LCD backlight + prescaler + oscillator, was not what this PIC programmer was designed for.
Anyways it is just a test. But it can easily be adapted for any other (even extremely high, note the 32 bit support in the numbers) frequencies. Have fun:-)