1
\$\begingroup\$

I want to use the simple camera ov7670 and that camera requires a system clock, called XCLK.

enter image description here

The clock requries 24 MHz input from a source that are at 50% duty call and a period of 24 nanoseconds. enter image description here

Does this mean that I should use a PWM signal from a micro controller, or should I use an external crystal oscillator?

http://web.mit.edu/6.111/www/f2016/tools/OV7670_2006.pdf

\$\endgroup\$
2
  • 3
    \$\begingroup\$ if you have a microcontroller that can output a 24 MHz clock signal, then go for it \$\endgroup\$
    – jsotola
    Feb 1 '21 at 21:47
  • \$\begingroup\$ @jsotola Yes. I have an STM32 where the PWM's are very very high. Servral MHz. \$\endgroup\$
    – MrYui
    Feb 1 '21 at 21:48
2
\$\begingroup\$

You should use an external Crystal Osc. (XO) with the duty cycle specifications given. That will satisfy the pulse width variations given for the range of frequencies also given.

\$\endgroup\$
3
  • \$\begingroup\$ So using a PWM output, is a bad idea? Even if the input requries a CMOS clock signal e.g square wave. \$\endgroup\$
    – MrYui
    Feb 1 '21 at 23:20
  • \$\begingroup\$ Yes , it's a bad idea. PWM is not used at these frequencies. and the fastest clocks for CMOS need to be symmetrical \$\endgroup\$ Feb 1 '21 at 23:41
  • \$\begingroup\$ Ok. Thank you! Best answer! :) \$\endgroup\$
    – MrYui
    Feb 2 '21 at 0:02
3
\$\begingroup\$

many STM32 microcontrollers have a MCO output. (MCO standing for "Master Clock Out"). it's a general purpose clock output which is derived from a flexible selection of various clock sources and a clock prescaler. here's an image from the STM32F030 datasheet:

STM32 MCO output

The XCLK on 7670 could be from 10MHz to 48MHz. it's not 24MHz necessarily.

\$\endgroup\$
1
  • \$\begingroup\$ Sorry! I using a STM32F407 \$\endgroup\$
    – MrYui
    Feb 1 '21 at 23:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.