cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 port and OV7670 ?

antonius
Senior
Posted on April 08, 2014 at 04:11

Guys,

I have OV7670 module and STM32 dev board, I'm confused on how to connect the port of STM32 and OV7670 at the module because of the name of the port on OV7670 is different with in STM32 code, anyone has experience ? thanks


/*------------------------------------------------------

Ä£¿éÒý½ÅÃû³Æ | ÃèÊö | STM32¶ËÒý½Å�?¬½Ó |

------------------------------------------------------

SCCB_SCL : SCCBʱÖÓ : PB10 I2C2_SCL

SCCB_SDA : SCCBÊý¾�? : PB11 I2C2_SDA

CAM_VSYNC : Ö¡�?¬²½ : PA0 �?ⲿÖ�?¶�?0

CAM_HREF : FIFO : PB7 GPIO

CAM_WEN : FIFO�?´ÔÊ�?í : PD3 GPIO

XCLK : CMOS´«¸�?Æ÷Ö÷ʱÖÓ: PA8 MCOÊä³ö

CAM_RRST : FIFO¶�?µØÖ·¸´Î» : PE0 GPIO

CAM_REN : FIFOƬѡ : PD6 GPIO

CAM_RCLK : FIFO¶�?ʱÖÓ : PE1 GPIO

FIFO D0~D7 : FIFOÊý¾�?Êä³ö : PC0~PC7 GPIO

-----------------------------------------------------*/

0690X00000602sPQAQ.jpg
32 REPLIES 32
Posted on April 08, 2014 at 05:19

This is from one of the boards I've looked at supporting the OV7670

0690X0000060571QAA.png
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on April 08, 2014 at 06:17

I'm using STM32F103VCT6, is it ok ?

Posted on April 08, 2014 at 06:26

I'd be more concerned that you're using the FIFO'd device and not the raw OV7670

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on April 08, 2014 at 07:30

yes there's AL4228 in between STM32 and OV7670...are the pin connections the same ?

thanks

Posted on April 08, 2014 at 07:57

are the pin connections the same ?

Clearly they are not. It would help significantly if you reviewed the part documentation.

How does it work with the FIFO, I don't know, but the Camera itself is compatible with the DCMI peripheral, so the point of the FIFO is what? The purpose of having a FIFO is to mitigate the interfacing of the camera to a micro without a DCMI peripheral.

A direct connection of the

http://www.voti.nl/docs/OV7670.pdf

is consistent with the F407 schematic I provided earlier. As you're using an F10x part you'll need to make an assessment for that.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on April 08, 2014 at 08:13

The purpose of the

http://www.frc.ri.cmu.edu/projects/buzzard/mve/HWSpecs-1/Documentation/AL422B_Data_Sheets.pdf

is to act as a frame grabber. You still need to generate video timing signals for the camera (clocks, horizontal, and vertical timing), and reset/initialize the FIFO, using GPIO pins. The FIFO would attach to an FSMC type external bus arrangement, allowing you to extract the frame.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
antonius
Senior
Posted on April 08, 2014 at 11:56


Module Pin Name | Description | STM32 end pin connections |

-------------------------------------------------- ----

SCCB_SCL: SCCB clock: PB10 I2C2_SCL

SCCB_SDA: SCCB data: PB11 I2C2_SDA

CAM_VSYNC: Frame Sync: PA0 external interrupt 0

CAM_HREF: FIFO: PB7 GPIO

CAM_WEN: FIFO write enable: PD3 GPIO =WR ?

XCLK: CMOS sensor master clock: PA8 MCO output

CAM_RRST: FIFO read address reset: PE0 GPIO

CAM_REN: FIFO Chip Select: PD6 GPIO =OE ? 


CAM_RCLK: FIFO read clock: PE1 GPIO

FIFO D0 ~ D7: FIFO data output: PC0 ~ PC7 GPIO

-----------------------------------------------------*/

I saw some pins unconnected because I can't find in the code : STR, RST, WRST,PWDN and is it equivalent ? At OV module

CAM

REN: FIFO Chip Select: PD6 GPIO =OE ?

CAM_WEN: FIFO write enable: PD3 GPIO =WR ?

antonius
Senior
Posted on April 08, 2014 at 12:04

I got response from LCD but when I test the port of the Camera with LED, not even a blink....

and on USART it stops on

 

while( 1 != Sensor_Init() );

0690X00000602sYQAQ.jpg

antonius
Senior
Posted on April 08, 2014 at 12:36

Do I need 10K pull up resistor on SDA and SCL for I2C ? thanks