سلام
فرمتتصویر rgb565 هست .
من این برنامه نوشتم و فقط یکسری خط روی ال سی دی میاد.
برنامه یه نگاهی بنذازید ببینید درسته.
کد:
while(1){
while(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_13)==0){ //VSNC to low
while(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_11)==1){ //if href to high
while(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_12)==0); //if pclk go to low
C[x][y]=(0x00ff&GPIOC->IDR);
while(GPIO_ReadInputDataBit(GPIOB,GPIO_Pin_12)==0); //if pclk go to low
C[x][y+1]=(0x00ff&GPIOC->IDR);
y=y+2;
}
x++;
if(x==100)break;
};
x=0;
for(px=0;px<100;px++){
for(py=0;py<640;py++){
LCD_Window(px,py,px,py);
R=C[px][py];
R = R & 0xf8;
R=R>>3;
G1=C[px][py];
G2=C[px][py+1];
G1=(( G1 & 0x7)<<3);
G2=((G2 & 0xe0)>>5);
G=(G1 | G2);
B=C[px][py+1];
B=B & 0x1f;
CMOS_Data=C[px][py]<<8;
CMOS_Data=C[px][py+1];
WriteCommand(RAMWR);
WriteData(R);
WriteData(G);
WriteData(B);
}
}
};