1024手机基地看电影,午夜福利视频导航,国产精品福利在线一区,亚洲欧美日韩另类成人,在线观看午夜日本理论片,成年超爽免费网站,国产精品成人免费,精品动作一级毛片,成人免费观看网站,97精品伊人久久大香蕉

標題: TFT字母顯示反了 [打印本頁]

作者: 冷月楓    時間: 2019-12-8 18:00
標題: TFT字母顯示反了
我的TFT顯示的字母都是反的,漢字都是左右顛倒,不知道哪里的問題位置

void TFT_Set_Pos(uint x1,uint y1,uint x2,uint y2)//240x320
{  
   TFT_Write_Reg(0x2a);
   TFT_Write_8Data(x1>>8);
   TFT_Write_8Data(x1);
   TFT_Write_8Data(x2>>8);
   TFT_Write_8Data(x2);

   TFT_Write_Reg(0x2b);
   TFT_Write_8Data(y1>>8);
   TFT_Write_8Data(y1);
   TFT_Write_8Data(y2>>8);
   TFT_Write_8Data(y2);

   TFT_Write_Reg(0x2C);
}

漢字
void TFT_Show_Hanzi16x16(uint x,uint y,uchar index)       
{  
        uchar i,j;
    uchar *temp=hanzi16x16;    //Ö¸Ïò′æ·Åoo×ÖμÄêy×é
    TFT_Set_Pos(x,y,x+15,y+15); //éèÖÃÇøóò      
        temp+=index*32;        //1¸öoo×Ö32×Ö½ú,
        for(j=0;j<32;j++)
        {
                for(i=0;i<8;i++)
                {                      
                         if((*temp&(1<<i))!=0)
                        {
                                TFT_Write_16Data(POINT_COLOR);
                        }
                        else
                        {
                                TFT_Write_16Data(BACK_COLOR);
                        }   
                }
                temp++;//ÏÂò»¸ö×Ö½ú
         }
}





作者: xuyaqi    時間: 2019-12-9 09:40
漢字的取模方向與液晶的顯示方向是反的,要改其中一個。
作者: 冷月楓    時間: 2019-12-9 10:53
已解決,是一個寄存器設置的值不對
作者: 冷月楓    時間: 2019-12-9 10:53
感謝各位




歡迎光臨 (http://www.raoushi.com/bbs/) Powered by Discuz! X3.1