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

📄 main.h

📁 由51单片机制作的电子钟
💻 H
字号:
/*------------------------------------------------------------------

   Main.H (v1.00)

------------------------------------------------------------------*/

#ifndef _main_h_
#define _main_h_

//------------------------------------------------------------------
// WILL NEED TO EDIT THIS SECTION FOR EVERY PROJECT
//------------------------------------------------------------------

// Must include the appropriate microcontroller header file here
#include <reg52.h>

// Include oscillator / chip details here 
// (essential if generic delays / timeouts are used)
//  -
// Oscillator / resonator frequency (in Hz) e.g. (11059200UL)
#define OSC_FREQ (11059200UL)

// Number of oscillations per instruction (4, 6 or 12)
// 12 - Original 8051 / 8052 and numerous modern versions
//  6 - Various Infineon and Philips devices, etc.
//  4 - Dallas, etc.
//
// Take care with Dallas devices 
// - Timers default to *12* osc ticks unless CKCON is modified 
// - If using generic code on a Dallas device, use 12 here
#define OSC_PER_INST (12)

//------------------------------------------------------------------
// SHOULD NOT NEED TO EDIT THE SECTIONS BELOW
//------------------------------------------------------------------
typedef unsigned char uchar;
typedef unsigned int  uint;
typedef unsigned long uLong;


typedef bit BOOL;


#ifndef FALSE
#define FALSE (bit)0
#define TRUE  (bit)1
#endif


//------------------------------------------------------------------
// Interrupts
//------------------------------------------------------------------

/*#define T0_Overflow 1
#define T1_Overflow 3
#define T2_Overflow 5
#define EXTERNAL_0 0
#define EXTERNAL_1 2
#define UART_Rx_Tx 4
#define CAN_c515c 17


//I2C bus
sbit I2C_SCL = P1^0;
sbit I2C_SDA = P1^1;*/


#endif

/*------------------------------------------------------------------
  ---- END OF FILE -------------------------------------------------
------------------------------------------------------------------*/

⌨️ 快捷键说明

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