Page 517 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 517
unsigned char array[6]={'0','0','0','0','0','0'};
int k=0,flag=0;
flash unsigned char cg_pat[] = // 한글폰트
{0x00, 0x1E, 0x06, 0x06, 0x0B, 0x0A, 0x1E, 0x02, //과 0x00
0x00, 0x0A, 0x1E, 0x0B, 0x16, 0x0A, 0x1E, 0x02, //학 0x01
0x00, 0x11, 0x13, 0x11, 0x13, 0x1D, 0x08, 0x0F, //년 0x02
0x00, 0x16, 0x1E, 0x17, 0x1E, 0x02, 0x08, 0x0F, //반 0x03
0x00, 0x15, 0x1D, 0x17, 0x1D, 0x01, 0x10, 0x1F, //번 0x04
0x00, 0x1D, 0x05, 0x05, 0x00, 0x0F, 0x09, 0x0F, //김 0x05
0x0A, 0x0E, 0x0E, 0x04, 0x1F, 0x0E, 0x11, 0x0E, //봉 0x06
0x09, 0x17, 0x15, 0x17, 0x09, 0x06, 0x09, 0x06}; //영 0x07
void lcd_cmd_write(char cmd)
{
PORTG = 0xfa;
PORTD = cmd;
PORTG = PORTG ^ 0x02;
delay_ms(1);
}
void lcd_data_write(char data)
{
PORTG = 0xfb; //1111 1011
PORTD = data;
PORTG = PORTG ^ 0x02;
delay_ms(1);
}
void lcd_String(char flash str[])
{
char flash *pstr = 0;
pstr = str;
while (*pstr) lcd_data_write(*pstr++);
- 510 -