void dis_num(void) { unsigned char i=0,j=0,k=0; LCD_write_command(0x01);//清除屏幕显示 character[0] = fre/10000000; character[1] = fre/1000000%10; character[2] = fre/100000%10; character[3] = fre/10000%10; character[4] = fre/1000%10; character[5] = fre/100%10; character[6] = fre/10%10; character[7] = fre%10; character[8] = 'H'; character[9] = 'z'; for(i = 0;i<4;i++) //显示“fre=” { LCD_disp_char(i+0,1,character_1); } for(i = 0;i<10;i++) //判断第一个不为0的数 { if(character!=0) break; } k = 8-i; for(j = 0;j<k;j++) //显示所有的数字 { LCD_disp_num(4+j,1,character[i++]); } for(i = 5;i<7;i++) //显示“Hz” { LCD_disp_char(j+4,1,character_1); j++; } }
不知道这个程序是怎么显示字符的?有人可以帮忙解答一下吗?
|