Stm32f10xx & OV7670 & Tft

Başlatan yldzelektronik, 27 Mayıs 2013, 03:55:03

Mnemonic

Merhaba Arkadaşlar;
uzun süredir uğraşamadığım OV7670 ayarlarını zamansız yıkılan mutfak fayansları ve zamanlı beklediğimiz eşimin yaptığı doğum ve oğlumuzun dünyaya gelmesi ardından anca vakit bulabildim ve yeniden üzerinde uğraşmaya başladım. 10larca farklı register kombinasyonu denemesi sonucu hep aynı renk hatalarını aldığımı farkedince gpio ayarlarına odaklandım ve bir şekilde ayarlar doğru olmasına rağmen D0,D3 ve D4 pinlerinin MCU'ya gelmediğii fakettim ve bu pinleri alternatif pinler üzerinden vererek sorunu giderdim.
herkese hayırlı olsun :)

mistek

Alıntı yapılan: Mnemonic - 29 Mart 2014, 22:25:57
zamanlı beklediğimiz eşimin yaptığı doğum ve oğlumuzun dünyaya gelmesi

Hayırlı olsun hocam Allah analı babalı büyütsün.

(Yeri değil kusura bakmayın ama boş geçmeyeyim dedim :) )
boş işlerin adamı ---- OHM Kanunu: I = V/R ---- Güç Formülü: P = V*I = I^2*R = V^2/R

Mucit23

Hocam Allah analı babalı büyütsün

Kamerayı çalıştırdığınıza sevindim gerçekten. Hazır bende donanım kurulu iken Eğer OV7670 ile ilgili init kodlarınızı paylaşırsanız bende elimdeki ov7670 modülünü test edebilirim.

Mnemonic

hocam benim lcd büyük olduğu için ben 640X480 kullandım init kodlarım ona göre

  	Delay_ms(0xfff);
	if(SCCB_Write(OV7670_COM7, SCCB_REG_RESET)!=0)
		return 0xff;
	Delay_ms(0xfff);

	//SCCB_Write (0x3a, 0x04);
	SCCB_Write (0x40, 0xd0);
	SCCB_Write (0x12, 0x04);
	SCCB_Write (0x32, 0x80);
	SCCB_Write (0x17, 0x16);
	SCCB_Write (0x18, 0x04);
	SCCB_Write (0x19, 0x02);
	SCCB_Write (0x1a, 0x7b);//0x7a,
	SCCB_Write (0x03, 0x06);//0x0a,
	SCCB_Write (0x0c, 0x30);
	SCCB_Write (0x3e, 0x00);//
	SCCB_Write (0x70, 0x00);
	SCCB_Write (0x71, 0x00);
	SCCB_Write (0x72, 0x11);
	SCCB_Write (0x73, 0x00);//
	SCCB_Write (0xa2, 0x02);
	SCCB_Write (0x11, 0x01);
	SCCB_Write (0x7a, 0x20);
	SCCB_Write (0x7b, 0x1c);
	SCCB_Write (0x7c, 0x28);
	SCCB_Write (0x7d, 0x3c);
	SCCB_Write (0x7e, 0x55);
	SCCB_Write (0x7f, 0x68);
	SCCB_Write (0x80, 0x76);
	SCCB_Write (0x81, 0x80);
	SCCB_Write (0x82, 0x88);
	SCCB_Write (0x83, 0x8f);
	SCCB_Write (0x84, 0x96);
	SCCB_Write (0x85, 0xa3);
	SCCB_Write (0x86, 0xaf);
	SCCB_Write (0x87, 0xc4);
	SCCB_Write (0x88, 0xd7);
	SCCB_Write (0x89, 0xe8);
	SCCB_Write (0x13, 0xe0);
	SCCB_Write (0x00, 0x00);//AGC
	SCCB_Write (0x10, 0x00);
	SCCB_Write (0x0d, 0x00);
	SCCB_Write (0x14, 0x20);//0x38, limit the max gain
	SCCB_Write (0xa5, 0x05);
	SCCB_Write (0xab, 0x07);
	SCCB_Write (0x24, 0x75);
	SCCB_Write (0x25, 0x63);
	SCCB_Write (0x26, 0xA5);
	SCCB_Write (0x9f, 0x78);
	SCCB_Write (0xa0, 0x68);
	SCCB_Write (0xa1, 0x03);//0x0b,
	SCCB_Write (0xa6, 0xdf);//0xd8,
	SCCB_Write (0xa7, 0xdf);//0xd8,
	SCCB_Write (0xa8, 0xf0);
	SCCB_Write (0xa9, 0x90);
	SCCB_Write (0xaa, 0x94);
	SCCB_Write (0x13, 0xe5);
	SCCB_Write (0x0e, 0x61);
	SCCB_Write (0x0f, 0x80);
	SCCB_Write (0x16, 0x02);
	SCCB_Write (0x1e, 0x37);//0x07,
	SCCB_Write (0x21, 0x02);
	SCCB_Write (0x22, 0x91);
	SCCB_Write (0x29, 0x07);
	SCCB_Write (0x33, 0x0b);
	SCCB_Write (0x35, 0x0b);
	SCCB_Write (0x37, 0x1d);
	SCCB_Write (0x38, 0x71);
	SCCB_Write (0x39, 0x2a);//
	//SCCB_Write (0x3c, 0x78);
	SCCB_Write (0x4d, 0x40);
	SCCB_Write (0x4e, 0x20);
	//SCCB_Write (0x69, 0x0c);///////////////////////
	SCCB_Write (0x6b, 0x60);//PLL
	SCCB_Write (0x74, 0x19);
	SCCB_Write (0x8d, 0x4f);
	SCCB_Write (0x8e, 0x00);
	SCCB_Write (0x8f, 0x00);
	SCCB_Write (0x90, 0x00);
	SCCB_Write (0x91, 0x00);
	SCCB_Write (0x92, 0x00);//0x19,//0x66
	SCCB_Write (0x96, 0x00);
	SCCB_Write (0x9a, 0x80);
	SCCB_Write (0xb0, 0x84);
	SCCB_Write (0xb1, 0x0c);
	SCCB_Write (0xb2, 0x0e);
	SCCB_Write (0xb3, 0x82);
	SCCB_Write (0xb8, 0x0a);
	SCCB_Write (0x43, 0x14);
	SCCB_Write (0x44, 0xf0);
	SCCB_Write (0x45, 0x34);
	SCCB_Write (0x46, 0x58);
	SCCB_Write (0x47, 0x28);
	SCCB_Write (0x48, 0x3a);
	SCCB_Write (0x59, 0x88);
	SCCB_Write (0x5a, 0x88);
	SCCB_Write (0x5b, 0x44);
	SCCB_Write (0x5c, 0x67);
	SCCB_Write (0x5d, 0x49);
	SCCB_Write (0x5e, 0x0e);
	SCCB_Write (0x64, 0x04);
	SCCB_Write (0x65, 0x20);
	SCCB_Write (0x66, 0x05);
	SCCB_Write (0x94, 0x04);
	SCCB_Write (0x95, 0x08);
	SCCB_Write (0x6c, 0x0a);
	SCCB_Write (0x6d, 0x55);
	SCCB_Write (0x6e, 0x11);
	SCCB_Write (0x6f, 0x9e);//0x9e for advance AWB
	SCCB_Write (0x6a, 0x40);
	SCCB_Write (0x01, 0x40);
	SCCB_Write (0x02, 0x40);
	SCCB_Write (0x13, 0xe7);
	SCCB_Write (0x15, 0x00);
	SCCB_Write (0x4f, 0x80);
	SCCB_Write (0x50, 0x80);
	SCCB_Write (0x51, 0x00);
	SCCB_Write (0x52, 0x22);
	SCCB_Write (0x53, 0x5e);
	SCCB_Write (0x54, 0x80);
	SCCB_Write (0x58, 0x9e);
	SCCB_Write (0x41, 0x08);
	SCCB_Write (0x3f, 0x00);
	SCCB_Write (0x75, 0x05);
	SCCB_Write (0x76, 0xe1);
	SCCB_Write (0x4c, 0x00);
	SCCB_Write (0x77, 0x01);
	SCCB_Write (0x3d, 0xc2);	//0xc0,
	SCCB_Write (0x4b, 0x09);
	SCCB_Write (0xc9, 0x60);
	SCCB_Write (0x41, 0x38);
	SCCB_Write (0x56, 0x40);//0x40,  change according to Jim's request
	SCCB_Write (0x34, 0x11);
	SCCB_Write (0x3b, 0x00);//0x00,//0x02,
	SCCB_Write (0xa4, 0x88);//0x88,
	SCCB_Write (0x96, 0x00);
	SCCB_Write (0x97, 0x30);
	SCCB_Write (0x98, 0x20);
	SCCB_Write (0x99, 0x30);
	SCCB_Write (0x9a, 0x84);
	SCCB_Write (0x9b, 0x29);
	SCCB_Write (0x9c, 0x03);
	SCCB_Write (0x9d, 0x4c);
	SCCB_Write (0x9e, 0x3f);
	SCCB_Write (0x78, 0x04);
	SCCB_Write (0x79, 0x01);
	SCCB_Write (0xc8, 0xf0);
	SCCB_Write (0x79, 0x0f);
	SCCB_Write (0xc8, 0x00);
	SCCB_Write (0x79, 0x10);
	SCCB_Write (0xc8, 0x7e);
	SCCB_Write (0x79, 0x0a);
	SCCB_Write (0xc8, 0x80);
	SCCB_Write (0x79, 0x0b);
	SCCB_Write (0xc8, 0x01);
	SCCB_Write (0x79, 0x0c);
	SCCB_Write (0xc8, 0x0f);
	SCCB_Write (0x79, 0x0d);
	SCCB_Write (0xc8, 0x20);
	SCCB_Write (0x79, 0x09);
	SCCB_Write (0xc8, 0x80);
	SCCB_Write (0x79, 0x02);
	SCCB_Write (0xc8, 0xc0);
	SCCB_Write (0x79, 0x03);
	SCCB_Write (0xc8, 0x40);
	SCCB_Write (0x79, 0x05);
	SCCB_Write (0xc8, 0x30);
	SCCB_Write (0x79, 0x26);
	SCCB_Write (0x09, 0x03);
	SCCB_Write (0x55, 0x00);
	SCCB_Write (0x56, 0x40);
	SCCB_Write (0x3b, 0x42);

z

#124
Bebek simdiden hayirli olmus. (Bebek aynen soyle demistir, baba get ote kac aydir beceremedim ben gelince hallederim)

Allah anali babali buyutsun.
Bana e^st de diyebilirsiniz.   www.cncdesigner.com