在320X240的液晶上显示qvga,一切正常。打算让摄像头显示在窗口280X200,怎么都是错位。
void OV_HW(unsigned int hstart, unsigned int hstop, unsigned int vstart, unsigned int vstop)
{
uint8_t v;
OV7670_WriteReg(0x17, (hstart >> 3) & 0xff); //HSTART
OV7670_WriteReg(0x18, (hstop >> 3) & 0xff); //HSTOP
OV7670_ReadReg(0x32,&v);
v = (v & 0xc0) | ((hstop & 0x7) << 3) | (hstart & 0x7);
OV7670_WriteReg(0x32, v); //HREF
OV7670_WriteReg(0x19, (vstart >> 2) & 0xff); //VSTART 开始高8位
OV7670_WriteReg(0x1a, (vstop >> 2) & 0xff); //VSTOP 结束高8位
OV7670_ReadReg(0x03,&v );
v = (v & 0xf0) | ((vstop & 0x3) << 2) | (vstart & 0x3);
OV7670_WriteReg(0x03, v); //VREF
OV7670_WriteReg(0x11, 0x00);
}
你好,设置160X120画面,为何显示是160X60两个画面叠加,你那也会这样吗,我现在是OV7670_config_window(184,10,160,240);才能正常显示160X120,另外为和起始地址是184和10,为何不能0,?
一周热门 更多>