[51 싱글 칩 마이크로컴퓨터] TFT 2.4 컬러 스크린 2 [32 * 32 문자 표시]
40423 단어 싱글 칩 마이크로컴퓨터
>_<:같은 이치 로 다른 형식의 글꼴 을 표시 하려 면 해당 하 는 라 이브 러 리 를 만들어 야 합 니 다. 예 를 들 어 gb 3232 의 한자 라 이브 러 리 가 있 습 니 다: GB 3232. h
1 // ------------------ ------------------------ //
2 struct typFNT_GB32 //
3 {
4 unsigned char Index[3]; //
5 unsigned char Msk[128]; //
6 };
7
8 /////////////////////////////////////////////////////////////////////////
9 // //
10 // : 32.dot, , : //
11 /////////////////////////////////////////////////////////////////////////
12 code struct typFNT_GB32 codeGB_32[] = //
13 {
14 /*-- : --*/
15 /*-- 22; : x =29x29 --*/
16 /*-- 8 , : x =32x29 --*/
17 " ",0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x09,0xC0,0x00,0x00,0x7D,0xF8,0x00,
18 0x03,0xFD,0xCE,0x00,0x3F,0xC1,0xC7,0x00,0x00,0xC1,0xC7,0x00,0x00,0xC1,0xC3,0x00,
19 0x00,0xC1,0xC3,0x00,0x00,0xC1,0xC0,0xC0,0x3F,0xFF,0xFF,0xE0,0x20,0xC0,0xC0,0x00,
20 0x00,0xC0,0xC2,0x00,0x00,0xC0,0xC7,0x80,0x00,0xC2,0xC7,0x80,0x00,0xDE,0xCF,0x00,
21 0x00,0xF8,0xCE,0x00,0x0F,0xE0,0xFC,0x00,0x7F,0xC0,0xF8,0x00,0x3C,0xC0,0x78,0x00,
22 0x30,0xC0,0x70,0x20,0x00,0xC1,0xF8,0x20,0x00,0xC3,0xB8,0x20,0x00,0xC7,0x1E,0x20,
23 0x00,0xDC,0x0F,0x60,0x0F,0xF0,0x07,0xE0,0x03,0xC0,0x03,0xF0,0x01,0x80,0x00,0x70,
24 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
25
26 /*-- : --*/
27 /*-- 22; : x =29x29 --*/
28 /*-- 8 , : x =32x29 --*/
29 " ",0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x3F,0x80,0x00,0x3F,0xFF,0x80,
30 0x0F,0xFF,0x06,0x00,0x01,0x86,0x0F,0x00,0x00,0xC3,0x0E,0x00,0x00,0xE3,0x9C,0x00,
31 0x08,0x63,0x98,0x00,0x08,0x41,0x10,0xC0,0x0F,0xFF,0xFF,0xE0,0x18,0x18,0x01,0xC0,
32 0x38,0x1C,0x01,0x80,0x38,0x1C,0x03,0x00,0x0F,0xFF,0xFF,0x00,0x0F,0xFF,0xFF,0x00,
33 0x00,0x38,0x00,0x00,0x00,0x3F,0xFC,0x00,0x00,0x3F,0xFE,0x00,0x00,0x7C,0x1C,0x00,
34 0x00,0x6C,0x38,0x00,0x00,0xC6,0x70,0x00,0x01,0xC3,0xE0,0x00,0x03,0x81,0xC0,0x00,
35 0x07,0x07,0xFC,0x00,0x0C,0x1E,0x3F,0xF0,0x38,0xF8,0x0F,0xE0,0x03,0xC0,0x00,0xC0,
36 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
37
38 /*-- : --*/
39 /*-- 22; : x =29x29 --*/
40 /*-- 8 , : x =32x29 --*/
41 " ",0x00,0x00,0x00,0x00,0x00,0x80,0x30,0x00,0x00,0xE0,0x38,0x00,0x00,0x70,0x38,0x00,
42 0x00,0x38,0x60,0x00,0x00,0x38,0x60,0x00,0x06,0x10,0xC6,0x00,0x07,0xFF,0xFF,0x00,
43 0x07,0x06,0x06,0x00,0x07,0x06,0x06,0x00,0x07,0x06,0x06,0x00,0x07,0xFF,0xFE,0x00,
44 0x07,0xFF,0xFE,0x00,0x07,0x06,0x06,0x00,0x07,0x06,0x06,0x00,0x07,0x06,0x06,0x00,
45 0x07,0xFF,0xFE,0x00,0x07,0x06,0x06,0x00,0x06,0x06,0x00,0x00,0x00,0x06,0x00,0xE0,
46 0x7F,0xFF,0xFF,0xF0,0x20,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,
47 0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,0x00,0x06,0x00,0x00,
48 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
49
50 /*-- : --*/
51 /*-- 22; : x =29x29 --*/
52 /*-- 8 , : x =32x29 --*/
53 " ",0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x01,0x00,0xF0,0x00,0x01,0xC0,0xE0,0x00,
54 0x01,0xC0,0xE0,0x00,0x01,0x80,0xE0,0x00,0x01,0x80,0xE0,0x00,0x01,0x80,0xE0,0x00,
55 0x01,0x80,0xE0,0x80,0x01,0x80,0xE1,0xC0,0x01,0xFF,0xFF,0xE0,0x01,0x80,0x00,0x00,
56 0x01,0x80,0x00,0x00,0x01,0x80,0x00,0x00,0x01,0x80,0x30,0x00,0x01,0xFF,0xF8,0x00,
57 0x01,0xFF,0xF8,0x00,0x01,0x80,0x30,0x00,0x03,0x80,0x30,0x00,0x03,0x80,0x30,0x00,
58 0x03,0x00,0x30,0x00,0x07,0x00,0x30,0x00,0x06,0x00,0x30,0x00,0x0E,0x00,0x30,0x00,
59 0x0C,0x00,0x30,0x00,0x18,0x00,0x30,0x00,0x30,0x00,0x38,0x00,0x20,0x00,0x30,0x00,
60 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
61
62 /*-- : --*/
63 /*-- 22; : x =29x29 --*/
64 /*-- 8 , : x =32x29 --*/
65 " ",0x00,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x03,0x80,0x00,0x00,0x03,0x06,0x06,0x00,
66 0x03,0x07,0xFF,0x00,0x03,0x07,0x0F,0x00,0x03,0x07,0x0E,0x00,0x03,0x37,0x0E,0x00,
67 0x7F,0xF7,0x0E,0x00,0x3F,0xFF,0x0E,0x00,0x03,0x07,0x0E,0x00,0x07,0x07,0x0E,0x00,
68 0x07,0x87,0x0E,0x00,0x07,0xE7,0x0E,0x00,0x0F,0x77,0x0E,0x00,0x0F,0x3F,0x0E,0x00,
69 0x0F,0x17,0x0E,0x00,0x1B,0x07,0x0E,0x00,0x1B,0x06,0x0E,0x00,0x33,0x06,0x0E,0x00,
70 0x33,0x06,0x0E,0x20,0x63,0x0E,0x0E,0x60,0x43,0x0C,0x0E,0x60,0x03,0x1C,0x0E,0x60,
71 0x03,0x18,0x0E,0x70,0x03,0x30,0x07,0xF0,0x03,0x60,0x07,0xE0,0x03,0x40,0x00,0x00,
72 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
73
74 };
>_<:지난 블 로그 의 컬러 스크린 모델 에 있 는 GB 1616 을 모방 한 코드 는 다음 과 같다.
1 #include "GB3232.h" //32*32
2
3 void PutGB3232(unsigned short x, unsigned short y, unsigned char c[2], unsigned int fColor,unsigned int bColor){
4 unsigned int i,j,k;
5
6 LCD_SetPos(x, x+32-1,y, y+32-1);
7
8 for (k=0;k<5;k++) { //5 ,
9 if ((codeGB_32[k].Index[0]==c[0])&&(codeGB_32[k].Index[1]==c[1])){
10 for(i=0;i<128;i++) {
11 unsigned short m=codeGB_32[k].Msk[i];
12 for(j=0;j<8;j++) {
13 if((m&0x80)==0x80) {
14 Write_Data_U16(fColor);
15 }
16 else {
17 Write_Data_U16(bColor);
18 }
19 m<<=1;
20 }
21 }
22 }
23 }
24 }
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
[51 싱글 칩 마이크로컴퓨터] TFT 2.4 컬러 스크린 2 [32 * 32 문자 표시]>_<:같은 이치 로 다른 형식의 글꼴 을 표시 하려 면 해당 하 는 라 이브 러 리 를 만들어 야 합 니 다. 예 를 들 어 gb 3232 의 한자 라 이브 러 리 가 있 습 니 다: GB 3232. >_<:지난 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.