Author Topic: How to multiply a clock signal  (Read 2378 times)

0 Members and 3 Guests are viewing this topic.

Online caiusTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: it
    • Caius Arcade Repairs & Engineering
How to multiply a clock signal
« on: December 04, 2017, 03:45:44 pm »
Hi all,
I have the need to multiply a clock signal (a square wave which goes from around 200KHz to 1MHz).Specifically I need to obtain a 4x multiply factor like in the attached scope snaps.
I was thinking to use some PLL ICs (like the NB3N5xx) but it seems they can't accept on input such low frequencies.I could use a 4069 CMOS but I don't have room on PCB to implement all his circuit so a all-in-one solution (in SMD package preferibly) would be the best.Can someone give me a an idea?Thanks in advance.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: How to multiply a clock signal
« Reply #1 on: December 04, 2017, 03:54:48 pm »
The ON Semi FS7140/7145 might do it, but you need an I2C bus in your system.
« Last Edit: December 04, 2017, 04:06:05 pm by Benta »
 

Online caiusTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: it
    • Caius Arcade Repairs & Engineering
Re: How to multiply a clock signal
« Reply #2 on: December 04, 2017, 04:03:53 pm »
Thanks for the advice but I can't implement a I2C bus in my design, it's a simple reproduction of a custom IC in DIL42 package.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: How to multiply a clock signal
« Reply #3 on: December 04, 2017, 04:06:59 pm »
You get 8-pin MCUs for below a dollar today, so that could be your I2C control.
 

Online caiusTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: it
    • Caius Arcade Repairs & Engineering
Re: How to multiply a clock signal
« Reply #4 on: December 04, 2017, 04:09:47 pm »
Yes, I know they are cheap nowadays but it's really not worth it for a such simple design.Besides, my reproduction has to operate in a 5V system while the PLL and MCU are 3.3V.I'm looking for something simpler and immediate.
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: How to multiply a clock signal
« Reply #5 on: December 04, 2017, 04:20:28 pm »
Hmmm, that's a 5 octave spread.  2x octave would have been more feasible.  Like 200k to 400k, or, 500k to 1m, but not 200k to 1m.

Do you need to keep a perfect relative phase?

Once again, as mentioned, an 8 pin MCU which has a timer input and PWM out can be an all in 1 IC solution, but you need to program it.

Unfortunately, though there are PLL ICs from TI which can to multiply a 200khz through 1mhz signal by 4, you need to select small window, say +/- 10% your center frequency you will be operating within, otherwise the oscillator will loose lock and they happen to cost more than an MCU.
 

Offline Benta

  • Super Contributor
  • ***
  • Posts: 6261
  • Country: de
Re: How to multiply a clock signal
« Reply #6 on: December 04, 2017, 04:21:05 pm »
TI CDCS504?

Edit: scratch that, minimum input is 2 MHz.

« Last Edit: December 04, 2017, 04:39:15 pm by Benta »
 

Offline BrianHG

  • Super Contributor
  • ***
  • Posts: 8121
  • Country: ca
Re: How to multiply a clock signal
« Reply #7 on: December 04, 2017, 04:33:12 pm »
Yes, I know they are cheap nowadays but it's really not worth it for a such simple design.Besides, my reproduction has to operate in a 5V system while the PLL and MCU are 3.3V.I'm looking for something simpler and immediate.
These voltages aren't any problem to any MCU today which will operate between 1.8v and 5v, easily...
 

Online caiusTopic starter

  • Regular Contributor
  • *
  • Posts: 181
  • Country: it
    • Caius Arcade Repairs & Engineering
Re: How to multiply a clock signal
« Reply #8 on: December 04, 2017, 05:03:24 pm »
OK, thanks for advice.I'd probably try the MUC+PLL solution although I have to program the first (I'm mainly an hardware guy with some programming skills)
 

Offline Kalvin

  • Super Contributor
  • ***
  • Posts: 2145
  • Country: fi
  • Embedded SW/HW.
Re: How to multiply a clock signal
« Reply #9 on: December 04, 2017, 05:17:54 pm »
For example the Microchip PIC16F15313 is available in 8-pin package for $0.46 containing 4 x Configurable Logic Controller (CLC) which could be useful as phase comparator, quite extensive PWM and NCO capabilities for frequency generation and some on-chip analog functionalities for analog phase comparison if required, which should provide good starting point.
http://www.microchip.com/wwwproducts/en/PIC16F15313
Disclaimer: I have not used this chip, I just checked what is available from Microchip.
 

Online RoGeorge

  • Super Contributor
  • ***
  • Posts: 6786
  • Country: ro
Re: How to multiply a clock signal
« Reply #10 on: December 04, 2017, 05:25:48 pm »
With XOR gates.

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11939
  • Country: us
Re: How to multiply a clock signal
« Reply #11 on: December 04, 2017, 05:42:49 pm »
With XOR gates.

Maybe 8X and a /2 to get to 50%.

I was thinking about that and it would not work (the DFF on the end).  So assuming you stretch the first stage, you would have two pulses near each other on every edge, if that makes sense.   How close would be based on the delay you add.   You really need to add some constraints to help weed out some ideas.....

Quick build on white board using 74HC.  #89 with input at 1MHz.   Slow it down, you get the idea.   
« Last Edit: December 05, 2017, 02:43:32 am by joeqsmith »
 

Offline cdev

  • Super Contributor
  • ***
  • !
  • Posts: 7350
  • Country: 00
Re: How to multiply a clock signal
« Reply #12 on: December 04, 2017, 11:45:04 pm »
« Last Edit: December 04, 2017, 11:52:11 pm by cdev »
"What the large print giveth, the small print taketh away."
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11939
  • Country: us
Re: How to multiply a clock signal
« Reply #13 on: December 04, 2017, 11:50:15 pm »
Multiply, not divide or I missed something which is very possible. 

Offline Ian.M

  • Super Contributor
  • ***
  • Posts: 13130
Re: How to multiply a clock signal
« Reply #14 on: December 05, 2017, 01:43:15 am »
If I had to choose a chip in the next five minutes I'd probably go for the PIC16F15323. (same family as PIC16F15313 above but with more pins and peripherals)

At f=1MHz in, its a little fast to bit-bang it.  There are two options - if you need as close as possible synchronisation to the input signal edges, you can use a CLC as an XOR + an analog comparator with a RC delay, you can get a pulse on every edge at 2f.  Square that up with Timer 2 in monostable mode, then double the frequency again with another CLC and analog comparator.

While that lot's running in hardware, the code is looping capturing the period of the input signal using a free running Timer 1 and the CCP module to timestamp every 16th rising edge, and for every capture, calculating the delta-t since the previous one and dividing it by 64 to get a new period to stuff in the monostable.   Even at 1MHz in there are 128 clock cycles to get that done in so it can probably be coded in tightly written C.

Alternatively, if you don't mind a fair bit of jitter, run a PWM with Timer 2 postscaler set to 16, and in every Timer 2 interrupt adjust the period to 1/4 of the last input signal period.   Keep track of the relative drift and bump the period rounding up or down accordingly to keep the 4x output within +/-1 cycle of 64 in 16 input cycles with no culminative error.

Both will of course fail if the input frequency is rapidly swept, but can recover within 32 input clock cycles.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf