最近自己diy了一個數顯的焊臺,基本上可以使用了,電路圖自己畫的,然后去打的樣,
51hei截圖20200408153931873.jpg (23.14 KB, 下載次數: 50)
下載附件
2020-4-8 15:44 上傳
51hei截圖20200408153944421.jpg (109.75 KB, 下載次數: 56)
下載附件
2020-4-8 15:44 上傳
51hei截圖20200408154007039.jpg (70.09 KB, 下載次數: 48)
下載附件
2020-4-8 15:44 上傳
51hei截圖20200408154019956.jpg (97.75 KB, 下載次數: 50)
下載附件
2020-4-8 15:44 上傳
盒子嘛86型底盒,等全部完善了,就全部公布出來將就用吧,現在的問題就是
就是界面不怎么好看,顯示的字體特別小,屏幕 是st7735s 8位并口屏,
改了一下,可是怎么改字體都依然很小,超級看不清晰,是8*16的
怎么改大顯示字體
下面是程序,有哪位可以幫忙看看,怎么改大顯示字體,謝謝了
C51_ST7735S CTC1.8_8BIT.rar
(72.83 KB, 下載次數: 68)
2020-4-8 15:52 上傳
點擊文件名下載附件
程序
#include"dianz.h"
#include"lcd.h"
#include"16x8.h"
#include"24x24.h"
//================================================================================================
// 實現功能: 設置窗口
// 輸入參數: x0,y0,x1,y1 x軸開始,y軸開始,x軸結束,y軸結束
//================================================================================================
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
}
//================================================================================================
// 實現功能: 顯示字符串
// 輸入參數: 整數型
//================================================================================================
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;
}
} */
//================================================================================================
// 實現功能: 顯示字符串
// 輸入參數:
//================================================================================================
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) ;
}
}
}
}
}
}
//================================================================================================
// 實現功能: 顯示字符串
// 輸入參數:
//================================================================================================
void GUI_Point(unsigned char x, unsigned int y, unsigned int color)
{
LCD_setxy(y,x);
LCD_DataWrite(color);
LCD_DataWrite(color>>8);
}
//================================================================================================
// 實現功能: 設置x,y坐標
// 輸入參數: x,y
//================================================================================================
void LCD_setxy(unsigned char x,unsigned int y)
{
LCD_setwindow(x,y,x,y);
}
|