|
|
Extension module with ov7670 CMOS camera
Small camera module from the old smartphone world.
Some links:
- Résolution of 640 x 480, CIF, down until CIF 40x30, 30 f/s
- Output Formats:
- YUV/YCbCr 4:2:2
- RGB 565/555/444
- GRB 4:2:2
- Raw RGB Data
- SCCB bus interface for command, i2c equivalent.
- Progressive scan mode
- i2c Addresse: Write: 0100 0010, Read: 0100 0011
- Automatic function as:
- AEC: Automatic Exposure Control
- AGC: Automatic Gain Control
- AWB: Automatic Width Balance
- ABF: Automatic Band Filter
- ABLC: Automatic Black-Level Calibration
- Image quality control:
- Color saturation
- hue
- gamma
- sharpness (edge enhancement)
- anti-blooming
- etc
- ..
Note: I2C Communication won't work if no XCLK is available.
Be carefull! This module is connected with a PWDN (PoWerDowN) signal (active high) and connected to an i2c device PCA9673 to control it. By default the ligne is @'1' with a strong pull up.
2 solutions: Programme the PCA9673 by i2c and provide a '0' on Port1, bit 7. Or with an iron short circuit pin 20 (Cam_PWDN) to pin 21 (Gnd) of U18, the PCA9673 (not the best way but the fastest if you have a good iron and good eyes !
Note: Initially red appears as green and green appears as pink:
https://github.com/flufy3d/ov7670_fr/blob/master/ov7670_registers.vhd
Figure from OmniVision Reference description
XClk: 10..48 MHz, 24 MHz
SIO_C: < 400 kHz
The data Bus can be programmed to be in tri-state if PWDN = '1' (Default)
Different formats for data Output D[7..0], depend on specific registers configuration by i2c registers acces
Color Formats
|
Byte 0 |
Byte 1 |
Byte 2 |
Byte 3 |
Format |
D7 D6 D5 D4 D3 D2 D1 D0 |
D7 D6 D5 D4 D3 D2 D1 D0 |
D7 D6 D5 D4 D3 D2 D1 D0 |
D7 D6 D5 D4 D3 D2 D1 D0 |
RGB 565 |
R4 R3 R2 R1 R0 G5 G4 G3 |
G2 G1 G0 B4 B3 B2 B1 B0 |
R4 R3 R2 R1 R0 G5 G4 G3 |
G2 G1 G0 B4 B3 B2 B1 B0 |
RGB 555 |
X R4 R3 R2 R1 R0 G4 G3 |
G2 G1 G0 B4 B3 B2 B1 B0 |
0 R4 R3 R2 R1 R0 G4 G3 |
G2 G1 G0 B4 B3 B2 B1 B0 |
RGB 444 xRGB |
X X X X R3 R2 R1 R0 |
G3 G2 G1 G0 B3 B2 B1 B0 |
X X X X R3 R2 R1 R0 |
G3 G2 G1 G0 B3 B2 B1 B0 |
RGB 444 RGBx |
R3 R2 R1 R0 G3 G2 G1 G0 |
B3 B2 B1 B0 X X X X |
R3 R2 R1 R0 G3 G2 G1 G0 |
B3 B2 B1 B0 X X X X |
YUV |
Y U Y V
Y V Y U
U Y V Y
V Y U Y
|
|
|
|
RGB |
|
|
|
|
Bayer RAW |
|
|
|
|
Processed Bayer Raw |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Data on a Line
Data on a Frame
|
|
|