PLL question

Everything technical about radio can be discussed here, whether it's transmitting or receiving. Guides, charts, diagrams, etc. are all welcome.
Post Reply
radium98
proppa neck!
proppa neck!
Posts: 907
Joined: Fri Aug 26, 2016 7:01 pm

PLL question

Post by radium98 » Thu Apr 18, 2019 8:03 pm

here i post a grabbed schematic of a well known pll ,that have the famous old mc14515x and a prescaler and a loop active filter ,basic loop pll simple and great and easy to do .
reference of the xtal use is crystal of 6.4mhz and the 12 dip switches are dividing from 102,4 to 0.05 khz.
my question is IF i want to that division will be from 204.8 to 100 khz (12-1) should i use 3.2 mhz as crystal reference or 12.8mhz
if 3.2mhz should i have to change anything else,because i changed to xtal from 6.4 to 3.2 but the led still flickering.
You do not have the required permissions to view the files attached to this post.

nrgkits.nz
Neckmin
Neckmin
Posts: 337
Joined: Fri Oct 17, 2014 10:35 am

Re: PLL question

Post by nrgkits.nz » Thu Apr 18, 2019 9:29 pm

Using a smaller value crystal is going to lower the comparator freq and require a larger N divide value to achieve the same comparator reference so yes to your question using a 3.2 in place of 6.4 will require 2*N to set the same freq, it will also give you smaller step sizes. Also there an error in that schematic, pins 5, 6, 7 are all open and floating - they should atleast have pull-up or pull down resistors on them to guarantee their state, these pins set the R divider which divides the crystal reference down to the phase comparator freq.

Albert H
proppa neck!
proppa neck!
Posts: 2737
Joined: Tue Apr 05, 2016 1:23 am

Re: PLL question

Post by Albert H » Fri Apr 19, 2019 2:40 am

Make sure that the loading is correct on the crystal, so that it resonates at the right frequency. Put pull-down resistors on pins 4, 5, 6, 7 to prevent the divider responding to random noise on the pins (probably the source of your poor lock). Also the capacitors in the loop filter might be OK for a receiver, but are much too small if the oscillator is going to be deviated - the PLL will try to "correct" the modulation, as it will see it as an "error".
You also need to make certain that there's no RF getting into the PLL at the wrong place. Decoupling capacitors close to the supply pins, short tracks, and careful layout are all essential!
"Why is my rig humming?"
"Because it doesn't know the words!"
;)

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Fri Apr 19, 2019 3:32 am

; This program is to drive mc145170 Motorola PLL Serial Synthesizer
Frequency = your frequency say 98Mhz, so 98- 84 x 10 = 140. Enter in at MOVLW line.
; from 87.5-108.0 (FM Broadcast Band) in 100kHz steps. Copyright @ Unique Electronics 2001
;
; Freq is selected by software programed to a pic 12f629
; to Vdd)
; MCLR (reset) shift selected freq in synthesizer
; ENB is RA0
; CLK is RA1
; DATA is RA2
;

LIST F=INHX8M,R=DEC,P=12F629, n = 66
include "p12F629.inc"

; __FUSES _XT_OSC & _PWRTE_ON & _WDT_OFF & _CP_OFF

carry equ 0 ; Carry bit in status register

temp equ H'28' ; Register for temporary data
temp_1 equ H'29'

divider_hi equ H'29' ; Address of current synth data
divider_lo equ H'2F' ; N divider

tx_hi equ H'32' ; Address of tx freq data
tx_lo equ H'33' ; N counter

synth_enable equ 0 ; Synthesizer enable bit port A
synth_clock equ 1 ; Synthesizer data clock bit port A
synth_data equ 2 ; Synthesizer data bit port A

configure equ B'01100100' ; Configuration setup for synth
; Bit 7 0 Polarity unchanged
; Bit 6 1 Differential phase det
; Bit 5 1 Lock detect enable
; Bits 432 001 Ref out enable divide by 1
; Bit 1 0 Fv disable
; Bit 0 0 Fr disable

counter equ H'20' ;wait counter

;********************************************************************

;
;********************************************************************
;
; Routine to initialize ports
;
;********************************************************************
ORG 00
GOTO MAIN

INTR ORG 04H
RETFIE


MAIN ORG H'100' ;SETUP I/O

clrf GPIO
bsf Status,RP0
MOVLW B'00000111'
MOVWF CMCON
movlw 0x00 ;Define PortA as output
movwf TrisIO
CALL H'3FF'
MOVWF OSCCAL

bcf Status,RP0

bcf GPIO,synth_clock ; Clock low initially
bsf GPIO,synth_enable ; Enable high initially
nop
nop
bcf GPIO,synth_enable ; and then low to allow data to synth
movlw configure ; Configuration word for synth
movwf temp
movlw 08 ; 8 bits
movwf temp_1

loop_configure
rlf temp,f
btfsc status,carry ; Write bit to port A
bsf GPIO,synth_data
btfss status,carry
bcf GPIO,synth_data
bsf GPIO,synth_clock ; Clock data
bcf GPIO,synth_clock
decfsz temp_1,F

goto loop_configure ;

bsf GPIO,synth_enable ; Latch data to synth

;*******************************************************************************

;
; Programing Register R
;

movlw 07 ; first 7 bits low of 15 bits
movwf temp ; Reference divide by 80 (050h)
bcf GPIO,synth_enable
loop_2 ; to give 50 KHz steps from 4 MHz clock
bcf GPIO,synth_data ; Data low
bsf GPIO,synth_clock ; Clock data into synthesizer
bcf GPIO,synth_clock
decfsz temp,F
goto loop_2

bcf GPIO,synth_data ; Data=0
bsf GPIO,synth_clock ; 0
bcf GPIO,synth_clock

bsf GPIO,synth_data
bsf GPIO,synth_clock ; 1
bcf GPIO,synth_clock

bcf GPIO,synth_data ; Data=0
bsf GPIO,synth_clock ; 0
bcf GPIO,synth_clock ;

bsf GPIO,synth_data ; Data=1
bsf GPIO,synth_clock ; 1
bcf GPIO,synth_clock

bcf GPIO,synth_data ; Data=0
bsf GPIO,synth_clock ; 0
bcf GPIO,synth_clock
bsf GPIO,synth_clock ; 0
bcf GPIO,synth_clock
bsf GPIO,synth_clock ; 0
bcf GPIO,synth_clock
bsf GPIO,synth_clock ; 0
bcf GPIO,synth_clock

bsf GPIO,synth_enable ; Data to R reg

;***************************************************************************

;
; Reading DIP Switch FIXED FOR NO SWITCHES PROGRAMMED IN CHIP
;
;***************************************************************************

movlw H'48'
movwf tx_lo
movlw H'03'
movwf tx_hi ;84MHz

;******************************************************************

MOVLW 136 ;87.5 = 35 : 97.6 = 136 : 108 = 240

;******************************************************************

addwf tx_lo,f
btfsc status,carry
incf tx_hi,f

call synthesizer

sleep

;***************************************************************************

;
; Synthesizer routine
; Writes 17 bits of data to the A and M dividers
; to update the synthesizer
; A data 7 bits, MSB first followed by M data 10 bits MSB first
;
synthesizer

;

movf tx_hi,w ; tx_rx bit high = transmit
movwf divider_hi
;
movf tx_lo,w
movwf divider_lo
;
movlw 08 ; Count for software loop
movwf temp ; 16 bits to update synth divider
bcf GPIO,synth_clock ; Clock must be low initially
bcf GPIO,synth_enable ; Enable must be low to load data
;
loop_hi
rlf divider_hi,F ; Move bit from divider data into carry
btfsc status,carry ; and then to synthesizer
bsf GPIO,synth_data
btfss status,carry
bcf GPIO,synth_data
bsf GPIO,synth_clock ; Clock data to synthesizer on pos transition
bcf GPIO,synth_clock ; and reset for next bit
decfsz temp,F ; next bit
goto loop_hi
;
movlw 08 ; count for lo byte
movwf temp
loop_lo
rlf divider_lo,F ; Same for M byte
btfsc status,carry
bsf GPIO,synth_data
btfss status,carry
bcf GPIO,synth_data
bsf GPIO,synth_clock
bcf GPIO,synth_clock
decfsz temp,F
goto loop_lo
;
bsf GPIO,synth_enable ; Enable bit low to restart synthesizer
retlw 0 ; Return

;***************************************************************************

;
; Wait
;
wait

movlw H'ff'
movwf counter
kill decfsz counter,F
goto kill
retlw 0 ; Return

end
;************************

Albert H
proppa neck!
proppa neck!
Posts: 2737
Joined: Tue Apr 05, 2016 1:23 am

Re: PLL question

Post by Albert H » Sat Apr 20, 2019 3:24 am

Why give the poor guy code for an obsolete PLL IC? Also, the code is wrong. That's the version that was ripped off (from me) back in 1998. If you don't know the flaw in the code, you'll get a very unstable PLL. This was deliberate, to stop braindead copiers ripping off our designs. The widespread use of 20pF NPO capacitors, 11k resistors and PN194 transistors in our designs caused the copiers no end of hassle, since they must get exactly the right parts.....

Later on, I designed a controller ASIC that was specific to our products (though later sold to two American manufacturers) - the IC wasn't strictly necessary since all it did was scan the rotary frequency-setting switches and squirt the data in serial form, drive a dual bar graph display, mute the modulation components in the stereo coder (when fitted) for testing and calibration purposes and sequence the power supplies to various parts of the circuit!

Later anti-copying measures included the use of embedded Lecher bars and fusible PCB tracks concealed inside multi-layer boards, and even re-marked ICs and transistors. By this time it wasn't just the idiot "builders" in London and the South-East that were a problem, it was the Chinese and other countries who would try to rip off our "intellectual property". If I spend a week or two on a design, I want to get paid for my time and effort, so I was pretty pissed off when I saw the clones of my driver boards back in the late 80s. It was amusing though to think of the hassle and costs the cretins would have had getting some of the components!
"Why is my rig humming?"
"Because it doesn't know the words!"
;)

radium98
proppa neck!
proppa neck!
Posts: 907
Joined: Fri Aug 26, 2016 7:01 pm

Re: PLL question

Post by radium98 » Sat Apr 20, 2019 7:23 am

I am aware from codes and hex etc...and till now i did not get a good direct answer to me ,so i am confused .i re ask rebuilt my question to be sure.if with 6.4 mhz xtal ref i have dip 1 dividing by 102.4mhz,does with 3.2 mhz xtal have a dividing factor for dip 1 by 204.8 mhz ? without messing anything .
thanks happy easter.

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Sun Apr 21, 2019 2:49 am

Albert H wrote: Sat Apr 20, 2019 3:24 am Why give the poor guy code for an obsolete PLL IC? Also, the code is wrong. That's the version that was ripped off (from me) back in 1998. If you don't know the flaw in the code, you'll get a very unstable PLL. This was deliberate, to stop braindead copiers ripping off our designs. The widespread use of 20pF NPO capacitors, 11k resistors and PN194 transistors in our designs caused the copiers no end of hassle, since they must get exactly the right parts.....

Later on, I designed a controller ASIC that was specific to our products (though later sold to two American manufacturers) - the IC wasn't strictly necessary since all it did was scan the rotary frequency-setting switches and squirt the data in serial form, drive a dual bar graph display, mute the modulation components in the stereo coder (when fitted) for testing and calibration purposes and sequence the power supplies to various parts of the circuit!

Later anti-copying measures included the use of embedded Lecher bars and fusible PCB tracks concealed inside multi-layer boards, and even re-marked ICs and transistors. By this time it wasn't just the idiot "builders" in London and the South-East that were a problem, it was the Chinese and other countries who would try to rip off our "intellectual property". If I spend a week or two on a design, I want to get paid for my time and effort, so I was pretty pissed off when I saw the clones of my driver boards back in the late 80s. It was amusing though to think of the hassle and costs the cretins would have had getting some of the components!
The code works perfectly. We were well aware of the errors, and corrected them. Is the 12F629A Obsolete? I don't think it is. The PLL is still in production, be it by another Manufacture. It's true it was based on existing code for the older device, we rewrote it to suit our needs, we don't use it anymore, so I thought I would publish it. It certainly works mate, we used it for years. If it helps people...:)

Albert H
proppa neck!
proppa neck!
Posts: 2737
Joined: Tue Apr 05, 2016 1:23 am

Re: PLL question

Post by Albert H » Sun Apr 21, 2019 4:35 am

The MC145170 hasn't been made by anyone since the early 90s and so is obsolete. The 16F629 is one of the PICs I use regularly still. If you really want to impress with some PIC code, show us how to use the '929, a couple of push buttons and an LMX-series (current production) PLL IC to make a PLL that can be tuned anywhere in Band I or Band II, and costs <£2.75 to build. It also has to have reliable lock detection and he option of relay switching to enable other stages. It also needs to have low enough residuals that it can be used as a receiver PLL....

That's the current "state of the art" over here. There's a guy in Breda knocking out these beautiful little PLL exciter boards - about 6cm X 3cm - all SM components, that delivers about 400mW very cleanly. He charges around €45 for one-off, but the price drops rapidly for quantity. They're not of sufficient quality for the kind of stuff I supply these days, but they're much better than most pirate exciter boards I've seen. You set the frequency by stepping upward in 100kHz steps from 58MHz by repeatedly shorting out a couple of pads on the board. There's another pair of pads that you solder short when the frequency is selected. It's s slightly fiddly, but very cheap way of selecting a frequency. The mod sensitivity is fairly similar right across the tuning range (about 5% spread), and the whole thing requires any smoothed DC Voltage you like from a minimum of 9V up to a maximum of 32V.

I built a couple of rigs using these PCBs a few days ago as a favour for the owner of my local bar. I used them to drive RD15HVF to about 8 Watts, then an MRF317 final stage for 80 Watts out. He wanted 50 Watt rigs, but I have lots of the '317s in stock (I got them really cheaply), and they're practically indestructible at that power level. Using the little exciter board and a small etched PCB for the PA made for a very compact rig. The power supply was a 225VA toroid, bridge rectifier and a couple of large smoothing capacitors. The most expensive part of each whole rig was the damn heatsink!
"Why is my rig humming?"
"Because it doesn't know the words!"
;)

radium98
proppa neck!
proppa neck!
Posts: 907
Joined: Fri Aug 26, 2016 7:01 pm

Re: PLL question

Post by radium98 » Sun Apr 21, 2019 6:57 am

Thank you .solved it was missed the pin 6 to ground .

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Sat May 04, 2019 1:39 am

Albert H wrote: Sun Apr 21, 2019 4:35 am The MC145170 hasn't been made by anyone since the early 90s and so is obsolete. The 16F629 is one of the PICs I use regularly still. If you really want to impress with some PIC code, show us how to use the '929, a couple of push buttons and an LMX-series (current production) PLL IC to make a PLL that can be tuned anywhere in Band I or Band II, and costs <£2.75 to build. It also has to have reliable lock detection and he option of relay switching to enable other stages. It also needs to have low enough residuals that it can be used as a receiver PLL....
Well thanks for your comments, but I don't have to impress anyone, my gear stands for itself. I have moved on from that type of tec, years ago now. I just published the code because I thought it may help someone. Nothing else was implied.


That's the current "state of the art" over here. There's a guy in Breda knocking out these beautiful little PLL exciter boards - about 6cm X 3cm - all SM components, that delivers about 400mW very cleanly. He charges around €45 for one-off, but the price drops rapidly for quantity. They're not of sufficient quality for the kind of stuff I supply these days, but they're much better than most pirate exciter boards I've seen. You set the frequency by stepping upward in 100kHz steps from 58MHz by repeatedly shorting out a couple of pads on the board. There's another pair of pads that you solder short when the frequency is selected. It's s slightly fiddly, but very cheap way of selecting a frequency. The mod sensitivity is fairly similar right across the tuning range (about 5% spread), and the whole thing requires any smoothed DC Voltage you like from a minimum of 9V up to a maximum of 32V.

I built a couple of rigs using these PCBs a few days ago as a favour for the owner of my local bar. I used them to drive RD15HVF to about 8 Watts, then an MRF317 final stage for 80 Watts out. He wanted 50 Watt rigs, but I have lots of the '317s in stock (I got them really cheaply), and they're practically indestructible at that power level. Using the little exciter board and a small etched PCB for the PA made for a very compact rig. The power supply was a 225VA toroid, bridge rectifier and a couple of large smoothing capacitors. The most expensive part of each whole rig was the damn heatsink!

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Sat May 04, 2019 6:34 am

radium98 wrote: Sun Apr 21, 2019 6:57 am Thank you .solved it was missed the pin 6 to ground .
Sorry mate, I didn't really help you much there, I am glad you got it sorted. :)
Last edited by thewoodstarr on Sat May 04, 2019 6:41 am, edited 1 time in total.

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Sat May 04, 2019 6:39 am

thewoodstarr wrote: Sat May 04, 2019 1:39 am
Albert H wrote: Sun Apr 21, 2019 4:35 am The MC145170 hasn't been made by anyone since the early 90s and so is obsolete. The 16F629 is one of the PICs I use regularly still. If you really want to impress with some PIC code, show us how to use the '929, a couple of push buttons and an LMX-series (current production) PLL IC to make a PLL that can be tuned anywhere in Band I or Band II, and costs <£2.75 to build. It also has to have reliable lock detection and he option of relay switching to enable other stages. It also needs to have low enough residuals that it can be used as a receiver PLL....
Well thanks for your comments, but I don't have to impress anyone, my gear stands for itself. I have moved on from that type of tec, years ago now. I just published the code because I thought it may help someone. Nothing else was implied.


That's the current "state of the art" over here. There's a guy in Breda knocking out these beautiful little PLL exciter boards - about 6cm X 3cm - all SM components, that delivers about 400mW very cleanly. He charges around €45 for one-off, but the price drops rapidly for quantity. They're not of sufficient quality for the kind of stuff I supply these days, but they're much better than most pirate exciter boards I've seen. You set the frequency by stepping upward in 100kHz steps from 58MHz by repeatedly shorting out a couple of pads on the board. There's another pair of pads that you solder short when the frequency is selected. It's s slightly fiddly, but very cheap way of selecting a frequency. The mod sensitivity is fairly similar right across the tuning range (about 5% spread), and the whole thing requires any smoothed DC Voltage you like from a minimum of 9V up to a maximum of 32V.

I built a couple of rigs using these PCBs a few days ago as a favour for the owner of my local bar. I used them to drive RD15HVF to about 8 Watts, then an MRF317 final stage for 80 Watts out. He wanted 50 Watt rigs, but I have lots of the '317s in stock (I got them really cheaply), and they're practically indestructible at that power level. Using the little exciter board and a small etched PCB for the PA made for a very compact rig. The power supply was a 225VA toroid, bridge rectifier and a couple of large smoothing capacitors. The most expensive part of each whole rig was the damn heatsink!
Last edited by thewoodstarr on Sat May 04, 2019 6:54 am, edited 1 time in total.

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Sat May 04, 2019 6:44 am

Well thanks for your comments, but I don't have to impress anyone, my gear stands for itself. I have moved on from that type of tec, years ago now. I just published the code because I thought it may help someone. Nothing else was implied.

thewoodstarr
no manz can test innit
no manz can test innit
Posts: 149
Joined: Sat Sep 05, 2015 1:28 am

Re: PLL question

Post by thewoodstarr » Sat May 04, 2019 7:02 am

If anyone needs the Hex for a lock @ 100 Mhz, I do still have that. The frequency is programmed on chip, it 8 pin Pic , not possible to have buttons up/down. We done this when rig thieves were a problem, so it was not so easy to tune the gear.

Post Reply