📄 temp.h
字号:
/*******************************************************************************
* name: temp.h
* author: fengzai(panda)
* date: 2007.1.8
* decribe: the header file of temprature.c, include the data of zhipu
*******************************************************************************/
/*------------------------------------------------------------------------------
___ 220K ___1K
VCC --|___|--|-----------------------------------|---------------|___|-----> ADC
(5V) | _|_
|/| ---104
|/|49.12k/25C芝浦热敏电阻B=3992K |
| |
---GND ---GND---- 电路描述
*-----------------------------------------------------------------------------*/
#ifndef _TEMPRATRUE_H
#define _TEMPRATRUE_H 1
#include <avr/pgmspace.h>
/*------------------------------------------------------------------------------
热敏电阻阻值,用excel计算出来,单位10欧姆。从0度到60度,精度0.5,共121个
*------------------------------------------------------------------------------*/
static const unsigned int tempratrue[] =
{
16728,16287,15860,15445,15042,14652,14272,13904,13547,13200,12863,12536,12219,11910,11611,11319,11037,10762,10495,10236,9983,9738,9500,9269,9043,8825,8612,8405,8203,8007,7817,7631,7451,7276,7105,6939,6777,6619,6466,6317,6172,6030,5892,5758,5628,5500,5376,5256,5138,5023,4912,4803,4696,4593,4492,4394,4298,4205,4114,4025,3938,3854,3771,3691,3612,3536,3461,3389,3317,3248,3180,3114,3050,2987,2926,2866,2807,2750,2694,2639,2586,2534,2483,2434,2385,2338,2291,2246,2202,2159,2116,2075,2035,1995,1957,1919,1882,1846,1811,1777,1743,1710,1678,1646,1615,1585,1556,1527,1499,1471,1444,1417,1391,1366,1341,1317,1293,1270,1247,1225,1203
};
void adc2_init(void);
unsigned int adc2_calc(void);
unsigned int temp(void);
//unsigned int get_temp(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -