This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

tm4c123GH6PM驱动ov7725摄像头



采集的数据用液晶屏显示是乱的,部分代码如下:

void camera_refresh()
{
uint16_t i,j;
uint8_t data,R=0,C=0;
if(ov_sta==2)
{
RRST(~pin.pin1); //开始复位读指针
RCK(~pin.pin2);
RCK(pin.pin2);
RRST(pin.pin1);
RCK(~pin.pin2); //复位读指针结束
RCK(pin.pin2);
for(i=0;i<240;i++)
{
for(j=0;j<320;j++)
{
RCK(~pin.pin2);
data=read_data; //读数据
RCK(pin.pin2);
RCK(~pin.pin2);
RCK(pin.pin2);
if(i%4==0&&j%4==0)
{
Pic_data[R][C]=data;
UARTCharPut(UART2_BASE,Pic_data[R][C]);
C++;
}
}
C=0;
if(i%4==0)
R++;
}
GPIOIntClear(GPIO_PORTE_BASE,GPIO_PIN_0);
ov_sta=0;
}
}