Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Frequency Synthesizer using PLL

Status
Not open for further replies.
Hi guys, im wondering in what application can the synthesizer be useful? What is the most basic application that uses frequency synthesizer?
 
Two applications come to mind. One is for use as a variable-frequency clock for a logic system, like a microcomputer. The other is for use as an oscillator in communications equipment, like for example the local oscillator of a radio receiver.
 
Hi everyone. I have a quick question to ask about 74hc160. Pin 2 (CP) is the clock input rite? and about the data input D0 to D3 (Pin3,4,5,6), we would input binary digit here right? My questions are:
1) where will the output frequency measured from? Flipflop output Q0-Q3?
2) since the data input is BCD, this is the divide ratio value rite? Means there will only be up to divide by 9 ratio?
 
Hi everyone. I have a quick question to ask about 74hc160. Pin 2 (CP) is the clock input rite? and about the data input D0 to D3 (Pin3,4,5,6), we would input binary digit here right? My questions are:
1) where will the output frequency measured from? Flipflop output Q0-Q3?
2) since the data input is BCD, this is the divide ratio value rite? Means there will only be up to divide by 9 ratio?

Hi yoboy.
In the process of answering your questions, I had to do some research to see exactly how the 74HC160 will be wired to achieve the necessary dividing. I have not used this IC before, but in principle it should work and I have answered your questions accordingly below. However, in the process of my research, I also came across other ICs that were perhaps better choices. For example, as I mention below, I find that the 74HC192 is a bit better because it allows down counting instead of up counting which is more convenient (as you will see below) plus it doesn't require an extra inverter chip (as you will see below). Even more interesting was the discovery of the 74HC4059 IC which includes the equivalent of five 74HC192 type chips all in one IC plus the extra logic inside to wire it into a divider exactly as you need. Not only does this one chip do everything you need, but the data sheet also shows how to wire it up and how to program it. If I had seen this IC last week, I would have recommended it to you instead of 74HC160 as it is the ideal solution to your problem. (74HC4059 costs $2.61 at Digikey USA
Digi-Key - 568-2695-5-ND (NXP Semiconductors - 74HC4059D) )


So, assuming the 74HC160, here are my responses:

yes, pin 2 is the input. Data inputs are D0 to D3, correct.

1) output can be taken from Q3 but if you are cascading several counter chips to make the overall count larger than 9 then you would take the output from the Tc pin, which is pin 15. Tc stands for terminal count. This pin is also sometimes call the "carry out" depending on manufacturer.

2) well, this IC is an UP counter and it is designed to put out a pulse on the Tc pin when the count rolls over from 9 to 0. So, to get it to divide by a ratio of less than 10, you have to wire it up so that every time the count rolls over, it re-loads the bcd number that you have put at the D0 to D3 inputs. In this way, it will count from the preset number to 9, then reset to the preset number and do it again, over and over. But in this case, the division ratio is not the preset number but rather =(10 minus the preset number). So if you want to divide by 4, you have to preset 6 to the inputs, so that it counts 6, 7, 8, 9, and back to 6, 7, 8, 9 and so on. So as you can see, in this example it takes four input cycles of the clock to generate one output cycle, so the frequency has been divided by 4. Similarly, if you want to divide by 3, you would load 7, for divide by 6 you would load 4 and so on. While this works fine, you may find it inconvenient.

In order to have it the other way where the divide ratio equals the data value loaded into the chip, we would have to use a DOWN counter, such as the 74HC192 (which can be configured for UP counting or DOWN counting). With a DOWN counter, you would load the number 6 in order to divide by 6, because the counter will preload 6, then count 5, 4, 3 ,2 ,1, 0 and then reset to 6 again.

You can see the up counting operation in a timing diagram by looking at the data sheet in the link, see Figure 6.
https://www.electro-tech-online.com/custompdfs/2009/02/74HC_HCT160_CNV_2.pdf

You should observe that when the count gets up to the highest number it is designed for, 9 in this case, it sets the TC output high. If you invert Tc and wire it back to the PE input, then each time the counter tries to go from 9 to 0 it will be forced to load the preset number on D0...D3 instead and then keep going. So the key thing is to feedback Tc to PE. Note that Tc is active high, while PE is active low, so you need to invert Tc with an inverter between Tc and PE.

The pulse coming out of Tc will be a short pulse, not a 50% duty cycel square wave.

If you think it might be better to DOWN count then you should be using 74HC192. This IC is handy because the polarity of the TC output is the same as the PE input so there is no need for an extra inverter.


If you have not purchased any ICs yet, I recommend focussing your attention on 74HC4059. If you have purchased 74HC160, I apologize for not providing the most optimal recommendation.
 
wow Radioron, u are truly a life saver. Now i understand everything clearly about dividers. We couldnt buy HC160 here in the local store, because we have very limited choices. However, we have ordered HC160 online and bought HC390 from a local store. now that you've suggested hc192 and hc4059, we might as well change our order. You really dun have to apologize, we are noobs here, we have lots to learn.

I see that the difference in HC192 and HC160 is that for HC192, it doesnt require an inverter to change it to a down counter. But, we will still have to cascade few HC192s to achieve a ratio higher than 9 rite? We want to avoid cascading if it is possible. I couldnt resist but to check out 74HC4059. I came across this one before, but all the 'Jams' in the datasheet confuses me.

In the datasheet, they said there's 4 modes of operation, controlled by Ka, Kb and Kc. and one of the mode is to set divide-by-n. Later on, i got confused when they show how to determine the value of n. For example, this part:

n = (MODE ) (1 000 x decade 5 preset + 100 x decade 4 preset + 10 x decade 3 preset
+ 1 x decade 2 preset) + decade 1 preset

Does this mean my n will be depending on 5 Preset values and 1 Mode value?
That means, to select a value for N, i will be inputting data to set this 6 values. Am i right? and the values of n can be as low as 3 and as high as 15999?

Also, based on the examples given, this is my understanding, correct me if im wrong.

J1, J2, J3 and J4 - determines decade 1 preset and decade 5 preset depending on the modes used
J5, J6, J7, J8 - decade 2 preset
J9, J10, J11, J12 - decade 3 preset
J13, J14, J15, J16 - decade 4 preset

Am i right? I realised that J1 until J4 depends on the mode used. How about J5 till J16? The above statement about decade 2, 3 and 4 is always true regardless of the mode used, yes?

My next question is, they said the mode can be set to 10, 8, 5, 4 or 2. How do i select this? By using LE, Ka, Kb and Kc? Sorry, i have lots of things to ask, sorry and sorry again for burdening you. I am also wondering how to achieve maximum n (even though i think N=10000 would be sufficient for my design)

Mode = 4.
Max Decade 1 preset = 3,
max decade 2 preset = 15,
max decade 3 preset = 15,
max decade 4 preset = 15,
max decade 5 preset = 3

so n = 4(1000x3 + 100x15 + 10x15 + 1x15) + 3 = 18663. Why am i not getting 15999? Or the datasheet just indicates that the IC is not capable of going beyond 15999? I do realise that under "binary Max" they indicate as 18663. What does this mean?

Also, referring to the table that ive attached, under decade 5, there is a column titled "divided by". Where does this fit in the equation?

I am really interested to use this IC since i wouldnt have to cascade smaller dividers. With this IC, i need only a microcontroller to set the presets. I wouldnt need multiple dividers to achieve a higher dividing ratio. I would like to hear more about this IC. By the way, the price for 74HC/HCT4059 manufactured by Philips is too expansive in my country (RM50+). I am thinking of using CD4059A from TI, which looks the same to me. The datasheet can be found here . I hope it is the same. The price for this one is much more affordable (RM9). Please take your time to reply me, there's no rush :) You have been very helpful, thank you very much.
 

Attachments

  • 4059.jpg
    4059.jpg
    72.5 KB · Views: 1,157
Mode = 4.
Max Decade 1 preset = 3,
max decade 2 preset = 15,
max decade 3 preset = 15,
max decade 4 preset = 15,
max decade 5 preset = 3

so n = 4(1000x3 + 100x15 + 10x15 + 1x15) + 3 = 18663. Why am i not getting 15999? Or the datasheet just indicates that the IC is not capable of going beyond 15999? I do realise that under "binary Max" they indicate as 18663. What does this mean?

This IC is fascinating. I realised that I made a mistake. The max preset for decade 2, 3, and 4 ought to be 9 instead of 15, since it is a BCD counter. Now it makes sense since n = 4(1000x3 + 100x9 + 10x9 + 1x9) + 3 = 15999 :)
 
Last edited:
This IC is fascinating. I realised that I made a mistake. The max preset for decade 2, 3, and 4 ought to be 9 instead of 15, since it is a BCD counter. Now it makes sense since n = 4(1000x3 + 100x9 + 10x9 + 1x9) + 3 = 15999 :)

You are becoming an expert.
 
Im flattered. Full credit goes to you. By the way, I am going to order a microcontroller along with CD4059. My groupmate happen to own a PIC microcontroller burner, so we are planning to buy a PIC microcontroller to program the data inputs to the divider. Can u suggest us a basic PIC microcontroller that is sufficient to control our CD4059? I need your advice in terms of Flash memory size, RAM size and I/O lines...

Thanks again for your time..
 
I see that the difference in HC192 and HC160 is that for HC192, it doesnt require an inverter to change it to a down counter. But, we will still have to cascade few HC192s to achieve a ratio higher than 9 rite?

Right. Each HC192 only provides one decade of division. If you intend to synthesize up to 10MHz with a 1KHz comparison frequency, you would need divide ratio up to 10,000,000/1,000 = 10,000. This represents four decades needing four HC192 ICs(I guess four decades only gets you to 9999 KHz, not 10000 KHz, but you get the point).


We want to avoid cascading if it is possible. I couldnt resist but to check out 74HC4059. I came across this one before, but all the 'Jams' in the datasheet confuses me.

In the datasheet, they said there's 4 modes of operation, controlled by Ka, Kb and Kc. and one of the mode is to set divide-by-n. Later on, i got confused when they show how to determine the value of n. For example, this part:

n = (MODE ) (1 000 x decade 5 preset + 100 x decade 4 preset + 10 x decade 3 preset
+ 1 x decade 2 preset) + decade 1 preset

Does this mean my n will be depending on 5 Preset values and 1 Mode value?

Oh boy, now I have to study some more to give a good answer. ... OK, now I've done it, and the answer is yes.


That means, to select a value for N, i will be inputting data to set this 6 values. Am i right?

Yes.

and the values of n can be as low as 3 and as high as 15999?
Yes. Pretty neat, eh?


Also, based on the examples given, this is my understanding, correct me if im wrong.

J1, J2, J3 and J4 - determines decade 1 preset and decade 5 preset depending on the modes used
J5, J6, J7, J8 - decade 2 preset
J9, J10, J11, J12 - decade 3 preset
J13, J14, J15, J16 - decade 4 preset

Am i right? I realised that J1 until J4 depends on the mode used. How about J5 till J16? The above statement about decade 2, 3 and 4 is always true regardless of the mode used, yes?

This is truly a confusing data sheet to understand for the first time (I am reading the one from Texas Instruments from 2003), but I'm learning it now. Yes, I think you have the idea correct about J5 to J16. I think it would be very useful to create a spreadsheet that shows what divide ratios are created with the each mode selection and what the resulting frequency spacing would be in your synthesizer. This is what I would do to fully understand why they designed it this way.

My next question is, they said the mode can be set to 10, 8, 5, 4 or 2. How do i select this? By using LE, Ka, Kb and Kc? Sorry, i have lots of things to ask, sorry and sorry again for burdening you. I am also wondering how to achieve maximum n (even though i think N=10000 would be sufficient for my design)

The way that you choose the mode depends on what maximum count you want and also what frequency spacing you want in your synthesizer. Do the spreadsheet and you will see I think. The TI datasheet helps by explaining that the mode # 10 makes the first divider a BCD type and eliminates the final divider, so you have a maximum count of 9999 or four decades. This is the simplest divider config to understand because you would have a simple four digit bcd counter, and it would provide a frequency spacing equal to your comparison frequency (like 1KHz). Have a look at the values in the right columns in the Truth Table on page 2:
https://www.electro-tech-online.com/custompdfs/2009/02/cd74hc4059.pdf




Mode = 4.
Max Decade 1 preset = 3,
max decade 2 preset = 15,
max decade 3 preset = 15,
max decade 4 preset = 15,
max decade 5 preset = 3

so n = 4(1000x3 + 100x15 + 10x15 + 1x15) + 3 = 18663. Why am i not getting 15999? Or the datasheet just indicates that the IC is not capable of going beyond 15999? I do realise that under "binary Max" they indicate as 18663. What does this mean?

I'm not sure, but I think that you can choose to load up to 15 (maximum for 4 bit binary) if you want instead of bcd 9 and this binary choice is called "extended" in the TI data sheet but the numbers given match the "binary max" in the Philips sheet. So they give maximums for loading up to 9 and for loading up to 15. This is confusing.

Also, referring to the table that ive attached, under decade 5, there is a column titled "divided by". Where does this fit in the equation?

I am really interested to use this IC since i wouldnt have to cascade smaller dividers. With this IC, i need only a microcontroller to set the presets. I wouldnt need multiple dividers to achieve a higher dividing ratio. I would like to hear more about this IC. By the way, the price for 74HC/HCT4059 manufactured by Philips is too expansive in my country (RM50+). I am thinking of using CD4059A from TI, which looks the same to me. The datasheet can be found here . I hope it is the same. The price for this one is much more affordable (RM9). Please take your time to reply me, there's no rush :) You have been very helpful, thank you very much.


I agree that this IC is very well suited to your project and it is the one I would use also if I were you.

You should NOT use the CD4059 because it is made with older logic technology and cannot toggle as fast as 74HC logic. So it will not work beyond 3 MHz input frequency. Otherwise it has the same functions. You should use the 74HC4059 which can be from any manufacturer, TI or NXP or any other. I note that the price in Canada for the TI 74HC4059 is Can$3.00. I'm not sure where you can buy from, but you really should choose the 74HC version. I'm not sure of RM, is this Romanian Leu? So, the price I pay is about like 8RON. You should enter your location in your profile.
 
Im flattered. Full credit goes to you. By the way, I am going to order a microcontroller along with CD4059. My groupmate happen to own a PIC microcontroller burner, so we are planning to buy a PIC microcontroller to program the data inputs to the divider. Can u suggest us a basic PIC microcontroller that is sufficient to control our CD4059? I need your advice in terms of Flash memory size, RAM size and I/O lines...

Thanks again for your time..

I think that this is not my area of expertise and you can make a good selection easily from a catalog, like using Digikey online or some such search engine. I have used Atmel AVR a few times, but not Microchip PIC series. You don't need a powerful one, but if you are going to wire up all the Jam inputs, you need one with a lot of I/O bits. The memory size will be a function of what compiler you use or what assembler. I think your program can be quite small depending on how you build it, using a lookup table for all values may be more efficient than using integer or floating point math to get all the values for each frequency. I'm not sure.

I think you need about 20 I/O bits to keep the circuit simple. Youcould use an external latch and fewer bits, but there is no economy in that if you are buying the PIC for this purpose.

I live on the coast by the Pacific Ocean in Canada and here it is late and can stay on no longer. Good night.
 
Last edited:
Hi radioron, thanks again for your elaborative reply. I think i will start on the spreadsheet, to determine each combination of J1 till j16 wich will output n=3 until n=9999. I cant wait to get started :)

I am actually from Malaysia. I won't be surprised if u haven't heard about my country before. It happens alot. Its located somewhere near countries like Thailand and Singapore. According to this website, i will be paying $17 for the same IC, because here, the price is Ringgit Malaysia 50 (RM50). Its very expansive. But looks like I cant go for CD series either. Ive come across another alternative, which is HEF4059BP. It costs about $10 (RM30), so its definitely a cheaper alternative for me. Will this IC work?

Regarding the microchip, I think I can handle it. Sorry for keeping you up so late. Have a nice day ahead :)
 
Oh, I have heard of your country many times and I know where to find it on the map, but I have not visited. The closest I have come is to Singapore. I was confused because when I went to look up what the abbreviation RM meant for money, I could not see it and guessed that the R was about Romania.


I agree that 50RM is too much to pay. The way to tell if the ic will work ok in this case is to look at the data sheet (this is always the way to tell everything, but one must learn all the different variables) and find the table of AC electrical characteristics and find a specification for maximum clock pulse frequency. Several numbers are given. The matrix shows the guarantee for three supply voltages, 5, 10 an 15 volts vertically, and it shows two columns, one which is the minimum value guaranteed, and the other is the typical value.

I looked at HEF4059, which is made by a similar technology to CD4059 and I see that this IC is not nearly as fast as the 74HC4059 and that you would have to apply 10 or 15 volts Vcc to get it operate at 10 MHz (we often use the minimum value instead of the typical to be absolutly sure of the value, but you can take a chance on typical value if you like to take a bit of a gamble. The chances of getting a part much worse than typical is small, perhaps 8% or so.

So, you could use HEF4059, but you may have to use 10V power supply. This is probably too high for the phase locked loop chip, so this is a problem. I still recommend staying with 74HC4059 and try to find it at a better price. There are many suppliers in your world as it is a center for electronics manufacturing, but it may take some work to find a better supplier. I have been happy with Digikey, but I see the closest to you is Digikey Singapore who sell the HC4059 for SGD 2.12 for the surface mount package type. Do not be afraid of the surface mount version vs the DIP version, although it will be a bit more work to wire to it.

I just looked at Farnell Malaysia site and I see the problem with getting this version of IC. Well, you could use a higher power supply for this IC, but then interfacing to the uP will be a bit more work as you might have to use voltage converter buffers if the supply voltage for the 4059 goes above 7.5 volts. This becomes awkward.

I find the 74HC4059 part on Mouser Electronics Malaysia site:
74hc4059
for USD$2.27. Perhaps you can get it from them?
 
Hi radioron.. sorry for the late reply.. I have been IC-hunting, but its really pathetic coz i am not able to find this IC anywhere. Do you happen to know if this IC goes by a different name? or is there any other IC which is very close to this one?
 
I'm looking in various places.

It may be obvious to you, but you can consider 74HCT4059 as well.

There are many ICs which implement all of the logic needed in a frequency synthesizer. These ICs are too complex for your application though, so I am not going to recommend any of them.

After some effort, I have not succeeded in finding something similar except for the same part with different prefixes, like CD, HEF and so on. I think you are already aware of those ones.

The other way to solve the problem is to go back to using 4 bit or 8 bit decade or binary counter ICs and wire them up to do your Divide-by-N function, but this is definitely more complex than using the 4059.
 
Last edited:
I'm looking in various places.

It may be obvious to you, but you can consider 74HCT4059 as well.

There are many ICs which implement all of the logic needed in a frequency synthesizer. These ICs are too complex for your application though, so I am not going to recommend any of them.

After some effort, I have not succeeded in finding something similar except for the same part with different prefixes, like CD, HEF and so on. I think you are already aware of those ones.

The other way to solve the problem is to go back to using 4 bit or 8 bit decade or binary counter ICs and wire them up to do your Divide-by-N function, but this is definitely more complex than using the 4059.

ahh, just when i thought I was close to completion here I am again back at square one. So, implementing the decade eh? this is 1 option. I am not sure what am i facing, but could you like brief me a little about what exactly I will need to do if I chose to implement this divide-by-N using 4bit decade? Meanwhile, i will continue to search for the IC...
 
First, you will need to create a schematic diagram. In making this diagram, you will have to decide which IC you will use and you will have to work out two key things:
- how to cascade the counters to implement the dividing. You must figure this out before you buy the ICs.
- how to preload the counters for the correct divide ratio

I think it is necessary to work these things out and then draw your schematic diagram and then post it here for review.

Once the schematic is correct, buy the ICs and wire them up as the schematic shows. You will have to decide on your method of wiring. There are several methods including point to point wiring on some perf board, wire wrapping, and solderless prototype boards. I do not recommend a solderless prototype board because it won't work with these high frequencies. Point to point wiring with some perf board may be the best approach. For this, you need some perf board (there are various kinds from various manufacturers), and some fine wire.

Once you build it, you will apply power and see if it works. This will require an oscilloscope and a DC power supply.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top