|
main.c- #include <reg52.h>
- #include "intrins.h"
- #include "ADC.h"
- #include "1602.h"
- #define uchar unsigned char
- #define uint unsigned int
- extern float temp;
- uchar ge,shifen;
- //*****************************顯示函數(shù)
- void show()
- {
- DisplayListChar(1,0,"CH0:");
- DisplayOneChar(7,0,(int)Count(0)+0x30); //個位
- DisplayOneChar(8,0,'.');
- DisplayOneChar(9,0,(int)(Count(0)*100)%100/10+0x30); //十分位
- DisplayOneChar(10,0,(int)(Count(0)*100)%100%10+0x30); //百分位
- DisplayOneChar(11,0,'V');
- DisplayListChar(1,1,"CH1:");
- DisplayOneChar(7,1,(int)Count(1)+0x30); //個位
- DisplayOneChar(8,1,'.');
- DisplayOneChar(9,1,(int)(Count(1)*100)%100/10+0x30); //十分位
- DisplayOneChar(10,1,(int)(Count(1)*100)%100%10+0x30); //百分位
- DisplayOneChar(11,1,'V');
- }
- //*******************************主函數(shù)
- void main()
- {
- InitLCM(); //液晶初始化
- Init_ADC(); //AD轉(zhuǎn)換初始化
-
-
- while (1)
- {
- show();
- }
- }
復(fù)制代碼 其余代碼已打包
|
-
-
2.zip
2018-5-24 12:45 上傳
點擊文件名下載附件
下載積分: 黑幣 -5
3.12 KB, 下載次數(shù): 15, 下載積分: 黑幣 -5
|