C8051f020的溫度傳感器程序,關(guān)鍵是m的值,Lcd顯示是亂碼,如果將不清楚的請(qǐng)加qq:737633175
- #include #define SYSCLK 22118400 //外部晶振的振動(dòng)頻率22.1148MHz #define SAMPLERATE0 50000 // ADC0采樣頻率 Hz float temperature; sfr16 TMR3RL = 0x92; sfr16 TMR3 = 0x94; // 定時(shí)器3計(jì)數(shù)器 sfr16 ADC0 = 0xbe; // ADC0數(shù)據(jù) long result; unsigned char j=0; unsigned char m,i; unsigned char table[]={"temperature:"}; unsigned char table1[]={"0123456789"}; void delay(unsigned int t) { unsigned int i,j; for(i=0;i
-
問(wèn)
提問(wèn)者:網(wǎng)友
2018-07-26