📄 ex.h
字号:
/* EX.h - Pin and parameter definitions for experiment board of C51 */
/******************************************************************
Revision history:
2005/04/01 Arthur Zhu initial begin
*******************************************************************/
#define uchar unsigned char
#define uint unsigned int
#define N_us 10
/* AT24c64 - EEPROM port Declarations with 8051 Processor*/
/* BIT Register */
sbit I2C_SCL = 0xB5; // P3.5
//sbit I2C_SCL = 0xB2; // P3.2
sbit I2C_SDA = 0xB3; // P3.3
sbit SDA = 0xB3; // P3.3
sbit SCL = 0xB5; // P3.5
/* Beep - Bell port Declarations with 8051 Processor*/
/* BIT Register */
sbit BEEP = 0x97; // P1.7
/* HT1380 - Real Timer port Declarations with 8051 Processor*/
/* BIT Register */
sbit sclk_1380 = 0x90; // P1.0
sbit io_1380 = 0x91; // P1.1
sbit rst_1380_ = 0x92; // P1.2
/* Parameter for Finite State Machine of HT1380 */
#define SHOW_YEAR 0
#define SHOW_MMDD 1
#define SHOW_TIME 2
#define SHOW_SEC 3
#define SET_YEAR_10 4
#define SET_YEAR_1 5
#define SET_MON_10 6
#define SET_MON_1 7
#define SET_DAY_10 8
#define SET_DAY_1 9
#define SET_HOUR_10 10
#define SET_HOUR_1 11
#define SET_MIN_10 12
#define SET_MIN_1 13
#define SET_SEC_10 14
#define SET_SEC_1 15
/* Relay - Relay port Declarations with 8051 Processor*/
/* BIT Register */
sbit RELAY = 0x93; // P1.3
/* Switch - Switch port Declarations with 8051 Processor*/
/* BIT Register */
sbit SW1 = 0xA7; // P2.7
sbit SW2 = 0xA6; // P2.6
sbit SW3 = 0xA5; // P2.5
sbit SW4 = 0xA4; // P2.4
/* TLC549 - ADC port Declarations with 8051 Processor*/
/* BIT Register */
sbit TLC549_IOCLK = 0x95; // P1.5
sbit TLC549_CS_ = 0x96; // P1.6
sbit TLC549_DOUT = 0x94; // P1.4
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -