int main( void )
{
  u32 Point = 0;
  u16 OV7725_ID = 0;

  SystemInit();
  GPIO_Config();

  Delay_1ms(1);
  SSD1963_Config();
  Delay_1ms(50);
  SSD1963_Init();
  Delay_1ms(20);
  TFT_Clear(WHITE);

  // SCCB Init
  SCCB_Init();
  Delay_1ms(2);

  // Read ID & Check
  OV7725_ID = OV_ReadID();
  while(OV7725_ID != 0x7721) {
    LED_R = ~LED_R;
    Delay_100ms(1);
  }

  // OV7725 Init
  while(1==OV_Init());
  Cam_Start();

  while(1) {
    LED_G = ~LED_G;
    Delay_100ms(1);
  }
}
예제 #2
0
u8 OV7670_Init(void)
{
  	u8 i,id;
 	Cam_Init();
	SCCB_Init();
	OV_Reset();
	delay_ms(5);
	id=OV_ReadID();

	for(i=0;i<sizeof(ov7670_init_reg_tbl)/sizeof(ov7670_init_reg_tbl[0]);i++)
	{
		OV_WriteReg(ov7670_init_reg_tbl[i][0],ov7670_init_reg_tbl[i][1]);
	}

	OV7670_config_window(184+80*2,10+60*2,161,121);
		
	return 0; 
}