Getting Clock Out signal 8Mhz or more from BBB to work with ov7670 camera

1,449 views
Skip to first unread message

Dennis Sedov

unread,
Sep 1, 2013, 3:57:50 PM9/1/13
to beagl...@googlegroups.com
I'm trying to interface with OV7670 camera, which requires an external clock signal of at least 8Mhz to power it up. What GPIO can I use to generate this? I wonder if PWM can do this?

Don Miller

unread,
Sep 1, 2013, 5:11:56 PM9/1/13
to beagl...@googlegroups.com

I looked at the datasheet:
http://www.voti.nl/docs/OV7670.pdf

...and it seems like it wants a clock of nominal frequency 24MHz (10 min, 24 nom, 48 max).

Might the 24.576MHz pixel clock located at pin 25 of P9 do the trick?  You might need to level shift it a bit (perhaps just a resistive divider) to match whatever IO voltage (typ 2.5V, but maybe 3.0V) you use on the camera.

Don

Dennis Sedov

unread,
Sep 2, 2013, 9:41:56 AM9/2/13
to beagl...@googlegroups.com

I'll try it tonight. What do I need to do to activate it, or does it output that frequency by default?

gfast...@gmail.com

unread,
Sep 2, 2013, 10:34:24 AM9/2/13
to beagl...@googlegroups.com
With a 24MHz input clock, any of the timer pins (TIMER4, TIMER5, TIMER6, TIMER7) can be programmed to produce 12MHz.

Dennis Sedov

unread,
Sep 2, 2013, 10:45:02 AM9/2/13
to beagl...@googlegroups.com, gfast...@gmail.com
What are those pins? I searched everywhere for CLK_OUT, Timer Pin and so forth. Any pin layout schematics didn't yield any useful information. 

Gerald Coley

unread,
Sep 2, 2013, 10:51:48 AM9/2/13
to beagl...@googlegroups.com, gfast...@gmail.com
Every pin has all the possible outputs listed for each pin in the schematic. I suggest you take a look at the datasheet for the processor for more detailed information. Maybe even try looking at the TRM for the processor.



Gerald



--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Don Miller

unread,
Sep 2, 2013, 11:04:33 AM9/2/13
to beagl...@googlegroups.com, gfast...@gmail.com

Dennis,

As far as I know, the 24.576MHz is always active when the card is in the default state.  There is a note on page 3 of the schematic that says it can be disabled in software if that pin needs to be used as a GPIO, but I think that you should be OK as long as you have not tried to add that pin to a device tree.

Section 7.1 of the SRM has a couple of tables (one each for P8 and P9) that maps out all the pins and the pin-muxing possibilities.  The timers are only a few rows down in table 10, but the 24.576MHz clock is a bit harder to find.  It is "mcasp0_ahclkx" in table 11.  It is the pixel clock that goes to the HDMI controller.  I've successfully used it to clock an off-card I2S DAC for audio purposes, however.

The 24.576MHz clock comes from oscillator Y4 on page 3 of the schematic.

Don

gfast...@gmail.com

unread,
Sep 2, 2013, 1:37:09 PM9/2/13
to beagl...@googlegroups.com, gfast...@gmail.com
Section 7.1 of the BeagleBone Black System Reference Manual details all of the pins on the two expansion connectors (P8 and P9).  On P8, pins 7, 8, 9, and 10 correspond to TIMER4, TIMER7, TIMER5, and TIMER6, respectively.  In order to use those pins, you will need to configure the corresponding timer (see Section 20.1 in the AM335x Technical Reference Manual).

The TIMER4, TIMER5, TIMER6, and TIMER7 names can be found in most of the documentation, including the schematic, the BeagleBone Black System Reference Manual, and the AM335x Technical Reference Manual.  These pins are used by the corresponding timer for various purposes.  One of those purposes is to produce an external clock.
Message has been deleted

mattiafra...@gmail.com

unread,
Feb 24, 2014, 12:28:10 PM2/24/14
to beagl...@googlegroups.com
Did you manage to use the OV7670? Which modules did you use? On which pins have you connected the sensor?
Reply all
Reply to author
Forward
0 new messages