Calculation of OV2640 frame rate

Source: Internet
Author: User

From the timing diagram, the 1-frame time tframe=672*tline, tline = 1190Tp, TP is related to the Sensor register (ff=1) 0x11:

Tp = xvclk/(clkrc[5:0] + 1), XVCLK is the frequency of the external input.

3.1 SVGA Preview, 30fps, 24Mhz input Clock
sccb_salve_address = 0x60;
WRITE_SCCB (0xFF, 0x01);
WRITE_SCCB (0x11, 0x00);
WRITE_SCCB (0x12, 0x40);
WRITE_SCCB (0x2a, 0x00);
WRITE_SCCB (0x2b, 0x00);
WRITE_SCCB (0x46, 0x00);
WRITE_SCCB (0x47, 0x00);
WRITE_SCCB (0x3d, 0x38);

From the above settings, the frame rate can be calculated
Tframe= (1/24000000) *1190*672, frame rate =1/tframe=30.012

3.2 SVGA Preview, 15fps, Mhz input Clock
sccb_salve_address = 0x60;
WRITE_SCCB (0xFF, 0x01);
WRITE_SCCB (0x11, 0x01); XVCLK is divided by two.
WRITE_SCCB (0x12, 0x40);
WRITE_SCCB (0x2a, 0x00);
WRITE_SCCB (0x2b, 0x00);
WRITE_SCCB (0x46, 0x00);
WRITE_SCCB (0x47, 0x00);
WRITE_SCCB (0x3d, 0x38);

The above setting, the input frequency is divided into two, the operating frequency is 12MHz, so the frame rate is reduced by half

3.3 SVGA Preview, 25fps, Mhz input Clock
sccb_salve_address = 0x60;
WRITE_SCCB (0xFF, 0x01);
WRITE_SCCB (0x11, 0x00);
WRITE_SCCB (0x12, 0x40);
WRITE_SCCB (0x2a, 0x00);
WRITE_SCCB (0x2b, 0x00);
WRITE_SCCB (0x46, 0x87);
WRITE_SCCB (0x47, 0x00);
WRITE_SCCB (0x3d, 0x38);

The frame rate is also related to the 0x2a,0x2b, 0x46,0x47 register setting. Setting the 0x2a,0x2b will extend the tline,
such as 0x2a=1, 0x2b=0, then TLINE=1191TP, 0x2a=0, 0x2b=1, Tline = (1190+256) Tp.
Setting 0x46, 0x47 will extend tframe such as 0x46=0, 0x47=1, Tframe= (672+256) *tline,
0x46=2, 0x47=0, Tframe= (672+2) *tline.

The above settings:
Tframe= (1/24000000) *1190* (672+0x87), frame rate = 24.99 Frames

3.4 SVGA Preview, 14.3fps, Mhz input Clock
sccb_salve_address = 0x60;
WRITE_SCCB (0xFF, 0x01);
WRITE_SCCB (0x11, 0x01);
WRITE_SCCB (0x12, 0x40);
WRITE_SCCB (0x2a, 0x00);
WRITE_SCCB (0x2b, 0x00);
WRITE_SCCB (0x46, 0x22);
WRITE_SCCB (0x47, 0x00);
WRITE_SCCB (0x3d, 0x38);

The above settings:
Tframe= (1/12000000) *1190* (672+0x22), frame rate = 14.28 Frames

The calculation of UXGA and CIF frames is calculated according to the timing of the UXGA, and the calculation method is similar.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.