1 2 Previous Next 25 Replies Latest reply on Jul 6, 2018 1:25 AM by DheerajK_81

# Problem to generate Clock Frequncy ?

How Can i Generate 7Mhz Clock Frequncy to the timer or pwm in a psoc 5LP?

i Was taking the direct clock to the output pin but in a oscilloscope the output are not perfect or good ?

How Can i resolve this problem?

• ###### 1. Re: Problem to generate Clock Frequncy ?

When the clock is given directly to the output pin, you should be seeing the exact clock frequency you have set as output. In case you have set tolerance in the clock block, you should see the output in the range as shown below:

For 7Mhz the output might range will be between 6.65MHz - 7.35MHz. If you unchecked the tolerance, you should see a more accurate 7MHz.

From the looks of it, seems like you might have changed some settings in the clocks or the divider values. So, it would be great if you could share your project here so that I can have a look. Also, let me know what frequency you are observing, a screenshot of the oscilloscope output would be great.

Regards,

Dheeraj D Kamath

• ###### 2. Re: Problem to generate Clock Frequncy ?

What does it mean ''not perfect' - frequency is off?

The clock divider is an integer number, so to get 7MHz, the Master clock must be any of 77MHz, 70MHz, 63MHz, 56MHz, 49MHz, ... In the clocks section set PLL to one of those values.

/odissey1

• ###### 3. Re: Problem to generate Clock Frequncy ?

i was trying everything in a clock.

whenever i was put the 7 mhz clock on to the output pin i was just give it the 6MHz or 8MHz frequency but i was never take it the 7mhz frequency .

i was also tryed to the timer and pwm but same problem is occur .

actually i want to  generate the different different frequency  on a single output pin.

below i was attached the output of the CRO to the 7mhz clock.@Problem to generate Clock Frequncy ?

• ###### 4. Re: Problem to generate Clock Frequncy ?

In the Design Wide Resources->Clocks, please set the PLL clock to multiples of 7 MHz (as shown on the picture), for example 49MHz.

Now to get 7 MHz clock, please set the clock divider to 7 (or simply set it to 7 MHz). Now the output will be 7 MHz. This will produce fixed 7 MHz clock.

/odissey1

• ###### 5. Re: Problem to generate Clock Frequncy ?

It is not possible to get finely tunable frequency around 7 MHz using standard Timer or PWM, due to high granularity of the divider. For example, with MASTER_CLK=70 MHz, and dividers 9, 10 or 11 the output frequency will be accordingly:  7.777 MHz, 7.0 MHz or 6.363 MHz.

One way to get fine-tuned output is to utilize DDS approach. You can try using either DDS24 or DDS32 components for that:

/odissey1

• ###### 6. Re: Problem to generate Clock Frequncy ?

Thanks Guys for Helping me

it means a lot.

now i am generated the 7 mhz frequency but this shape is not good .

i am wanted the square wave 7mhz output.

best regards

sagar

• ###### 7. Re: Problem to generate Clock Frequncy ?

thank you so much for helping me.

• ###### 8. Re: Problem to generate Clock Frequncy ?

ok. i will try this.

and by the way thanks.

• ###### 9. Re: Problem to generate Clock Frequncy ?

The output is usually a square wave. Check the schematic of the board you are using whether there is a cap on the pin for buffering. Looks a bit as if so. Which Board are you using and which port your output is sent to? How is the pin configured??

Can you please post your complete project or a shortened version that shows the error so that we all can have a look at all of your settings. To do so, use

Creator->File->Create Workspace Bundle (minimal)

and attach the resulting file.

Bob

• ###### 10. Re: Problem to generate Clock Frequncy ?

It could also be a oscilloscope probe issue. Use the probe in 10x mode. You can also try adjusting the probe compensation.

-Rajiv

• ###### 11. Re: Problem to generate Clock Frequncy ?

HELLO i am configuring the output pin as a pull up and and this pin is directly connected to clock this clock is 49mhz master clock and divider by 7 i am taking the 7 mhz output but not the sharp value or graph is not an squre wave.

• ###### 12. Re: Problem to generate Clock Frequncy ?

i was also try this nothing change will be happen.

• ###### 13. Re: Problem to generate Clock Frequncy ?

Hi,

You need to set the pin drive mode to "strong".

-Rajiv

• ###### 14. Re: Problem to generate Clock Frequncy ?

i was already done this.nothing change it will happen.and i am using lp05 kit.

1 2 Previous Next