資源簡介
stm8s103單片機+ds18b20溫度傳感器,IAR集成開發環境,函數庫源代碼,內含OLED顯示驅動,DS18B20驅動,實際工程,絕對能夠運行。

代碼片段和文件信息
#?include?“stm8s.h“
#?include?“oled.h“
#?include?“ds18b20.h“
#?include?“stdio.h“
#include?“stdlib.h“
void?CLK_Configuration(void)
{
??//預分頻,分頻系數1
??
??CLK_DeInit();?
??CLK_HSIPrescalerConfig(CLK_PRESCALER_HSIDIV1);
??CLK_HSICmd(ENABLE);
??
}
//char?str[4];
void?main(void)
{
??unsigned?int?temp;
??CLK_Configuration();
??OLED_Init();
??OLED_Clear();
??
??Init_DS18B20();
??OLED_ShowString(01“TEMP:“16);
while(1)
??{
????temp?=?Read_DS18B20();
????
????OLED_ShowNum(451temp/10416);
????
????OLED_ShowChar(801‘.‘16);
????
????OLED_ShowNum(881temp%10116);
????
????
????delay_ms(1000);
??
??}
????
}
#ifdef?USE_FULL_ASSERT
void?assert_failed(u8*?file?u32?line)
{?
??while?(1)
??{
??}
}
#endif
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2019-03-01?00:39??temp\
?????目錄???????????0??2019-03-01?00:29??temp\BSP\
?????文件?????????422??2019-02-28?22:46??temp\BSP\delay.c
?????文件?????????140??2019-02-28?22:40??temp\BSP\delay.h
?????文件????????4533??2019-02-28?22:40??temp\BSP\ds18b20.c
?????文件????????1163??2019-02-28?23:09??temp\BSP\ds18b20.h
?????文件????????8621??2019-02-28?23:21??temp\BSP\oled.c
?????文件????????2621??2019-02-28?21:52??temp\BSP\oled.h
?????文件???????15257??2014-10-26?23:37??temp\BSP\oledfont.h
?????目錄???????????0??2019-03-01?00:37??temp\Debug\
?????目錄???????????0??2019-03-01?00:39??temp\Debug\Exe\
?????文件???????67700??2019-03-01?00:39??temp\Debug\Exe\temp.out
?????目錄???????????0??2019-03-01?00:41??temp\Debug\List\
?????目錄???????????0??2019-03-01?00:39??temp\Debug\Obj\
?????文件????????5796??2019-03-01?00:39??temp\Debug\Obj\delay.o
?????文件??????303719??2019-03-01?00:39??temp\Debug\Obj\delay.pbi
?????文件???????10303??2019-03-01?00:39??temp\Debug\Obj\delay.pbi.cout
?????文件???????15225??2019-03-01?00:39??temp\Debug\Obj\ds18b20.o
?????文件??????309919??2019-03-01?00:39??temp\Debug\Obj\ds18b20.pbi
?????文件???????10305??2019-03-01?00:39??temp\Debug\Obj\ds18b20.pbi.cout
?????文件????????8609??2019-03-01?00:39??temp\Debug\Obj\main.o
?????文件??????353028??2019-03-01?00:39??temp\Debug\Obj\main.pbi
?????文件???????10298??2019-03-01?00:39??temp\Debug\Obj\main.pbi.cout
?????文件???????51239??2019-03-01?00:39??temp\Debug\Obj\oled.o
?????文件??????359661??2019-03-01?00:39??temp\Debug\Obj\oled.pbi
?????文件???????10302??2019-03-01?00:39??temp\Debug\Obj\oled.pbi.cout
?????文件???????52887??2019-03-01?00:39??temp\Debug\Obj\stm8s_clk.o
?????文件??????324651??2019-03-01?00:39??temp\Debug\Obj\stm8s_clk.pbi
?????文件???????10311??2019-03-01?00:39??temp\Debug\Obj\stm8s_clk.pbi.cout
?????文件???????21088??2019-03-01?00:39??temp\Debug\Obj\stm8s_gpio.o
?????文件??????308053??2019-03-01?00:39??temp\Debug\Obj\stm8s_gpio.pbi
............此處省略71個文件信息
- 上一篇:學生信息檔案管理系統源代碼
- 下一篇:仿微信登錄界面
評論
共有 條評論