SN8P2711-C语言程序例子.doc
SN8P2711-C语言程序例子
/*C************************************************************************
* 文件名: gyyls_voltage.c
*--------------------------------------------------------------------------
* Copyright (c) CAESAR
*--------------------------------------------------------------------------
* 创建: CAESAR
*--------------------------------------------------------------------------
* 版本: V1.0
*--------------------------------------------------------------------------
* 日期:
*--------------------------------------------------------------------------
* 功能:
*
*
*--------------------------------------------------------------------------
* 说明:
*
**************************************************************************/
/*__包含文件_____________________________________________________________*/
#include
#include "compiler.h"
#include "temperature_displayer.h"
/*__变量定义_____________________________________________________________*/
Uint16 vol_ad1;
Uint16 time_10ms;
Uint16 time_1sec;
Uchar temperature_low_segment;
Uchar temperature_high_segment;
//Uint16 temp16;
//Uint16 voltage;
//Uchar temp320_a;
//Uchar temp321_a;
//Uchar temp320_b;
//Uchar temp321_b;
//Uchar x1,x2,x3,x4;
Uint16 __ROM NTC_TABLE[]=
{
3035,
3001,2965,2930,2894,2858,2821,2784,2747,2709,2671,
2633,2594,2556,2516,2478,2438,2399,2360,2321,2281,
2243,2203,2164,2125,2086,2048,2010,1972,1934,1896,
1859,1822,1786,1750,1714,1678,4090,1609,1575,1541,
1508,1475,1443,1412,1380,1350,1319,1290,1261,1232,1204,
1176,100,
};
s_bit_variable flag_together;
Uchar __ROM CODE_TABLE[]=
{
0x11, //0
0xDB, //1
0x0D, //2
0x0B, //3
0xC3, //4
0x23, //5
0x21, //6
0x9B, //7
0x01, //8
0x03, //9
0x10, //'-'
0x25, //'E'
0xff,
};
/*__宏定义_______________________________________________________________*/
#define flag_byteflag_together.byte
#define ADC_YN 0
#define DISPLAY_1SEG_YN 1
#define TEMPERATURE_GET_YN 2
#defi