初级会员
- 积分
- 197
- 金钱
- 197
- 注册时间
- 2013-11-24
- 在线时间
- 8 小时
|
楼主 |
发表于 2013-11-25 21:33:52
|
显示全部楼层
LCD_Scan_Dir(U2D_L2R); //从上到下,从左到右
<br> LCD_SetCursor(0x00,0x0000); //设置光标位置
<br> LCD_WriteRAM_Prepare(); //开始写入GRAM
<br>
<br> for(j=0;j<4800;j++)
<br> {
<br> while(NRF24L01_RxPacket(tmp_buf)) delay_us(10);
<br>
<br> for(t=0;t<32;t+=2)
<br> {
<br> color=tmp_buf[t];
<br> color<<=8;
<br> color|=tmp_buf[t+1];
<br> if(j>=1680)
<br> {
<br> if(num==0)
<br> OV7670_DrawPoint(320-107,j/20,color);
<br>
<br> if(num==107)
<br> OV7670_DrawPoint(0,j/20,color);
<br>
<br> if(num!=0&&num!=107)
<br> LCD->LCD_RAM=color;
<br>
<br> num++;
<br> if(num>=320)
<br> num=0;
<br> }
<br> else
<br> if(j>=1140)
<br> {
<br> zun=j/20;
<br> zun=zun*4-225;
<br> if(lin==0)
<br> OV7670_DrawPoint(320-zun+4,j/20-1,color);
<br>
<br> if(lin==zun)
<br> OV7670_DrawPoint(0,j/20,color);
<br>
<br> if(lin!=0&&lin!=zun)
<br> LCD->LCD_RAM=color;
<br>
<br> lin++;
<br> if(lin>=320)
<br> lin=0;
<br>
<br> }
<br> else
<br> if(j>=1120)
<br> {
<br> if(yin==0)
<br> OV7670_DrawPoint(0,j/20,color);
<br> else
<br> LCD->LCD_RAM=color;
<br>
<br> yin++;
<br> if(yin>=320)
<br> yin=0;
<br>
<br> }
<br> else
<br> {
<br> if(yum==0)
<br> OV7670_DrawPoint(4,j/20,color);
<br> else
<br> LCD->LCD_RAM=color;
<br>
<br> yum++;
<br> if(yum>=320)
<br> yum=0;
<br> }
<br>
<br> }
<br>
<br>
<br>
<br>
<br>就显示的这部分不一样,其他的都一样,前1/3整体下移4个像素,后1/3上下调换,中间1/3线性移动然后再整体上移4个像素。OK |
|