LPC2312
大家好 我在LPC2132里面调试超声波测距模块但是 需要把T1TC 里面的值转化为10进制的在12864上面显示time=T1TC*256;
T1TC= 0;
S=(time*1.87)/100; //算出来是CM
//disbuff=S%1000;
disbuff=S%1000/100;
disbuff=S%1000%100/10;
disbuff=S%1000%10 %10;
set_position(1, 3);
//LCD_Write_number(disbuff);
LCD_Write_number(disbuff);
LCD_Write_number(12);
set_position(1, 4);
LCD_Write_number(disbuff);
LCD_Write_number(disbuff);
这样做有点问题 求大神指点T1TC是要成256吗 记得8位的片子里面都是这样做的 谢谢
页:
[1]