天天看點

基于STM32單片機的PT100測溫(AD轉換)(Proteus仿真+程式)編号:18基于STM32單片機的PT100測溫檔案下載下傳:

編号:18

基于STM32單片機的PT100測溫

功能描述:

      本設計由STM32單片機+PT100傳感器+LM324運算放大器電路+1602液晶顯示子產品組成。

1、主要制器是STM32單片機

2、PT100傳感器通過LM32運算放大器輸出信号到STM32内部A/D轉換,讀取溫度資訊

3、1602液晶顯示溫度。

4、測溫範圍-55-110攝氏度,誤差<=1℃

注意:proteus8.11版本才能打開 

視訊示範連結:

18、基于STM32單片機的PT100測溫(AD轉換)

仿真圖:
基于STM32單片機的PT100測溫(AD轉換)(Proteus仿真+程式)編号:18基于STM32單片機的PT100測溫檔案下載下傳:

程式源碼:

#include "delay.h"
#include "LCD1602.h" 
#include "adc.h"


#include "stdio.h" 	
#include "stdlib.h" 	


int main(void)
{	
	unsigned char buf[20];
	
    u16 adcx = 0;                                   //AD值
    float voltage = 0;                              //電壓
	
	float Temp;
	
	NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);	//設定中斷優先級分組為組2:2位搶占優先級,2位響應優先級
	Lcd1602_Init();									//液晶1602初始化
	Adc_Init();		  		                        //ADC初始化
	Lcd1602_String(0,0,"   PT100 Test  ");
 	while(1)
	{	
		
		
		adcx = Get_Adc_Average(ADC_Channel_0,10);   //AD轉換讀取	
        voltage =(float)adcx*(3.3/4096);            //ADC值轉換為電壓值				
		
		Temp = 61.8897 * voltage - 63.1474;			//轉換公式
		sprintf((char *)buf,(const char *)"Temp:%5.1f%cC",Temp,0xdf);
		Lcd1602_String(0,1,buf);
		

		
	}	
}

           

軟體免費下載下傳位址:

1、Proteus仿真軟體

檔案内容:Proteus7.8安裝包、Proteus8.6安裝包、Proteus.8.10安裝包、Proteus Professional 8.11 SP0安裝包

連結:https://pan.baidu.com/s/11LNUZ9BJXWvXf1C4dPc3_w 

提取碼:2756 

3、KEIL5 MDK軟體(STM32開發軟體)

連結:https://pan.baidu.com/s/1t3eY-3yRdTa7jZMlijq_jg 

提取碼:ab58 

檔案下載下傳:

https://pan.baidu.com/s/1JErfi5DyciGjW2XB4n50fw?pwd=mchh

繼續閱讀