完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
|
|
相关推荐
8个回答
|
|
#include
#define uint unsigned int #define uchar unsigned char //宏定义 #define SET P3_1 //定义调整键 #define DEC P3_2 //定义减少键 #define ADD P3_3 //定义增加键 #define BEEP P3_6 //定义蜂鸣器 #define LED_H P1_6 //定义灯光报警 #define LED_L P1_7 //定义灯光报警 #define DQ P3_7 //定义DS18B20总线I/O bit shanshuo_st; //闪烁间隔标志 bit beep_st; //蜂鸣器间隔标志 bit H_ZF=0,L_ZF=0; signed char shangxian=35; //上限报警温度 signed char xiaxian=15; //下限报警温度 bit fuhao=0; uint wendu=0; uchar x=0; uchar qian=0,bai=0,shi=0,ge=0; ***it DIAN = P0^5; //小数点 uchar set_st=0; //状态标志 //uchar code LEDData[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff}; uchar code LEDData[]={0x5F,0x44,0x9D,0xDd,0xC6,0xD3,0xDB,0x47,0xDF,0xD7,0xCF,0xDA,0x9B,0xDC,0x9B,0x8B}; //============================================================================================ //====================================DS18B20================================================= //============================================================================================ /*****延时子程序*****/ void Delay_DS18B20(int num) { while(num--) ; } /*****初始化DS18B20*****/ void Init_DS18B20(void) { unsigned char x=0; DQ = 0; //DQ复位 Delay_DS18B20(8); //稍做延时 DQ = 1; //单片机将DQ拉低 Delay_DS18B20(80); //精确延时,大于480us DQ = 0; //拉高总线 Delay_DS18B20(34); } /*****读一个字节*****/ unsigned char ReadOneChar(void) { unsigned char i=0; unsigned char dat = 0; for (i=8;i>0;i--) { DQ = 0; // 给脉冲信号 dat>>=1; DQ = 1; // 给脉冲信号 if(DQ) dat|=0x80; Delay_DS18B20(4); } return(dat); } /*****写一个字节*****/ void WriteOneChar(unsigned char dat) { unsigned char i=0; for (i=8; i>0; i--) { DQ = 1; DQ = dat&&0x01; Delay_DS18B20(5); DQ = 0; dat>>=1; } } /*****读取温度*****/ unsigned int ReadTemperature(void) { unsigned char a=0; unsigned char b=0; unsigned int t=0; float tt=0; Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0x47); //启动温度转换 Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0xBF); //读取温度寄存器 a=ReadOneChar(); //读低8位 b=ReadOneChar(); //读高8位 t=b; t<<=8; t=t|a; if(t&&0xf800) { t=~t+1; fuhao=1; } else fuhao=0; tt=t*0.00625; t= tt*10+0.5; //放大10倍输出并四舍五入 return(t); } //===================================================================================== //===================================================================================== //===================================================================================== /*****延时子程序*****/ void Delay(uint num) { while( --num ); } /*****初始化定时器0*****/ void InitTimer(void) { TMOD=0x10; TL0=0x3c; TH0=0xb0; //50ms(晶振12M) EA=1; //全局中断开关 TR0=1; ET0=1; //开启定时器0 IT0=1; IT1=1; } /*****显示开机初始化等待画面*****/ void Disp_init(void) { P0 = 0x80; //显示---- P2 = 0xBF; Delay(200); P2 = 0xEF; Delay(200); P2 = 0xFB; Delay(200); P2 = 0xFE; Delay(200); P2 = 0xFF; //关闭显示 } /*****显示温度子程序*****/ void Disp_Temperature(void) //显示温度 { qian=wendu/1000; bai=wendu%1000/100; shi=wendu%1000/100/10; ge=wendu%1000%100/10; P0 = LEDData[ge]; // P2 = 0xBF; Delay(200); P2=0xff; P0=LEDData[shi]; //显示个位 P2 = 0xEF; DIAN = 0; //显示小数点 Delay(200); P2=0xff; if((qian+bai)!=0) P0 =LEDData[bai]; //显示bai位 else P0=0xff; P2 = 0xFB; Delay(200); P2=0xff; if(qian!=0&&fuhao==0) P0 =LEDData[qian]; //显示qian位 else if(qian==0&&fuhao==0) P0=0xff; else if(fuhao==1) P0=0x80; P2 = 0xFE; Delay(200); P2 = 0xff; //关闭显示 } /*****显示报警温度子程序*****/ void Disp_alarm(uchar baojing) { P0 =LEDData[baojing%10]; // P2 = 0xBF; Delay(100); P2=0xff; P0 =LEDData[baojing%100/10]; //显示十位 P2 = 0xEF; Delay(100); P2=0xff; if(set_st==1&&H_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==1&&H_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==1&&H_ZF==1) P0=0x80; else if(set_st==2&&L_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==2&&L_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==2&&L_ZF==1) P0=0x80; P2 = 0xFB; Delay(100); P2=0xff; if(set_st==1)P0 =~0xCE; else if(set_st==2)P0 =0x1A; //上限H、下限L标示 P2 = 0xFE; Delay(100); P2 = 0xff; //关闭显示 } /*****报警子程序*****/ void Alarm() { if(x>=10){beep_st=~beep_st;x=0;} if((fuhao==0&&H_ZF==0&&wendu>shangxian)||(fuhao==1&&H_ZF==1&&wendu if(beep_st==1) { LED_H=0; BEEP=0; } else { LED_H=1; BEEP=1; } } else if((fuhao==0&&L_ZF==0&&wendu { if(beep_st==1) { LED_L=0; BEEP=0; } else { LED_L=1; BEEP=1; } } else { LED_H=1; LED_L=1; BEEP=1; } } /*****主函数*****/ void main(void) { uint z; // uchar s; InitTimer(); //初始化定时器 wendu=ReadTemperature()-5; //获取温度值并减去DS18B20的温漂误差 for(z=0;z<300;z++) { Disp_init(); } while(1) { if(SET==0) { BEEP=1; Delay(200); BEEP=0; do{}while(SET==0); LED_H=1; LED_L=1; BEEP=1; set_st++;x=0;shanshuo_st=1; if(set_st>2)set_st=0; } if(set_st==0) { EX0=0; //关闭外部中断0 EX1=0; //关闭外部中断1 wendu=ReadTemperature(); //获取温度值并减去DS18B20的温漂误差 // for(s=0;s<10;s++) Disp_Temperature(); Alarm(); //报警检测 } else if(set_st==1) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(shangxian);} } else if(set_st==2) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(xiaxian);} } } } /*****定时器0中断服务程序*****/ void timer0(void) interrupt 1 { TL0=0x3c; TH0=0xb0; x++; } /*****外部中断0服务程序*****/ void int0(void) interrupt 0 { EX0=0; //关外部中断0 if(DEC==0&&set_st==1) { BEEP=1; Delay(2000); BEEP=0; do { Disp_alarm(shangxian); } while(DEC==0); if(H_ZF==0&&L_ZF==0) { shangxian--; if(shangxian<=xiaxian+1) shangxian=xiaxian+1; } else if(H_ZF==0&&L_ZF==1) { shangxian--; if(shangxian<0&&xiaxian==1) { shangxian=0; H_ZF=0; } else if(shangxian<0&&xiaxian>1) { shangxian=1; H_ZF=1; } } else if(H_ZF==1) { shangxian++; if(shangxian>=xiaxian-1) shangxian=xiaxian-1; } } else if(DEC==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(DEC==0); if(L_ZF==0) { xiaxian--; if(xiaxian<0) { xiaxian=1; L_ZF=1; } } else if(L_ZF==1) { xiaxian++; if(xiaxian>=55) { xiaxian=55; } } } } /*****外部中断1服务程序*****/ void int1(void) interrupt 2 { EX1=0; //关外部中断1 if(ADD==0&&set_st==1) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(shangxian); } while(ADD==0); if(H_ZF==0) { shangxian++; if(shangxian>=125)shangxian=125; } else if(H_ZF==1) { shangxian--; if(shangxian<=0) { shangxian=0; H_ZF=0; } } } else if(ADD==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(ADD==0); if(L_ZF==0) { xiaxian++; if(xiaxian>=shangxian-1) xiaxian=shangxian-1; } else if(H_ZF==0&&L_ZF==1) { xiaxian--; if(xiaxian<=0) { if(shangxian==0) { xiaxian=1; L_ZF=1; } else { xiaxian=0; L_ZF=0; } } } else if(H_ZF==1&&L_ZF==1) { xiaxian--; if(xiaxian<=shangxian+1) xiaxian=shangxian+1; } } } |
|
|
|
仿真如图
|
|
|
|
#include
#define uint unsigned int #define uchar unsigned char //宏定义 #define SET P3_1 //定义调整键 #define DEC P3_2 //定义减少键 #define ADD P3_3 //定义增加键 #define BEEP P3_6 //定义蜂鸣器 #define LED_H P1_6 //定义灯光报警 #define LED_L P1_7 //定义灯光报警 #define DQ P3_7 //定义DS18B20总线I/O bit shanshuo_st; //闪烁间隔标志 bit beep_st; //蜂鸣器间隔标志 bit H_ZF=0,L_ZF=0; signed char shangxian=35; //上限报警温度 signed char xiaxian=15; //下限报警温度 bit fuhao=0; uint wendu=0; uchar x=0; uchar qian=0,bai=0,shi=0,ge=0; ***it DIAN = P0^5; //小数点 uchar set_st=0; //状态标志 //uchar code LEDData[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff}; uchar code LEDData[]={0x5F,0x44,0x9D,0xDd,0xC6,0xD3,0xDB,0x47,0xDF,0xD7,0xCF,0xDA,0x9B,0xDC,0x9B,0x8B}; //============================================================================================ //====================================DS18B20================================================= //============================================================================================ /*****延时子程序*****/ void Delay_DS18B20(int num) { while(num--) ; } /*****初始化DS18B20*****/ void Init_DS18B20(void) { unsigned char x=0; DQ = 0; //DQ复位 Delay_DS18B20(8); //稍做延时 DQ = 1; //单片机将DQ拉低 Delay_DS18B20(80); //精确延时,大于480us DQ = 0; //拉高总线 Delay_DS18B20(34); } /*****读一个字节*****/ unsigned char ReadOneChar(void) { unsigned char i=0; unsigned char dat = 0; for (i=8;i>0;i--) { DQ = 0; // 给脉冲信号 dat>>=1; DQ = 1; // 给脉冲信号 if(DQ) dat|=0x80; Delay_DS18B20(4); } return(dat); } /*****写一个字节*****/ void WriteOneChar(unsigned char dat) { unsigned char i=0; for (i=8; i>0; i--) { DQ = 1; DQ = dat&&0x01; Delay_DS18B20(5); DQ = 0; dat>>=1; } } /*****读取温度*****/ unsigned int ReadTemperature(void) { unsigned char a=0; unsigned char b=0; unsigned int t=0; float tt=0; Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0x47); //启动温度转换 Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0xBF); //读取温度寄存器 a=ReadOneChar(); //读低8位 b=ReadOneChar(); //读高8位 t=b; t<<=8; t=t|a; if(t&&0xf800) { t=~t+1; fuhao=1; } else fuhao=0; tt=t*0.00625; t= tt*10+0.5; //放大10倍输出并四舍五入 return(t); } //===================================================================================== //===================================================================================== //===================================================================================== /*****延时子程序*****/ void Delay(uint num) { while( --num ); } /*****初始化定时器0*****/ void InitTimer(void) { TMOD=0x10; TL0=0x3c; TH0=0xb0; //50ms(晶振12M) EA=1; //全局中断开关 TR0=1; ET0=1; //开启定时器0 IT0=1; IT1=1; } /*****显示开机初始化等待画面*****/ void Disp_init(void) { P0 = 0x80; //显示---- P2 = 0xBF; Delay(200); P2 = 0xEF; Delay(200); P2 = 0xFB; Delay(200); P2 = 0xFE; Delay(200); P2 = 0xFF; //关闭显示 } /*****显示温度子程序*****/ void Disp_Temperature(void) //显示温度 { qian=wendu/1000; bai=wendu%1000/100; shi=wendu%1000/100/10; ge=wendu%1000%100/10; P0 = LEDData[ge]; // P2 = 0xBF; Delay(200); P2=0xff; P0=LEDData[shi]; //显示个位 P2 = 0xEF; DIAN = 0; //显示小数点 Delay(200); P2=0xff; if((qian+bai)!=0) P0 =LEDData[bai]; //显示bai位 else P0=0xff; P2 = 0xFB; Delay(200); P2=0xff; if(qian!=0&&fuhao==0) P0 =LEDData[qian]; //显示qian位 else if(qian==0&&fuhao==0) P0=0xff; else if(fuhao==1) P0=0x80; P2 = 0xFE; Delay(200); P2 = 0xff; //关闭显示 } /*****显示报警温度子程序*****/ void Disp_alarm(uchar baojing) { P0 =LEDData[baojing%10]; // P2 = 0xBF; Delay(100); P2=0xff; P0 =LEDData[baojing%100/10]; //显示十位 P2 = 0xEF; Delay(100); P2=0xff; if(set_st==1&&H_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==1&&H_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==1&&H_ZF==1) P0=0x80; else if(set_st==2&&L_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==2&&L_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==2&&L_ZF==1) P0=0x80; P2 = 0xFB; Delay(100); P2=0xff; if(set_st==1)P0 =~0xCE; else if(set_st==2)P0 =0x1A; //上限H、下限L标示 P2 = 0xFE; Delay(100); P2 = 0xff; //关闭显示 } /*****报警子程序*****/ void Alarm() { if(x>=10){beep_st=~beep_st;x=0;} if((fuhao==0&&H_ZF==0&&wendu>shangxian)||(fuhao==1&&H_ZF==1&&wendu if(beep_st==1) { LED_H=0; BEEP=0; } else { LED_H=1; BEEP=1; } } else if((fuhao==0&&L_ZF==0&&wendu { if(beep_st==1) { LED_L=0; BEEP=0; } else { LED_L=1; BEEP=1; } } else { LED_H=1; LED_L=1; BEEP=1; } } /*****主函数*****/ void main(void) { uint z; // uchar s; InitTimer(); //初始化定时器 wendu=ReadTemperature()-5; //获取温度值并减去DS18B20的温漂误差 for(z=0;z<300;z++) { Disp_init(); } while(1) { if(SET==0) { BEEP=1; Delay(200); BEEP=0; do{}while(SET==0); LED_H=1; LED_L=1; BEEP=1; set_st++;x=0;shanshuo_st=1; if(set_st>2)set_st=0; } if(set_st==0) { EX0=0; //关闭外部中断0 EX1=0; //关闭外部中断1 wendu=ReadTemperature(); //获取温度值并减去DS18B20的温漂误差 // for(s=0;s<10;s++) Disp_Temperature(); Alarm(); //报警检测 } else if(set_st==1) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(shangxian);} } else if(set_st==2) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(xiaxian);} } } } /*****定时器0中断服务程序*****/ void timer0(void) interrupt 1 { TL0=0x3c; TH0=0xb0; x++; } /*****外部中断0服务程序*****/ void int0(void) interrupt 0 { EX0=0; //关外部中断0 if(DEC==0&&set_st==1) { BEEP=1; Delay(2000); BEEP=0; do { Disp_alarm(shangxian); } while(DEC==0); if(H_ZF==0&&L_ZF==0) { shangxian--; if(shangxian<=xiaxian+1) shangxian=xiaxian+1; } else if(H_ZF==0&&L_ZF==1) { shangxian--; if(shangxian<0&&xiaxian==1) { shangxian=0; H_ZF=0; } else if(shangxian<0&&xiaxian>1) { shangxian=1; H_ZF=1; } } else if(H_ZF==1) { shangxian++; if(shangxian>=xiaxian-1) shangxian=xiaxian-1; } } else if(DEC==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(DEC==0); if(L_ZF==0) { xiaxian--; if(xiaxian<0) { xiaxian=1; L_ZF=1; } } else if(L_ZF==1) { xiaxian++; if(xiaxian>=55) { xiaxian=55; } } } } /*****外部中断1服务程序*****/ void int1(void) interrupt 2 { EX1=0; //关外部中断1 if(ADD==0&&set_st==1) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(shangxian); } while(ADD==0); if(H_ZF==0) { shangxian++; if(shangxian>=125)shangxian=125; } else if(H_ZF==1) { shangxian--; if(shangxian<=0) { shangxian=0; H_ZF=0; } } } else if(ADD==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(ADD==0); if(L_ZF==0) { xiaxian++; if(xiaxian>=shangxian-1) xiaxian=shangxian-1; } else if(H_ZF==0&&L_ZF==1) { xiaxian--; if(xiaxian<=0) { if(shangxian==0) { xiaxian=1; L_ZF=1; } else { xiaxian=0; L_ZF=0; } } } else if(H_ZF==1&&L_ZF==1) { xiaxian--; if(xiaxian<=shangxian+1) xiaxian=shangxian+1; } } } |
|
|
|
#include
#define uint unsigned int #define uchar unsigned char //宏定义 #define SET P3_1 //定义调整键 #define DEC P3_2 //定义减少键 #define ADD P3_3 //定义增加键 #define BEEP P3_6 //定义蜂鸣器 #define LED_H P1_6 //定义灯光报警 #define LED_L P1_7 //定义灯光报警 #define DQ P3_7 //定义DS18B20总线I/O bit shanshuo_st; //闪烁间隔标志 bit beep_st; //蜂鸣器间隔标志 bit H_ZF=0,L_ZF=0; signed char shangxian=35; //上限报警温度 signed char xiaxian=15; //下限报警温度 bit fuhao=0; uint wendu=0; uchar x=0; uchar qian=0,bai=0,shi=0,ge=0; ***it DIAN = P0^5; //小数点 uchar set_st=0; //状态标志 //uchar code LEDData[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff}; uchar code LEDData[]={0x5F,0x44,0x9D,0xDd,0xC6,0xD3,0xDB,0x47,0xDF,0xD7,0xCF,0xDA,0x9B,0xDC,0x9B,0x8B}; //============================================================================================ //====================================DS18B20================================================= //============================================================================================ /*****延时子程序*****/ void Delay_DS18B20(int num) { while(num--) ; } /*****初始化DS18B20*****/ void Init_DS18B20(void) { unsigned char x=0; DQ = 0; //DQ复位 Delay_DS18B20(8); //稍做延时 DQ = 1; //单片机将DQ拉低 Delay_DS18B20(80); //精确延时,大于480us DQ = 0; //拉高总线 Delay_DS18B20(34); } /*****读一个字节*****/ unsigned char ReadOneChar(void) { unsigned char i=0; unsigned char dat = 0; for (i=8;i>0;i--) { DQ = 0; // 给脉冲信号 dat>>=1; DQ = 1; // 给脉冲信号 if(DQ) dat|=0x80; Delay_DS18B20(4); } return(dat); } /*****写一个字节*****/ void WriteOneChar(unsigned char dat) { unsigned char i=0; for (i=8; i>0; i--) { DQ = 1; DQ = dat&&0x01; Delay_DS18B20(5); DQ = 0; dat>>=1; } } /*****读取温度*****/ unsigned int ReadTemperature(void) { unsigned char a=0; unsigned char b=0; unsigned int t=0; float tt=0; Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0x47); //启动温度转换 Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0xBF); //读取温度寄存器 a=ReadOneChar(); //读低8位 b=ReadOneChar(); //读高8位 t=b; t<<=8; t=t|a; if(t&&0xf800) { t=~t+1; fuhao=1; } else fuhao=0; tt=t*0.00625; t= tt*10+0.5; //放大10倍输出并四舍五入 return(t); } //===================================================================================== //===================================================================================== //===================================================================================== /*****延时子程序*****/ void Delay(uint num) { while( --num ); } /*****初始化定时器0*****/ void InitTimer(void) { TMOD=0x10; TL0=0x3c; TH0=0xb0; //50ms(晶振12M) EA=1; //全局中断开关 TR0=1; ET0=1; //开启定时器0 IT0=1; IT1=1; } /*****显示开机初始化等待画面*****/ void Disp_init(void) { P0 = 0x80; //显示---- P2 = 0xBF; Delay(200); P2 = 0xEF; Delay(200); P2 = 0xFB; Delay(200); P2 = 0xFE; Delay(200); P2 = 0xFF; //关闭显示 } /*****显示温度子程序*****/ void Disp_Temperature(void) //显示温度 { qian=wendu/1000; bai=wendu%1000/100; shi=wendu%1000/100/10; ge=wendu%1000%100/10; P0 = LEDData[ge]; // P2 = 0xBF; Delay(200); P2=0xff; P0=LEDData[shi]; //显示个位 P2 = 0xEF; DIAN = 0; //显示小数点 Delay(200); P2=0xff; if((qian+bai)!=0) P0 =LEDData[bai]; //显示bai位 else P0=0xff; P2 = 0xFB; Delay(200); P2=0xff; if(qian!=0&&fuhao==0) P0 =LEDData[qian]; //显示qian位 else if(qian==0&&fuhao==0) P0=0xff; else if(fuhao==1) P0=0x80; P2 = 0xFE; Delay(200); P2 = 0xff; //关闭显示 } /*****显示报警温度子程序*****/ void Disp_alarm(uchar baojing) { P0 =LEDData[baojing%10]; // P2 = 0xBF; Delay(100); P2=0xff; P0 =LEDData[baojing%100/10]; //显示十位 P2 = 0xEF; Delay(100); P2=0xff; if(set_st==1&&H_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==1&&H_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==1&&H_ZF==1) P0=0x80; else if(set_st==2&&L_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==2&&L_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==2&&L_ZF==1) P0=0x80; P2 = 0xFB; Delay(100); P2=0xff; if(set_st==1)P0 =~0xCE; else if(set_st==2)P0 =0x1A; //上限H、下限L标示 P2 = 0xFE; Delay(100); P2 = 0xff; //关闭显示 } /*****报警子程序*****/ void Alarm() { if(x>=10){beep_st=~beep_st;x=0;} if((fuhao==0&&H_ZF==0&&wendu>shangxian)||(fuhao==1&&H_ZF==1&&wendu if(beep_st==1) { LED_H=0; BEEP=0; } else { LED_H=1; BEEP=1; } } else if((fuhao==0&&L_ZF==0&&wendu { if(beep_st==1) { LED_L=0; BEEP=0; } else { LED_L=1; BEEP=1; } } else { LED_H=1; LED_L=1; BEEP=1; } } /*****主函数*****/ void main(void) { uint z; // uchar s; InitTimer(); //初始化定时器 wendu=ReadTemperature()-5; //获取温度值并减去DS18B20的温漂误差 for(z=0;z<300;z++) { Disp_init(); } while(1) { if(SET==0) { BEEP=1; Delay(200); BEEP=0; do{}while(SET==0); LED_H=1; LED_L=1; BEEP=1; set_st++;x=0;shanshuo_st=1; if(set_st>2)set_st=0; } if(set_st==0) { EX0=0; //关闭外部中断0 EX1=0; //关闭外部中断1 wendu=ReadTemperature(); //获取温度值并减去DS18B20的温漂误差 // for(s=0;s<10;s++) Disp_Temperature(); Alarm(); //报警检测 } else if(set_st==1) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(shangxian);} } else if(set_st==2) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(xiaxian);} } } } /*****定时器0中断服务程序*****/ void timer0(void) interrupt 1 { TL0=0x3c; TH0=0xb0; x++; } /*****外部中断0服务程序*****/ void int0(void) interrupt 0 { EX0=0; //关外部中断0 if(DEC==0&&set_st==1) { BEEP=1; Delay(2000); BEEP=0; do { Disp_alarm(shangxian); } while(DEC==0); if(H_ZF==0&&L_ZF==0) { shangxian--; if(shangxian<=xiaxian+1) shangxian=xiaxian+1; } else if(H_ZF==0&&L_ZF==1) { shangxian--; if(shangxian<0&&xiaxian==1) { shangxian=0; H_ZF=0; } else if(shangxian<0&&xiaxian>1) { shangxian=1; H_ZF=1; } } else if(H_ZF==1) { shangxian++; if(shangxian>=xiaxian-1) shangxian=xiaxian-1; } } else if(DEC==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(DEC==0); if(L_ZF==0) { xiaxian--; if(xiaxian<0) { xiaxian=1; L_ZF=1; } } else if(L_ZF==1) { xiaxian++; if(xiaxian>=55) { xiaxian=55; } } } } /*****外部中断1服务程序*****/ void int1(void) interrupt 2 { EX1=0; //关外部中断1 if(ADD==0&&set_st==1) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(shangxian); } while(ADD==0); if(H_ZF==0) { shangxian++; if(shangxian>=125)shangxian=125; } else if(H_ZF==1) { shangxian--; if(shangxian<=0) { shangxian=0; H_ZF=0; } } } else if(ADD==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(ADD==0); if(L_ZF==0) { xiaxian++; if(xiaxian>=shangxian-1) xiaxian=shangxian-1; } else if(H_ZF==0&&L_ZF==1) { xiaxian--; if(xiaxian<=0) { if(shangxian==0) { xiaxian=1; L_ZF=1; } else { xiaxian=0; L_ZF=0; } } } else if(H_ZF==1&&L_ZF==1) { xiaxian--; if(xiaxian<=shangxian+1) xiaxian=shangxian+1; } } } |
|
|
|
#include
#define uint unsigned int #define uchar unsigned char //宏定义 #define SET P3_1 //定义调整键 #define DEC P3_2 //定义减少键 #define ADD P3_3 //定义增加键 #define BEEP P3_6 //定义蜂鸣器 #define LED_H P1_6 //定义灯光报警 #define LED_L P1_7 //定义灯光报警 #define DQ P3_7 //定义DS18B20总线I/O bit shanshuo_st; //闪烁间隔标志 bit beep_st; //蜂鸣器间隔标志 bit H_ZF=0,L_ZF=0; signed char shangxian=35; //上限报警温度 signed char xiaxian=15; //下限报警温度 bit fuhao=0; uint wendu=0; uchar x=0; uchar qian=0,bai=0,shi=0,ge=0; ***it DIAN = P0^5; //小数点 uchar set_st=0; //状态标志 //uchar code LEDData[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff}; uchar code LEDData[]={0x5F,0x44,0x9D,0xDd,0xC6,0xD3,0xDB,0x47,0xDF,0xD7,0xCF,0xDA,0x9B,0xDC,0x9B,0x8B}; //============================================================================================ //====================================DS18B20================================================= //============================================================================================ /*****延时子程序*****/ void Delay_DS18B20(int num) { while(num--) ; } /*****初始化DS18B20*****/ void Init_DS18B20(void) { unsigned char x=0; DQ = 0; //DQ复位 Delay_DS18B20(8); //稍做延时 DQ = 1; //单片机将DQ拉低 Delay_DS18B20(80); //精确延时,大于480us DQ = 0; //拉高总线 Delay_DS18B20(34); } /*****读一个字节*****/ unsigned char ReadOneChar(void) { unsigned char i=0; unsigned char dat = 0; for (i=8;i>0;i--) { DQ = 0; // 给脉冲信号 dat>>=1; DQ = 1; // 给脉冲信号 if(DQ) dat|=0x80; Delay_DS18B20(4); } return(dat); } /*****写一个字节*****/ void WriteOneChar(unsigned char dat) { unsigned char i=0; for (i=8; i>0; i--) { DQ = 1; DQ = dat&&0x01; Delay_DS18B20(5); DQ = 0; dat>>=1; } } /*****读取温度*****/ unsigned int ReadTemperature(void) { unsigned char a=0; unsigned char b=0; unsigned int t=0; float tt=0; Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0x47); //启动温度转换 Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0xBF); //读取温度寄存器 a=ReadOneChar(); //读低8位 b=ReadOneChar(); //读高8位 t=b; t<<=8; t=t|a; if(t&&0xf800) { t=~t+1; fuhao=1; } else fuhao=0; tt=t*0.00625; t= tt*10+0.5; //放大10倍输出并四舍五入 return(t); } //===================================================================================== //===================================================================================== //===================================================================================== /*****延时子程序*****/ void Delay(uint num) { while( --num ); } /*****初始化定时器0*****/ void InitTimer(void) { TMOD=0x10; TL0=0x3c; TH0=0xb0; //50ms(晶振12M) EA=1; //全局中断开关 TR0=1; ET0=1; //开启定时器0 IT0=1; IT1=1; } /*****显示开机初始化等待画面*****/ void Disp_init(void) { P0 = 0x80; //显示---- P2 = 0xBF; Delay(200); P2 = 0xEF; Delay(200); P2 = 0xFB; Delay(200); P2 = 0xFE; Delay(200); P2 = 0xFF; //关闭显示 } /*****显示温度子程序*****/ void Disp_Temperature(void) //显示温度 { qian=wendu/1000; bai=wendu%1000/100; shi=wendu%1000/100/10; ge=wendu%1000%100/10; P0 = LEDData[ge]; // P2 = 0xBF; Delay(200); P2=0xff; P0=LEDData[shi]; //显示个位 P2 = 0xEF; DIAN = 0; //显示小数点 Delay(200); P2=0xff; if((qian+bai)!=0) P0 =LEDData[bai]; //显示bai位 else P0=0xff; P2 = 0xFB; Delay(200); P2=0xff; if(qian!=0&&fuhao==0) P0 =LEDData[qian]; //显示qian位 else if(qian==0&&fuhao==0) P0=0xff; else if(fuhao==1) P0=0x80; P2 = 0xFE; Delay(200); P2 = 0xff; //关闭显示 } /*****显示报警温度子程序*****/ void Disp_alarm(uchar baojing) { P0 =LEDData[baojing%10]; // P2 = 0xBF; Delay(100); P2=0xff; P0 =LEDData[baojing%100/10]; //显示十位 P2 = 0xEF; Delay(100); P2=0xff; if(set_st==1&&H_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==1&&H_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==1&&H_ZF==1) P0=0x80; else if(set_st==2&&L_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==2&&L_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==2&&L_ZF==1) P0=0x80; P2 = 0xFB; Delay(100); P2=0xff; if(set_st==1)P0 =~0xCE; else if(set_st==2)P0 =0x1A; //上限H、下限L标示 P2 = 0xFE; Delay(100); P2 = 0xff; //关闭显示 } /*****报警子程序*****/ void Alarm() { if(x>=10){beep_st=~beep_st;x=0;} if((fuhao==0&&H_ZF==0&&wendu>shangxian)||(fuhao==1&&H_ZF==1&&wendu if(beep_st==1) { LED_H=0; BEEP=0; } else { LED_H=1; BEEP=1; } } else if((fuhao==0&&L_ZF==0&&wendu { if(beep_st==1) { LED_L=0; BEEP=0; } else { LED_L=1; BEEP=1; } } else { LED_H=1; LED_L=1; BEEP=1; } } /*****主函数*****/ void main(void) { uint z; // uchar s; InitTimer(); //初始化定时器 wendu=ReadTemperature()-5; //获取温度值并减去DS18B20的温漂误差 for(z=0;z<300;z++) { Disp_init(); } while(1) { if(SET==0) { BEEP=1; Delay(200); BEEP=0; do{}while(SET==0); LED_H=1; LED_L=1; BEEP=1; set_st++;x=0;shanshuo_st=1; if(set_st>2)set_st=0; } if(set_st==0) { EX0=0; //关闭外部中断0 EX1=0; //关闭外部中断1 wendu=ReadTemperature(); //获取温度值并减去DS18B20的温漂误差 // for(s=0;s<10;s++) Disp_Temperature(); Alarm(); //报警检测 } else if(set_st==1) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(shangxian);} } else if(set_st==2) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(xiaxian);} } } } /*****定时器0中断服务程序*****/ void timer0(void) interrupt 1 { TL0=0x3c; TH0=0xb0; x++; } /*****外部中断0服务程序*****/ void int0(void) interrupt 0 { EX0=0; //关外部中断0 if(DEC==0&&set_st==1) { BEEP=1; Delay(2000); BEEP=0; do { Disp_alarm(shangxian); } while(DEC==0); if(H_ZF==0&&L_ZF==0) { shangxian--; if(shangxian<=xiaxian+1) shangxian=xiaxian+1; } else if(H_ZF==0&&L_ZF==1) { shangxian--; if(shangxian<0&&xiaxian==1) { shangxian=0; H_ZF=0; } else if(shangxian<0&&xiaxian>1) { shangxian=1; H_ZF=1; } } else if(H_ZF==1) { shangxian++; if(shangxian>=xiaxian-1) shangxian=xiaxian-1; } } else if(DEC==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(DEC==0); if(L_ZF==0) { xiaxian--; if(xiaxian<0) { xiaxian=1; L_ZF=1; } } else if(L_ZF==1) { xiaxian++; if(xiaxian>=55) { xiaxian=55; } } } } /*****外部中断1服务程序*****/ void int1(void) interrupt 2 { EX1=0; //关外部中断1 if(ADD==0&&set_st==1) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(shangxian); } while(ADD==0); if(H_ZF==0) { shangxian++; if(shangxian>=125)shangxian=125; } else if(H_ZF==1) { shangxian--; if(shangxian<=0) { shangxian=0; H_ZF=0; } } } else if(ADD==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(ADD==0); if(L_ZF==0) { xiaxian++; if(xiaxian>=shangxian-1) xiaxian=shangxian-1; } else if(H_ZF==0&&L_ZF==1) { xiaxian--; if(xiaxian<=0) { if(shangxian==0) { xiaxian=1; L_ZF=1; } else { xiaxian=0; L_ZF=0; } } } else if(H_ZF==1&&L_ZF==1) { xiaxian--; if(xiaxian<=shangxian+1) xiaxian=shangxian+1; } } } |
|
|
|
#include
#define uint unsigned int #define uchar unsigned char //宏定义 #define SET P3_1 //定义调整键 #define DEC P3_2 //定义减少键 #define ADD P3_3 //定义增加键 #define BEEP P3_6 //定义蜂鸣器 #define LED_H P1_6 //定义灯光报警 #define LED_L P1_7 //定义灯光报警 #define DQ P3_7 //定义DS18B20总线I/O bit shanshuo_st; //闪烁间隔标志 bit beep_st; //蜂鸣器间隔标志 bit H_ZF=0,L_ZF=0; signed char shangxian=35; //上限报警温度 signed char xiaxian=15; //下限报警温度 bit fuhao=0; uint wendu=0; uchar x=0; uchar qian=0,bai=0,shi=0,ge=0; ***it DIAN = P0^5; //小数点 uchar set_st=0; //状态标志 //uchar code LEDData[]={0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff}; uchar code LEDData[]={0x5F,0x44,0x9D,0xDd,0xC6,0xD3,0xDB,0x47,0xDF,0xD7,0xCF,0xDA,0x9B,0xDC,0x9B,0x8B}; //============================================================================================ //====================================DS18B20================================================= //============================================================================================ /*****延时子程序*****/ void Delay_DS18B20(int num) { while(num--) ; } /*****初始化DS18B20*****/ void Init_DS18B20(void) { unsigned char x=0; DQ = 0; //DQ复位 Delay_DS18B20(8); //稍做延时 DQ = 1; //单片机将DQ拉低 Delay_DS18B20(80); //精确延时,大于480us DQ = 0; //拉高总线 Delay_DS18B20(34); } /*****读一个字节*****/ unsigned char ReadOneChar(void) { unsigned char i=0; unsigned char dat = 0; for (i=8;i>0;i--) { DQ = 0; // 给脉冲信号 dat>>=1; DQ = 1; // 给脉冲信号 if(DQ) dat|=0x80; Delay_DS18B20(4); } return(dat); } /*****写一个字节*****/ void WriteOneChar(unsigned char dat) { unsigned char i=0; for (i=8; i>0; i--) { DQ = 1; DQ = dat&&0x01; Delay_DS18B20(5); DQ = 0; dat>>=1; } } /*****读取温度*****/ unsigned int ReadTemperature(void) { unsigned char a=0; unsigned char b=0; unsigned int t=0; float tt=0; Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0x47); //启动温度转换 Init_DS18B20(); WriteOneChar(0xCC); //跳过读序号列号的操作 WriteOneChar(0xBF); //读取温度寄存器 a=ReadOneChar(); //读低8位 b=ReadOneChar(); //读高8位 t=b; t<<=8; t=t|a; if(t&&0xf800) { t=~t+1; fuhao=1; } else fuhao=0; tt=t*0.00625; t= tt*10+0.5; //放大10倍输出并四舍五入 return(t); } //===================================================================================== //===================================================================================== //===================================================================================== /*****延时子程序*****/ void Delay(uint num) { while( --num ); } /*****初始化定时器0*****/ void InitTimer(void) { TMOD=0x10; TL0=0x3c; TH0=0xb0; //50ms(晶振12M) EA=1; //全局中断开关 TR0=1; ET0=1; //开启定时器0 IT0=1; IT1=1; } /*****显示开机初始化等待画面*****/ void Disp_init(void) { P0 = 0x80; //显示---- P2 = 0xBF; Delay(200); P2 = 0xEF; Delay(200); P2 = 0xFB; Delay(200); P2 = 0xFE; Delay(200); P2 = 0xFF; //关闭显示 } /*****显示温度子程序*****/ void Disp_Temperature(void) //显示温度 { qian=wendu/1000; bai=wendu%1000/100; shi=wendu%1000/100/10; ge=wendu%1000%100/10; P0 = LEDData[ge]; // P2 = 0xBF; Delay(200); P2=0xff; P0=LEDData[shi]; //显示个位 P2 = 0xEF; DIAN = 0; //显示小数点 Delay(200); P2=0xff; if((qian+bai)!=0) P0 =LEDData[bai]; //显示bai位 else P0=0xff; P2 = 0xFB; Delay(200); P2=0xff; if(qian!=0&&fuhao==0) P0 =LEDData[qian]; //显示qian位 else if(qian==0&&fuhao==0) P0=0xff; else if(fuhao==1) P0=0x80; P2 = 0xFE; Delay(200); P2 = 0xff; //关闭显示 } /*****显示报警温度子程序*****/ void Disp_alarm(uchar baojing) { P0 =LEDData[baojing%10]; // P2 = 0xBF; Delay(100); P2=0xff; P0 =LEDData[baojing%100/10]; //显示十位 P2 = 0xEF; Delay(100); P2=0xff; if(set_st==1&&H_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==1&&H_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==1&&H_ZF==1) P0=0x80; else if(set_st==2&&L_ZF==0&&baojing/100!=0) P0 =LEDData[baojing/100]; //显示百位 else if(set_st==2&&L_ZF==0&&baojing/100==0) P0=0xff; else if(set_st==2&&L_ZF==1) P0=0x80; P2 = 0xFB; Delay(100); P2=0xff; if(set_st==1)P0 =~0xCE; else if(set_st==2)P0 =0x1A; //上限H、下限L标示 P2 = 0xFE; Delay(100); P2 = 0xff; //关闭显示 } |
|
|
|
/*****报警子程序*****/ void Alarm() { if(x>=10){beep_st=~beep_st;x=0;} if((fuhao==0&&H_ZF==0&&wendu>shangxian)||(fuhao==1&&H_ZF==1&&wendu if(beep_st==1) { LED_H=0; BEEP=0; } else { LED_H=1; BEEP=1; } } else if((fuhao==0&&L_ZF==0&&wendu { if(beep_st==1) { LED_L=0; BEEP=0; } else { LED_L=1; BEEP=1; } } else { LED_H=1; LED_L=1; BEEP=1; } } /*****主函数*****/ void main(void) { uint z; // uchar s; InitTimer(); //初始化定时器 wendu=ReadTemperature()-5; //获取温度值并减去DS18B20的温漂误差 for(z=0;z<300;z++) { Disp_init(); } while(1) { if(SET==0) { BEEP=1; Delay(200); BEEP=0; do{}while(SET==0); LED_H=1; LED_L=1; BEEP=1; set_st++;x=0;shanshuo_st=1; if(set_st>2)set_st=0; } if(set_st==0) { EX0=0; //关闭外部中断0 EX1=0; //关闭外部中断1 wendu=ReadTemperature(); //获取温度值并减去DS18B20的温漂误差 // for(s=0;s<10;s++) Disp_Temperature(); Alarm(); //报警检测 } else if(set_st==1) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(shangxian);} } else if(set_st==2) { BEEP=1; //关闭蜂鸣器 EX0=1; //开启外部中断0 EX1=1; //开启外部中断1 if(x>=10){shanshuo_st=~shanshuo_st;x=0;} if(shanshuo_st) {Disp_alarm(xiaxian);} } } } /*****定时器0中断服务程序*****/ void timer0(void) interrupt 1 { TL0=0x3c; TH0=0xb0; x++; } /*****外部中断0服务程序*****/ void int0(void) interrupt 0 { EX0=0; //关外部中断0 if(DEC==0&&set_st==1) { BEEP=1; Delay(2000); BEEP=0; do { Disp_alarm(shangxian); } while(DEC==0); if(H_ZF==0&&L_ZF==0) { shangxian--; if(shangxian<=xiaxian+1) shangxian=xiaxian+1; } else if(H_ZF==0&&L_ZF==1) { shangxian--; if(shangxian<0&&xiaxian==1) { shangxian=0; H_ZF=0; } else if(shangxian<0&&xiaxian>1) { shangxian=1; H_ZF=1; } } else if(H_ZF==1) { shangxian++; if(shangxian>=xiaxian-1) shangxian=xiaxian-1; } } else if(DEC==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(DEC==0); if(L_ZF==0) { xiaxian--; if(xiaxian<0) { xiaxian=1; L_ZF=1; } } else if(L_ZF==1) { xiaxian++; if(xiaxian>=55) { xiaxian=55; } } } } /*****外部中断1服务程序*****/ void int1(void) interrupt 2 { EX1=0; //关外部中断1 if(ADD==0&&set_st==1) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(shangxian); } while(ADD==0); if(H_ZF==0) { shangxian++; if(shangxian>=125)shangxian=125; } else if(H_ZF==1) { shangxian--; if(shangxian<=0) { shangxian=0; H_ZF=0; } } } else if(ADD==0&&set_st==2) { BEEP=0; Delay(2000); BEEP=1; do { Disp_alarm(xiaxian); } while(ADD==0); if(L_ZF==0) { xiaxian++; if(xiaxian>=shangxian-1) xiaxian=shangxian-1; } else if(H_ZF==0&&L_ZF==1) { xiaxian--; if(xiaxian<=0) { if(shangxian==0) { xiaxian=1; L_ZF=1; } else { xiaxian=0; L_ZF=0; } } } else if(H_ZF==1&&L_ZF==1) { xiaxian--; if(xiaxian<=shangxian+1) xiaxian=shangxian+1; } } } |
|
|
|
430里很多东西都包含在头文件里了,我也是个新手。430还没怎么入门
|
|
|
|
只有小组成员才能发言,加入小组>>
3052个成员聚集在这个小组
加入小组2963 浏览 1 评论
MSP430FR5994 使用库函数 定时器触发AD问题请教
3674 浏览 2 评论
请问怎么把下面51单片机的代码改成msp430 g2 pocket的代码,还有改下时间变成30秒
2360 浏览 1 评论
4824 浏览 1 评论
2585 浏览 1 评论
1361浏览 3评论
MSP430FR5994 使用库函数 定时器触发AD问题请教
3674浏览 2评论
2963浏览 1评论
1555浏览 0评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-20 11:56 , Processed in 1.422205 second(s), Total 66, Slave 57 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号