資源簡介
風速儀的源代碼 基于STC12C旋轉式風速儀的源代碼,可以測量風速, 溫度 還有把測出來的結果個別顯示出來。
代碼片段和文件信息
#include?
#include?
#define?uchar?unsigned?char
#define?uint??unsigned?int
#define?ulong?unsigned?long
sbit?DQ?=?P3^1;??
sbit?BEEP=P3^0?;
sbit?START?=?P1^1;//P3^7;
sbit?Temprt?=?P1^0;//P3^6
bit?presence;
uchar?temp_comp=0View_CountView_Indx=0;
uint?count?N_Velct;
ulong?F_Velct=0;
uchar?data??temp_data[2]?=?{0x000x00};
uchar?data??RomCode[8]?=?{0x000x000x000x000x000x000x000x00};
uchar?code?LEDData[]?=?{0xc00xf90xa40xb00x990x920x820xf80x800x900xbf};
uchar?code?possel[]?=?{0xf70xfb0xfd0xfe};
uchar?data?LED_Buf[]?=?{0000};
unsigned?char??crc;
void?Delay(unsigned?int?num)
{
??while(?--num?);
}
Init_DS18B20(void)
{??
?????DQ?=?1;
?????Delay(8);
?????DQ?=?0;
?????Delay(90);
?????DQ?=?1;
?????Delay(8);
?????presence?=?DQ;
?????Delay(100);
?????DQ?=?1;?
??????
?????return(presence);
}
ReadOneChar(void)
{
???unsigned?char?i?=?0;
???unsigned?char?dat?=?0;
???for?(i?=?8;?i?>?0;?i--)
?
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6211??2012-01-14?10:19??Versn1\aff.c
?????文件??????14465??2012-01-28?15:35??Versn1\aff.LST
?????文件??????15983??2012-01-28?15:35??Versn1\aff.OBJ
?????文件??????13977??2012-01-28?15:35??Versn1\AtraSonicDM
?????文件???????4589??2012-01-28?15:35??Versn1\AtraSonicDM.hex
?????文件?????????62??2012-01-28?15:35??Versn1\AtraSonicDM.lnp
?????文件??????22962??2012-01-28?15:35??Versn1\AtraSonicDM.M51
?????文件???????1429??2012-01-28?15:36??Versn1\AtraSonicDM.Opt
?????文件????????408??2012-01-28?15:35??Versn1\AtraSonicDM.plg
?????文件???????1737??2012-01-18?14:36??Versn1\AtraSonicDM.Uv2
?????文件???????1429??2012-01-27?19:48??Versn1\AtraSonicDM_Opt.Bak
?????文件???????2039??2011-03-05?20:49??Versn1\AtraSonicDM_Uv2.Bak
?????文件???????5115??2002-04-16?06:32??Versn1\STARTUP.A51
?????文件??????11665??2012-01-28?15:35??Versn1\STARTUP.LST
?????文件????????749??2012-01-28?15:35??Versn1\STARTUP.OBJ
?????目錄??????????0??2014-08-16?22:23??Versn1
-----------?---------??----------?-----??----
???????????????102820????????????????????16
- 上一篇:容錯控制與應用
- 下一篇:AD10 patch.exe
評論
共有 條評論