標(biāo)題: 單片機(jī)控制的st7735 1.8寸數(shù)顯焊臺問題 [打印本頁]

作者: c20160526    時(shí)間: 2020-4-8 15:53
標(biāo)題: 單片機(jī)控制的st7735 1.8寸數(shù)顯焊臺問題
最近自己diy了一個數(shù)顯的焊臺,基本上可以使用了,電路圖自己畫的,然后去打的樣,

盒子嘛86型底盒,等全部完善了,就全部公布出來將就用吧,現(xiàn)在的問題就是
就是界面不怎么好看,顯示的字體特別小,屏幕 是st7735s 8位并口屏,

改了一下,可是怎么改字體都依然很小,超級看不清晰,是8*16的



怎么改大顯示字體
下面是程序,有哪位可以幫忙看看,怎么改大顯示字體,謝謝了


C51_ST7735S CTC1.8_8BIT.rar (72.83 KB, 下載次數(shù): 68)


#include"dianz.h"
#include"lcd.h"
#include"16x8.h"
#include"24x24.h"
//================================================================================================
//        實(shí)現(xiàn)功能:        設(shè)置窗口
//        輸入?yún)?shù):        x0,y0,x1,y1    x軸開始,y軸開始,x軸結(jié)束,y軸結(jié)束
//================================================================================================
void LCD_setwindow(unsigned char x0,unsigned int y0,unsigned char x1,unsigned int y1)
{                        
  LCD_CtrlWrite(0x2A);      //Colulm addRSTs set
  LCD_DataWrite(x0>>8);
  LCD_DataWrite(x0);


  LCD_CtrlWrite(0x2B);      //Colulm addRSTs set
  LCD_DataWrite(y0>>8);
  LCD_DataWrite(y0);



  LCD_CtrlWrite(0x2C);      //Write Data to GRAM        
        
}
//================================================================================================
//        實(shí)現(xiàn)功能:        顯示字符串
//        輸入?yún)?shù):         整數(shù)型
//================================================================================================
void GUI_sprintf_string(uchar x, uint y,char code *s, uint color,uint b_color)
{  
  //  char *string = my_itoa(s);
        for(;*s!='\0';s++)                                                                 //char code *s
        {
                GUI_sprintf_char(x, y,*s, color,b_color);
                x=x+8;
        }
}

/*
void GUI_sprintf_int(uchar x, uint y,char code *s, uint color,uint b_color)
{  
        for(;*s!='\0';s++)                                                                 //char code *s
        {
                GUI_sprintf_char(x, y,*s, color,b_color);
                x=x+8;
        }
} */
//================================================================================================
//        實(shí)現(xiàn)功能:        顯示字符串
//        輸入?yún)?shù):        
//================================================================================================
void GUI_sprintf_char(uchar x, uint y,uchar c, uint color,uint b_color)
{  
        unsigned char  s_x ,s_y, temp ;
          unsigned int j;
          c -= 32;
          for( s_y=0 ; s_y < 16 ; s_y++ )
   {
                if(s_y+y<640)
           {
                        j=c;
                   j=j*16+s_y;
                  // temp=font24x24[j];
                   temp=font16x8[j];
                     //temp = font16x8[c*16+s_y] ;
                     for( s_x=0 ; s_x<8 ; s_x++ )
              {
                            if(x+s_x<480)
                      {
                                     if((temp&(0x80>>(s_x))) == (0x80>>(s_x))  )
                              {
                                           GUI_Point(x+s_x, y+s_y,color) ;
                              }
                                     else
                              {
                                             GUI_Point(x+s_x, y+s_y,b_color) ;
                                   }
                           }
                   }
           }
        }
}
//================================================================================================
//        實(shí)現(xiàn)功能:        顯示字符串
//        輸入?yún)?shù):        
//================================================================================================
void GUI_Point(unsigned char x, unsigned int y, unsigned int color)
{  

        LCD_setxy(y,x);
        LCD_DataWrite(color);
        LCD_DataWrite(color>>8);
}

//================================================================================================
//        實(shí)現(xiàn)功能:        設(shè)置x,y坐標(biāo)
//        輸入?yún)?shù):         x,y  
//================================================================================================
void LCD_setxy(unsigned char x,unsigned int y)
{
        LCD_setwindow(x,y,x,y);        
}



作者: l1h2h3    時(shí)間: 2020-4-8 17:42
很有用的分享,感謝大佬,,愛了
作者: c20160526    時(shí)間: 2020-4-8 20:14
l1h2h3 發(fā)表于 2020-4-8 17:42
很有用的分享,感謝大佬,,愛了

關(guān)鍵是還有問題在
作者: 祝云章    時(shí)間: 2020-8-11 11:55
樓主的問題解決了嗎?

作者: c20160526    時(shí)間: 2020-9-22 08:00
祝云章 發(fā)表于 2020-8-11 11:55
樓主的問題解決了嗎?

問題解決了
作者: IdeaMing    時(shí)間: 2020-9-22 09:23
改大字體應(yīng)該需要新的字模,需要改動的不止一個地方。
作者: c20160526    時(shí)間: 2020-9-23 07:08
IdeaMing 發(fā)表于 2020-9-22 09:23
改大字體應(yīng)該需要新的字模,需要改動的不止一個地方。

對的,重新取了模,然后改動了一下其他地方
作者: ztz611    時(shí)間: 2022-3-8 08:02
2.4寸 屏幕 能不能 驅(qū)動?用上
作者: 螞蟻科技    時(shí)間: 2024-11-23 20:30
晶振設(shè)置多少兆?不一個廠家的能驅(qū)動嗎?




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