- void display(int number,uchar address)
- {
- uchar b,c,d,e;
- b= (number / 1000);
- c= (number / 100) % 10;
- d = (number / 10) % 10;
- e = number % 10;
- write_com(0x80 + address);
- write_dat(b + 48);
- write_dat(c + 48);
- write_dat(d + 48);
- write_dat(46); //小數(shù)點的ASCII
- write_dat(e + 48);
- write_dat('C'); //"c"
- write_dat('M'); //"m"
-
- }
復制代碼 |