⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 source.h

📁 51单片机C语言常用模块与综合系统设计实例精讲
💻 H
字号:
#define TIMER2H           		0xc4 //10ms
#define TIMER2L           		0x00
#define TIMER_NUM    8
#define VOLT_TIMER   0
#define ADC0801_TIMER   1
#define VOLT_TIMER_LEN 100 //1 second.
#define ADC0801_TIMER_LEN 50 //500ms
/***read volt port const ***/
#define ADEOC             P1_0
#define AD_IOCLK          P1_1
#define AD_ADDI           P1_2
#define AD_OUT            P1_3
#define AD_CSN            P1_4

#define ADC0801_PORT         XBYTE[0X000]
#define MAX_RAW_VALUE        1024
#define VOLT_TOTAL_PORTS     12
#define VOLT_1_8V_PORT     	 0
#define VOLT_E3_3V_PORT    	 1
#define VOLT_9V_PORT       	 2
#define VOLT_N48V_PORT     	 3
#define VOLT_N5V_PORT      	 4
#define VOLT_15V_PORT      	 5
#define VOLT_LOCAL_3_3V_PORT 6
#define VOLT_VX_AGC_PORT   	 7
#define VOLT_LOCAL_24V_PORT  8
#define VOLT_15V_LNB_PORT  	 9
#define VOLT_24V_ODU_PORT 	 10
#define VOLT_TEST            11

#define FSM_ADC0801_START         0X00
#define FSM_ADC0801_FINISH        0X01
struct volt_detect{
	unsigned int volt[VOLT_TOTAL_PORTS];
	unsigned char preport;
	unsigned char port;
};
struct MY_TIMER{
	unsigned char enable;
	unsigned int  count;
	unsigned int  length;
	unsigned char flag;
};

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -