<meter id="pryje"><nav id="pryje"><delect id="pryje"></delect></nav></meter>
          <label id="pryje"></label>

          新聞中心

          EEPW首頁 > 嵌入式系統(tǒng) > 設(shè)計(jì)應(yīng)用 > 單片機(jī)使用printf函數(shù)的兩種辦法

          單片機(jī)使用printf函數(shù)的兩種辦法

          作者: 時(shí)間:2016-11-26 來源:網(wǎng)絡(luò) 收藏

          34. IE=0x00; //由于是查詢方式,故需要禁止中斷,CPU不允許中斷,串行不允許中斷

          35.

          36.}

          37.

          38.void delay(unsigned int z)

          39.{

          40. unsigned int x,y;

          41. for(x=z;x>0;x--)

          42. for(y=110;y>0;y--);

          43.}

          44.

          45.void sendbyte(unsigned char c)

          46.{

          47. if(c==)//如果遇到就換行

          48. {

          49. //發(fā)送CR(carriage return)

          50. SBUF=0x0D;

          51. while(!TI);//等待發(fā)送完成

          52. TI=0;

          53.

          54. //發(fā)送 LF(NL line feed,new line)

          55. SBUF=0x0A;

          56. while(!TI);//等待發(fā)送完成

          57. TI=0;

          58. }

          59. else

          60. {

          61. SBUF=c;

          62. while(!TI);//等待發(fā)送完成

          63. TI=0;

          64. }

          65.}

          66.

          67.void sendstring(unsigned char *string)//此處*string相當(dāng)于數(shù)組

          68.{

          69. while(*string!=看屁屁www成人影院,亚洲人妻成人图片,亚洲精品成人午夜在线,日韩在线 欧美成人 (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })();