标题: LCD_wdat(t/100+48)加48是什么意思 [打印本页]

作者: 可爱的梦扬    时间: 2015-8-3 10:56
标题: LCD_wdat(t/100+48)加48是什么意思
LCD_wdat(t/100+48)加48是什么意思

作者: 木木de    时间: 2015-8-3 13:32
好像是换行  换到下一行的意思
作者: 腾飞的龙    时间: 2015-8-3 17:27
完全正确
作者: 腾飞的龙    时间: 2015-8-3 17:28
  1. void display(int number,uchar address)
  2. {
  3.         uchar b,c,d,e;
  4.         b= (number / 1000);
  5.         c= (number / 100) % 10;
  6.         d = (number / 10) % 10;
  7.         e = number % 10;

  8.         write_com(0x80 + address);
  9.     write_dat(b + 48);
  10.         write_dat(c + 48);
  11.         write_dat(d + 48);
  12.         write_dat(46);           //小数点的ASCII
  13.         write_dat(e + 48);
  14.         write_dat('C');           //"c"
  15.         write_dat('M');          //"m"
  16.    
  17. }
复制代码

作者: 可爱的梦扬    时间: 2015-8-4 15:43
腾飞的龙 发表于 2015-8-3 17:28

怎么个换行?就如你的代码一样 write_dat(c+48),是写完c然后换行吗,后面就是写完d换行的意思吗。
作者: 腾飞的龙    时间: 2015-8-6 14:16
uestchina 发表于 2015-8-4 19:36
可爱的梦扬:
上面的回答都不对

谢谢指教,学习啦。感谢!




欢迎光临 (http://www.51hei.com/bbs/) Powered by Discuz! X3.1