激光通信装置程序和原理图

Article Directory

原理图
原理图


main.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
#include <REGX52.H>
#include "ired.h"
#include "lcd9648.h"
#include "ser.h"
sbit sg1=P1^6;
sbit sg2=P1^7;
sbit laser=P2^0;
static unsigned char
Num,count=0,Command,Result=0,lcd_flag=0,
sg_flag=0;/*0 is 180,1 is 360*/
unsigned char laser_flag=0;
static unsigned int sg1_angle=50,sg2_rate=140;
static unsigned int password=0;
code unsigned char tab[21]={
0x16,
0x0c,0x18,0x5e,
0x08,0x1c,0x5a,
0x42,0x52,0x4a,
/*~~~~~~~~~~*/
0x45,0x46,0x47,//10-12
0x44,0x40,0x43,//13-15
0x07,0x15,0x09,//16-18
0x19,0x0d};

void sg90_1(unsigned char sg1_angle);
void sg90_2(unsigned char sg2_rate,unsigned char sg2_time);
void main()
{
laser=0;
IR_Init();
UartInit();
lcd9648_init();
delay_ms(300);
lcd9648_clear();
while(1)
{
if(IR_GetDataFlag()||ser_flag)
{
Command=IR_GetCommand();
if(Command==tab[0]||SBUF_temp==0x00){Num=0;}
if(Command==tab[1]||SBUF_temp==0x01){Num=1;}
if(Command==tab[2]||SBUF_temp==0x02){Num=2;}
if(Command==tab[3]||SBUF_temp==0x03){Num=3;}
if(Command==tab[4]||SBUF_temp==0x04){Num=4;}
if(Command==tab[5]||SBUF_temp==0x05){Num=5;}
if(Command==tab[6]||SBUF_temp==0x06){Num=6;}
if(Command==tab[7]||SBUF_temp==0x07){Num=7;}
if(Command==tab[8]||SBUF_temp==0x08){Num=8;}
if(Command==tab[9]||SBUF_temp==0x09){Num=9;}
if(Command==tab[10]||SBUF_temp==0x0a){Num=10;}//clear
if(Command==tab[11]||SBUF_temp==0x0b){Num=11;}//
if(Command==tab[12]||SBUF_temp==0x0c){Num=12;}
if(Command==tab[13]||SBUF_temp==0x0d){Num=13;}//switch_sg90_mode
if(Command==tab[14]||SBUF_temp==0x0e){Num=14;}//up
if(Command==tab[15]||SBUF_temp==0x0f){Num=15;}//down
if(Command==tab[16]||SBUF_temp==0x10){Num=16;}//backspace
if(Command==tab[17]||SBUF_temp==0x11){Num=17;}//laser
if(Command==tab[18]||SBUF_temp==0x12){Num=18;}
if(Command==tab[19]||SBUF_temp==0x13){Num=19;}//verify//rpt
if(Command==tab[20]||SBUF_temp==0x14){Num=20;}//again
SBUF_temp=0xff;
lcd_flag=1;
ser_flag=0;
P0=0xff;
P0=P0<<Num;
}
if(lcd_flag)
{
UART_SendByte(Num);
if(Num<10)
{

if(count<4)
{
password*=10;
password+=Num%10;
count++;
}
lcd_show_string(0,0,9,"INPUT PW");
lcd_show_char(0,1,'[');
lcd_show_num(8,1,password,4,0);
lcd_show_char(40,1,']');
lcd_show_char(56,1,'>');
lcd_show_num(64,1,Num,1,0);
lcd_show_char(72,1,'<');
}
if(Num==10)
{
lcd9648_clear();
}
if(Num==19)
{
if(password==6666)
{
password=0;
count=0;
Result=1;
lcd_show_string(0,2,7," ");
lcd_show_string(0,2,3,"OK");
UART_SendByte('T');
lcd_show_char(0,1,'[');
lcd_show_num(8,1,password,4,0);
lcd_show_char(40,1,']');
}
else
{
password=0;
count=0;
Result=2;
lcd_show_string(0,2,7," ");
lcd_show_string(0,2,3,"NO");
UART_SendByte('F');
lcd_show_char(0,1,'[');
lcd_show_num(8,1,password,4,0);
lcd_show_char(40,1,']');
}
}
if(Num==20)
{
password=0;
count=0;
lcd_show_string(0,2,6,"AGAIN");
UART_SendByte('R');
lcd_show_char(0,1,'[');
lcd_show_num(8,1,password,4,0);
lcd_show_char(40,1,']');
}
if(Num==16)
{
if(count>0 && count<=4)
{
password/=10;
count--;
}
lcd_show_char(0,1,'[');
lcd_show_num(8,1,password,4,0);
lcd_show_char(40,1,']');
}
if(Num==17)
{
laser_flag=~laser_flag;
laser=laser_flag;;
}
if(Result==1)
{
lcd9648_clear();
if(Num==13)
{
sg_flag=~sg_flag;
}
if(Num==14)
{
if(sg_flag)
{
sg2_rate=100;
sg90_2(sg2_rate,2);
UART_SendByte((sg2_rate-50)/50);
}
if(!sg_flag)
{
sg1_angle+=20;
if(sg1_angle>250)//limit
{
sg1=1;
sg1_angle=250;
}
sg90_1(sg1_angle);
UART_SendByte((sg1_angle-50)/20);
P0=0xff;
P0=P0<<((sg1_angle-50)/20);
}
}
if(Num==15)
{
if(sg_flag)
{
sg2_rate=200;
sg90_2(sg2_rate,2);
UART_SendByte((sg2_rate-50)/50);
}
if(!sg_flag)
{
sg1_angle-=20;
if(sg1_angle<=50)
{
sg1_angle=50;
}
sg90_1(sg1_angle);
UART_SendByte((sg1_angle-50)/20);
P0=0xff;
P0=P0<<((sg1_angle-50)/20);
}
}
}
if(Result==2)
{
if(IR_GetDataFlag())
{Result=0;}
}
lcd_flag=0;
}
}
}

void sg90_1(unsigned char sg1_angle)
{
sg1=1;
delay_10us(sg1_angle);
sg1=0;
delay_10us(2000-sg1_angle);
}

void sg90_2(unsigned char sg2_rate,unsigned char sg2_time)
{
for(sg2_time;sg2_time>0;sg2_time--)//0<sg_rate<250
{
sg2=1;
delay_10us(sg2_rate);
sg2=0;
delay_10us(2000-sg2_rate);
}
}

ired.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
#include <REGX52.H>
#include "timer0.h"
#include "int0.h"

unsigned int IR_Time;
unsigned char IR_State;
unsigned char IR_Data[4];
unsigned char IR_pData;
unsigned char IR_DataFlag;
unsigned char IR_RepeatFlag;
unsigned char IR_Address;
unsigned char IR_Command;

void IR_Init(void)
{
Timer0_Init();
Int0_Init();
}

unsigned char IR_GetDataFlag(void)
{
if(IR_DataFlag)
{
IR_DataFlag=0;
return 1;
}
return 0;
}

unsigned char IR_GetRepeatFlag(void)
{
if(IR_RepeatFlag)
{
IR_RepeatFlag=0;
return 1;
}
return 0;
}

unsigned char IR_GetAddress(void)
{
return IR_Address;
}

unsigned char IR_GetCommand(void)
{
return IR_Command;
}

void Int0_Routine(void) interrupt 0
{
if(IR_State==0)
{
Timer0_SetCounter(0);
Timer0_Run(1);
IR_State=1;
}
else if(IR_State==1)
{
IR_Time=Timer0_GetCounter();
Timer0_SetCounter(0);
//11.0592MHz
if(IR_Time>12442-500 && IR_Time<12442+500)
{
IR_State=2;
}
//11.25ms
else if(IR_Time>10368-500 && IR_Time<10368+500)
{
IR_RepeatFlag=1;
Timer0_Run(0);
IR_State=0;
}
else
{
IR_State=1;
}
}
else if(IR_State==2)
{
IR_Time=Timer0_GetCounter();
Timer0_SetCounter(0);
//1120us
if(IR_Time>1032-500 && IR_Time<1032+500)
{
IR_Data[IR_pData/8]&=~(0x01<<(IR_pData%8));
IR_pData++;
}
//2250us
else if(IR_Time>2074-500 && IR_Time<2074+500)
{
IR_Data[IR_pData/8]|=(0x01<<(IR_pData%8));
IR_pData++;
}
else
{
IR_pData=0;
IR_State=1;
}
if(IR_pData>=32)
{
IR_pData=0;
if((IR_Data[0]==~IR_Data[1]) && (IR_Data[2]==~IR_Data[3]))
{
IR_Address=IR_Data[0];
IR_Command=IR_Data[2];
IR_DataFlag=1;
}
Timer0_Run(0);
IR_State=0;
}
}
}

ired.h

1
2
3
4
5
6
7
8
9
10
#ifndef _IRED_H
#define _IRED_H

void IR_Init(void);
unsigned char IR_GetDataFlag(void);
unsigned char IR_GetRepeatFlag(void);
unsigned char IR_GetAddress(void);
unsigned char IR_GetCommand(void);

#endif

timer0.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include <REGX52.H>

void Timer0_Init(void)
{
TMOD &= 0xF0;
TMOD |= 0x01;
TL0 = 0;
TH0 = 0;
TF0 = 0;
TR0 = 0;
}

void Timer0_SetCounter(unsigned int Value)
{
TH0=Value/256;
TL0=Value%256;
}
unsigned int Timer0_GetCounter(void)
{
return (TH0<<8)|TL0;
}
void Timer0_Run(unsigned char Flag)
{
TR0=Flag;
}

timer0.h

1
2
3
4
5
6
7
8
9
#ifndef _TIMER0_H
#define _TIMER0_H

void Timer0_Init(void);
void Timer0_SetCounter(unsigned int Value);
unsigned int Timer0_GetCounter(void);
void Timer0_Run(unsigned char Flag);

#endif

public.c

1
2
3
4
5
6
7
8
9
10
11
12
#include "public.h"
void delay_10us(u16 ten_us)
{
while(ten_us--);
}

void delay_ms(u16 ms)
{
u16 i,j;
for(i=ms;i>0;i--)
for(j=110;j>0;j--);
}

public.h

1
2
3
4
5
6
7
8
9
10
11
#ifndef _PUBLIC_H
#define _PUBLIC_H_

#include <REGX52.H>

typedef unsigned int u16;
typedef unsigned char u8;
typedef unsigned long u32;
void delay_10us(u16 ten_us);
void delay_ms(u16 ms);
#endif

int0.c

1
2
3
4
5
6
7
8
9
10
#include <REGX52.H>

void Int0_Init(void)
{
IT0=1;
IE0=0;
EX0=1;
EA=1;
PX0=1;
}

int0.h

1
2
3
4
5
6
#ifndef _INT0_H
#define _INT0_H

void Int0_Init(void);

#endif

ser.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include <REGX52.H>
#include "public.h"
unsigned char ser_flag,SBUF_temp;
void UartInit(void)
{
PCON &= 0x7F;
SCON = 0x50;
TMOD &= 0x0F;
TMOD |= 0x20;
TL1 = 0xFD;
TH1 = 0xFD;
ET1 = 0;
TR1 = 1;
ES=1;
EA=1;
}

void UART_SendByte(char Byte)
{
SBUF=Byte;
while(TI==0);
TI=0;
}

void UART_Routine() interrupt 4
{
if(RI==1)
{
RI=0;
ser_flag=1;
SBUF_temp=SBUF;
P0=0xff;
P0=P0<<SBUF;
}
}

ser.h

1
2
3
4
5
6
#ifndef _SER_H
#define _SER_H
void UartInit(void);
void UART_SendByte(char Byte);
extern unsigned char ser_flag,SBUF_temp;
#endif

lcd9648.c

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
#include "lcd9648.h"
#include "font.h"

void lcd9648_spi_write_byte(u8 dat)
{
u8 i=0;

for(i=0;i<8;i++)
{
if((dat&0x80)!=0)
SDA = 1;
else
SDA = 0;
dat<<= 1;
SCL = 0;
SCL = 1;
}
}
void lcd9648_write_cmd(u8 cmd)
{
CS0 = 0;
RS = 0;
lcd9648_spi_write_byte(cmd);
CS0 = 1;
}

void lcd9648_write_dat(u8 dat)
{
CS0 = 0;
RS = 1;
lcd9648_spi_write_byte(dat);
CS0 = 1;
}

void lcd9648_init(void)
{
RST=1;
delay_ms(10);
RST=0;
delay_ms(10);
RST=1;
delay_ms(10);

lcd9648_write_cmd(0xe2);
lcd9648_write_cmd(0xc8);
lcd9648_write_cmd(0xa0);
lcd9648_write_cmd(0x2f);
lcd9648_write_cmd(0x26);
lcd9648_write_cmd(0x81);
lcd9648_write_cmd(0x10);
lcd9648_write_cmd(0xaf);
lcd9648_write_cmd(0x40);
}

void lcd9648_clear(void)
{
u8 i,j;

for(i=0;i<9;i++)
{
lcd9648_write_cmd(0x40);
lcd9648_write_cmd(0xb0+i);
lcd9648_write_cmd(0x10);
lcd9648_write_cmd(0x00);

for(j = 0; j < LCD_WIDTH; j++)
{
lcd9648_write_dat(0x00);
}
}
}

void lcd_show_char(u8 x,u8 y,u8 num)
{
unsigned char i, x1, x2;

if(x>96||y>2)return;

y *= 2;
y += 0xB0;
x1 = (x >> 4) & 0x0F;
x2 = x & 0x0F;

lcd9648_write_cmd(y);
lcd9648_write_cmd(0x10+x1);
lcd9648_write_cmd(0x00+x2);

num=num-' ';

for(i = 0;i < 8;i++)
{
lcd9648_write_dat(ascii_1608[num][i*2]);
}

lcd9648_write_cmd(y+1);
lcd9648_write_cmd(0x10+x1);
lcd9648_write_cmd(0x00+x2);

for(i = 0;i < 8;i++)
{
lcd9648_write_dat(ascii_1608[num][i*2+1]);
}

}

void lcd_show_string(u8 x,u8 y,u8 Num,u8 *p)
{
u8 i = 0;
while(i < Num)
{
lcd_show_char(x,y,*p);
x+=8;
p++;
i++;
if(*p == '\0' || i >= 12)
return;
}
}

u32 lcd_pow(u8 m,u8 n)
{
u32 result=1;
while(n--)result*=m;
return result;
}

void lcd_show_num(u8 x,u8 y,u32 num,u8 len,u8 mode)
{
u8 t,temp;
u8 enshow=0;
for(t=0;t<len;t++)
{
temp=(num/lcd_pow(10,len-t-1))%10;
if(enshow==0&&t<(len-1))
{
if(temp==0)
{
if(mode == 1)
lcd_show_char(x+(16/2)*t,y,'0');
else
lcd_show_char(x+(16/2)*t,y,' ');
continue;
}else enshow=1;

}
lcd_show_char(x+(16/2)*t,y,temp+'0');
}
}

void lcd_show_16HZ(u8 x, u8 y, u8 *cn)
{
u8 j, x1, x2, wordNum;

if(x>96||y>5)return;

y *= 2;
y += 0xB0;

while ( *cn != '\0')
{
x1 = (x >> 4) & 0x0F;
x2 = x & 0x0F;

lcd9648_write_cmd(y);
lcd9648_write_cmd(0x10+x1);
lcd9648_write_cmd(0x00+x2);

for (wordNum=0; wordNum<30; wordNum++)
{
if ((CnChar16x16[wordNum].Index[0] == *cn)&&(CnChar16x16[wordNum].Index[1] == *(cn+1)))
{
for (j=0; j<32; j++)
{
if (j == 16)
{
lcd9648_write_cmd(y+1);
lcd9648_write_cmd(0x10+x1);
lcd9648_write_cmd(0x00+x2);
}
lcd9648_write_dat(CnChar16x16[wordNum].Msk[j]);
}
x += 16;
}
}
cn += 2;
}
}

void lcd_show_Image(u8 *p)
{
unsigned char i,j;

for(i=0;i<6;i++)
{
lcd9648_write_cmd(0x40);
lcd9648_write_cmd(0xb0|i);
lcd9648_write_cmd(0x10);
lcd9648_write_cmd(0x00);
for(j = 0;j < 96;j++)
{
lcd9648_write_dat(*p);
p++;
}
}
}

lcd9648.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _lcd9648_H
#define _lcd9648_H

#include "public.h"

sbit RST = P1^5;
sbit CS0 = P1^4;
sbit RS = P1^3;
sbit SDA = P1^2;
sbit SCL = P1^1;

#define LCD_WIDTH 96
#define LCD_HEIGHT 48

void lcd9648_init(void);
void lcd9648_clear(void);
void lcd9648_write_dat(u8 dat);
void lcd9648_write_cmd(u8 cmd);
void lcd_show_char(u8 x,u8 y,u8 num);
void lcd_show_string(u8 x,u8 y,u8 Num,u8 *p);
void lcd_show_16HZ(u8 x, u8 y, u8 *cn);
void lcd_show_num(u8 x,u8 y,u32 num,u8 len,u8 mode);
void lcd_show_Image(u8 *p);

#endif

font.h

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef _font_H
#define _font_H

code unsigned char ascii_1608[95][16]={
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*" ",0*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xF8,0x33,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"!",1*/
{0x00,0x00,0x10,0x00,0x0C,0x00,0x02,0x00,0x10,0x00,0x0C,0x00,0x02,0x00,0x00,0x00},/*""",2*/
{0x00,0x00,0x40,0x04,0xC0,0x3F,0x78,0x04,0x40,0x04,0xC0,0x3F,0x78,0x04,0x00,0x00},/*"#",3*/
{0x00,0x00,0x70,0x18,0x88,0x20,0x88,0x20,0xFC,0xFF,0x08,0x21,0x30,0x1E,0x00,0x00},/*"$",4*/
{0xF0,0x00,0x08,0x31,0xF0,0x0C,0x80,0x03,0x60,0x1E,0x18,0x21,0x00,0x1E,0x00,0x00},/*"%",5*/
{0x00,0x1E,0xF0,0x21,0x08,0x23,0x88,0x2C,0x70,0x19,0x00,0x27,0x00,0x21,0x00,0x10},/*"&",6*/
{0x00,0x00,0x12,0x00,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"'",7*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xE0,0x07,0x18,0x18,0x04,0x20,0x02,0x40,0x00,0x00},/*"(",8*/
{0x00,0x00,0x02,0x40,0x04,0x20,0x18,0x18,0xE0,0x07,0x00,0x00,0x00,0x00,0x00,0x00},/*")",9*/
{0x40,0x02,0x40,0x02,0x80,0x01,0xF0,0x0F,0x80,0x01,0x40,0x02,0x40,0x02,0x00,0x00},/*"*",10*/
{0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0xE0,0x0F,0x00,0x01,0x00,0x01,0x00,0x01},/*"+",11*/
{0x00,0x00,0x00,0x90,0x00,0x70,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*",",12*/
{0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x01,0x00,0x00},/*"-",13*/
{0x00,0x00,0x00,0x30,0x00,0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*".",14*/
{0x00,0x00,0x00,0x60,0x00,0x18,0x00,0x07,0xC0,0x00,0x38,0x00,0x04,0x00,0x00,0x00},/*"/",15*/
{0x00,0x00,0xE0,0x0F,0x10,0x10,0x08,0x20,0x08,0x20,0x10,0x10,0xE0,0x0F,0x00,0x00},/*"0",16*/
{0x00,0x00,0x00,0x00,0x10,0x20,0x10,0x20,0xF8,0x3F,0x00,0x20,0x00,0x20,0x00,0x00},/*"1",17*/
{0x00,0x00,0x70,0x30,0x08,0x28,0x08,0x24,0x08,0x22,0x08,0x21,0xF0,0x30,0x00,0x00},/*"2",18*/
{0x00,0x00,0x30,0x18,0x08,0x20,0x08,0x21,0x08,0x21,0x88,0x22,0x70,0x1C,0x00,0x00},/*"3",19*/
{0x00,0x00,0x00,0x06,0x80,0x05,0x40,0x24,0x30,0x24,0xF8,0x3F,0x00,0x24,0x00,0x24},/*"4",20*/
{0x00,0x00,0xF8,0x19,0x88,0x20,0x88,0x20,0x88,0x20,0x08,0x11,0x08,0x0E,0x00,0x00},/*"5",21*/
{0x00,0x00,0xE0,0x0F,0x10,0x11,0x88,0x20,0x88,0x20,0x90,0x20,0x00,0x1F,0x00,0x00},/*"6",22*/
{0x00,0x00,0x18,0x00,0x08,0x00,0x08,0x3E,0x88,0x01,0x68,0x00,0x18,0x00,0x00,0x00},/*"7",23*/
{0x00,0x00,0x70,0x1C,0x88,0x22,0x08,0x21,0x08,0x21,0x88,0x22,0x70,0x1C,0x00,0x00},/*"8",24*/
{0x00,0x00,0xF0,0x01,0x08,0x12,0x08,0x22,0x08,0x22,0x10,0x11,0xE0,0x0F,0x00,0x00},/*"9",25*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x30,0xC0,0x30,0x00,0x00,0x00,0x00,0x00,0x00},/*":",26*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xE0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*";",27*/
{0x00,0x00,0x00,0x01,0x80,0x02,0x40,0x04,0x20,0x08,0x10,0x10,0x08,0x20,0x00,0x00},/*"<",28*/
{0x00,0x00,0x40,0x02,0x40,0x02,0x40,0x02,0x40,0x02,0x40,0x02,0x40,0x02,0x00,0x00},/*"=",29*/
{0x00,0x00,0x08,0x20,0x10,0x10,0x20,0x08,0x40,0x04,0x80,0x02,0x00,0x01,0x00,0x00},/*">",30*/
{0x00,0x00,0x70,0x00,0x48,0x00,0x08,0x30,0x08,0x37,0x88,0x00,0x70,0x00,0x00,0x00},/*"?",31*/
{0xC0,0x07,0x30,0x18,0xC8,0x27,0x28,0x28,0xE8,0x2F,0x10,0x28,0xE0,0x17,0x00,0x00},/*"@",32*/
{0x00,0x20,0x00,0x3C,0xC0,0x23,0x38,0x02,0xE0,0x02,0x00,0x27,0x00,0x38,0x00,0x20},/*"A",33*/
{0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x20,0x88,0x20,0x70,0x11,0x00,0x0E,0x00,0x00},/*"B",34*/
{0xC0,0x07,0x30,0x18,0x08,0x20,0x08,0x20,0x08,0x20,0x08,0x10,0x38,0x08,0x00,0x00},/*"C",35*/
{0x08,0x20,0xF8,0x3F,0x08,0x20,0x08,0x20,0x08,0x20,0x10,0x10,0xE0,0x0F,0x00,0x00},/*"D",36*/
{0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x20,0xE8,0x23,0x08,0x20,0x10,0x18,0x00,0x00},/*"E",37*/
{0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x00,0xE8,0x03,0x08,0x00,0x10,0x00,0x00,0x00},/*"F",38*/
{0xC0,0x07,0x30,0x18,0x08,0x20,0x08,0x20,0x08,0x22,0x38,0x1E,0x00,0x02,0x00,0x00},/*"G",39*/
{0x08,0x20,0xF8,0x3F,0x08,0x21,0x00,0x01,0x00,0x01,0x08,0x21,0xF8,0x3F,0x08,0x20},/*"H",40*/
{0x00,0x00,0x08,0x20,0x08,0x20,0xF8,0x3F,0x08,0x20,0x08,0x20,0x00,0x00,0x00,0x00},/*"I",41*/
{0x00,0xC0,0x00,0x80,0x08,0x80,0x08,0x80,0xF8,0x7F,0x08,0x00,0x08,0x00,0x00,0x00},/*"J",42*/
{0x08,0x20,0xF8,0x3F,0x88,0x20,0xC0,0x01,0x28,0x26,0x18,0x38,0x08,0x20,0x00,0x00},/*"K",43*/
{0x08,0x20,0xF8,0x3F,0x08,0x20,0x00,0x20,0x00,0x20,0x00,0x20,0x00,0x30,0x00,0x00},/*"L",44*/
{0x08,0x20,0xF8,0x3F,0xF8,0x01,0x00,0x3E,0xF8,0x01,0xF8,0x3F,0x08,0x20,0x00,0x00},/*"M",45*/
{0x08,0x20,0xF8,0x3F,0x30,0x20,0xC0,0x00,0x00,0x07,0x08,0x18,0xF8,0x3F,0x08,0x00},/*"N",46*/
{0xE0,0x0F,0x10,0x10,0x08,0x20,0x08,0x20,0x08,0x20,0x10,0x10,0xE0,0x0F,0x00,0x00},/*"O",47*/
{0x08,0x20,0xF8,0x3F,0x08,0x21,0x08,0x01,0x08,0x01,0x08,0x01,0xF0,0x00,0x00,0x00},/*"P",48*/
{0xE0,0x0F,0x10,0x10,0x08,0x28,0x08,0x28,0x08,0x30,0x10,0x50,0xE0,0x4F,0x00,0x00},/*"Q",49*/
{0x08,0x20,0xF8,0x3F,0x88,0x20,0x88,0x00,0x88,0x03,0x88,0x0C,0x70,0x30,0x00,0x20},/*"R",50*/
{0x00,0x00,0x70,0x38,0x88,0x20,0x08,0x21,0x08,0x21,0x08,0x22,0x38,0x1C,0x00,0x00},/*"S",51*/
{0x18,0x00,0x08,0x00,0x08,0x20,0xF8,0x3F,0x08,0x20,0x08,0x00,0x18,0x00,0x00,0x00},/*"T",52*/
{0x08,0x00,0xF8,0x1F,0x08,0x20,0x00,0x20,0x00,0x20,0x08,0x20,0xF8,0x1F,0x08,0x00},/*"U",53*/
{0x08,0x00,0x78,0x00,0x88,0x07,0x00,0x38,0x00,0x0E,0xC8,0x01,0x38,0x00,0x08,0x00},/*"V",54*/
{0x08,0x00,0xF8,0x03,0x00,0x3E,0xF8,0x01,0x00,0x3E,0xF8,0x03,0x08,0x00,0x00,0x00},/*"W",55*/
{0x08,0x20,0x18,0x30,0x68,0x2C,0x80,0x03,0x80,0x03,0x68,0x2C,0x18,0x30,0x08,0x20},/*"X",56*/
{0x08,0x00,0x38,0x00,0xC8,0x20,0x00,0x3F,0xC8,0x20,0x38,0x00,0x08,0x00,0x00,0x00},/*"Y",57*/
{0x10,0x20,0x08,0x38,0x08,0x26,0x08,0x21,0xC8,0x20,0x38,0x20,0x08,0x18,0x00,0x00},/*"Z",58*/
{0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0x7F,0x02,0x40,0x02,0x40,0x02,0x40,0x00,0x00},/*"[",59*/
{0x00,0x00,0x04,0x00,0x38,0x00,0xC0,0x01,0x00,0x06,0x00,0x38,0x00,0xC0,0x00,0x00},/*"\",60*/
{0x00,0x00,0x02,0x40,0x02,0x40,0x02,0x40,0xFE,0x7F,0x00,0x00,0x00,0x00,0x00,0x00},/*"]",61*/
{0x00,0x00,0x00,0x00,0x04,0x00,0x02,0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00},/*"^",62*/
{0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80,0x00,0x80},/*"_",63*/
{0x00,0x00,0x02,0x00,0x02,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"`",64*/
{0x00,0x00,0x00,0x19,0x80,0x24,0x80,0x24,0x80,0x12,0x00,0x3F,0x00,0x20,0x00,0x00},/*"a",65*/
{0x10,0x00,0xF0,0x3F,0x00,0x11,0x80,0x20,0x80,0x20,0x00,0x11,0x00,0x0E,0x00,0x00},/*"b",66*/
{0x00,0x00,0x00,0x0E,0x00,0x11,0x80,0x20,0x80,0x20,0x80,0x20,0x00,0x11,0x00,0x00},/*"c",67*/
{0x00,0x00,0x00,0x1F,0x80,0x20,0x80,0x20,0x80,0x20,0x90,0x10,0xF0,0x3F,0x00,0x20},/*"d",68*/
{0x00,0x00,0x00,0x1F,0x80,0x24,0x80,0x24,0x80,0x24,0x80,0x24,0x00,0x17,0x00,0x00},/*"e",69*/
{0x00,0x00,0x80,0x20,0x80,0x20,0xE0,0x3F,0x90,0x20,0x90,0x20,0x20,0x00,0x00,0x00},/*"f",70*/
{0x00,0x00,0x00,0x6B,0x80,0x94,0x80,0x94,0x80,0x94,0x80,0x93,0x80,0x60,0x00,0x00},/*"g",71*/
{0x10,0x20,0xF0,0x3F,0x00,0x21,0x80,0x00,0x80,0x00,0x80,0x20,0x00,0x3F,0x00,0x20},/*"h",72*/
{0x00,0x00,0x80,0x20,0x98,0x20,0x98,0x3F,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00},/*"i",73*/
{0x00,0x00,0x00,0xC0,0x00,0x80,0x80,0x80,0x98,0x80,0x98,0x7F,0x00,0x00,0x00,0x00},/*"j",74*/
{0x10,0x20,0xF0,0x3F,0x00,0x24,0x00,0x06,0x80,0x29,0x80,0x30,0x80,0x20,0x00,0x00},/*"k",75*/
{0x00,0x00,0x10,0x20,0x10,0x20,0xF8,0x3F,0x00,0x20,0x00,0x20,0x00,0x00,0x00,0x00},/*"l",76*/
{0x80,0x20,0x80,0x3F,0x80,0x20,0x80,0x00,0x80,0x3F,0x80,0x20,0x80,0x00,0x00,0x3F},/*"m",77*/
{0x80,0x20,0x80,0x3F,0x00,0x21,0x80,0x00,0x80,0x00,0x80,0x20,0x00,0x3F,0x00,0x20},/*"n",78*/
{0x00,0x00,0x00,0x1F,0x80,0x20,0x80,0x20,0x80,0x20,0x80,0x20,0x00,0x1F,0x00,0x00},/*"o",79*/
{0x80,0x80,0x80,0xFF,0x00,0x91,0x80,0x20,0x80,0x20,0x00,0x11,0x00,0x0E,0x00,0x00},/*"p",80*/
{0x00,0x00,0x00,0x0E,0x00,0x11,0x80,0x20,0x80,0x20,0x00,0x91,0x80,0xFF,0x00,0x80},/*"q",81*/
{0x80,0x20,0x80,0x20,0x80,0x3F,0x00,0x21,0x80,0x20,0x80,0x00,0x80,0x01,0x00,0x00},/*"r",82*/
{0x00,0x00,0x00,0x33,0x80,0x24,0x80,0x24,0x80,0x24,0x80,0x24,0x80,0x19,0x00,0x00},/*"s",83*/
{0x00,0x00,0x80,0x00,0x80,0x00,0xE0,0x1F,0x80,0x20,0x80,0x20,0x00,0x10,0x00,0x00},/*"t",84*/
{0x80,0x00,0x80,0x1F,0x00,0x20,0x00,0x20,0x00,0x20,0x80,0x10,0x80,0x3F,0x00,0x20},/*"u",85*/
{0x80,0x00,0x80,0x03,0x80,0x0C,0x00,0x30,0x80,0x0C,0x80,0x03,0x80,0x00,0x00,0x00},/*"v",86*/
{0x80,0x01,0x80,0x0E,0x00,0x30,0x80,0x0C,0x80,0x07,0x00,0x38,0x80,0x06,0x80,0x01},/*"w",87*/
{0x00,0x00,0x80,0x20,0x80,0x31,0x80,0x0E,0x00,0x2E,0x80,0x31,0x80,0x20,0x00,0x00},/*"x",88*/
{0x80,0x00,0x80,0x81,0x80,0x86,0x00,0x78,0x00,0x18,0x80,0x06,0x80,0x01,0x80,0x00},/*"y",89*/
{0x00,0x00,0x80,0x21,0x80,0x30,0x80,0x2C,0x80,0x22,0x80,0x21,0x80,0x30,0x00,0x00},/*"z",90*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0xFC,0x3E,0x02,0x40,0x02,0x40},/*"{",91*/
{0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00},/*"|",92*/
{0x02,0x40,0x02,0x40,0xFC,0x3E,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00},/*"}",93*/
{0x00,0x00,0x02,0x00,0x01,0x00,0x02,0x00,0x02,0x00,0x04,0x00,0x02,0x00,0x00,0x00},/*"~",94*/
};

struct Cn16CharTypeDef
{
unsigned char Index[2];
unsigned char Msk[32];
};

struct Cn16CharTypeDef code CnChar16x16[]=
{
"瑞",0x00, 0x02, 0xfa, 0x22, 0x23, 0x20, 0x27, 0xf8, 0x20, 0x23, 0x22, 0x3a, 0xe2, 0x42, 0x02, 0x02
0x20, 0x22, 0x22, 0x22, 0xfe, 0x00, 0xfe, 0x20, 0x40, 0xfe, 0x52, 0x52, 0x52, 0x52, 0x52, 0x06,

"涵",0x00, 0x23, 0x10, 0x10, 0x84, 0x45, 0x44, 0x14, 0x14, 0x25, 0xe6, 0x25, 0x24, 0x24, 0x27, 0x00,
0x00, 0xf8, 0x10, 0x20, 0x44, 0x54, 0xe4, 0x44, 0xe4, 0x54, 0x4c, 0x44, 0x84, 0x04, 0xfc, 0x04,
};

#endif

pic.h

1
2
3
4
#ifndef _PIC_H
#define _PIC_H
code unsigned char gImage_pic[576] = {};
#endif