📄 main.h
字号:
/*--------------------------------------------------------------*-
Main.H (v1.00)
Author:06_Digital_Media
All Right Reserved
-----------------------------------------------------------------
'Project Header' for project HELLO2 (see chap 5)
-*--------------------------------------------------------------*/
#ifndef _MAIN_H
#define _MAIN_H
//---------------------------------------------------------------
//WILL NEED TO EDIT THIS SECTION FOR EVERY PROJECT
//---------------------------------------------------------------
//Must include the appropriate microcontroller header file her
#include <reg52.h>
//Oscillator / resonator frequently (in HZ) e.g.(11059200UL)
#define OSC_FREQ (1200000UL)
/*--------use in Chapter 7 ------------------------------------*/
#define INTERRUPT_TIMER_2_Overflow 5
//Number of oscillator per instruction (12 ,etc)
//12 -Original 8051/8052 and numerous modern versions
//6 -Various Infineon and Philips devices,etc
//4 -Dallas 320,520 etc
//1 -Dallas 420,etc
#define OSC_PER_INST (12)
//---------------------------------------------------------------
//SHOULD NOT NEED TO EDIT THE SECTIONS BELOW
//---------------------------------------------------------------
//Typedefs (see Chap 5)
typedef unsigned char tByte;
typedef unsigned int tWord;
typedef unsigned long tLong;
//Interrupts (see Chap 7)
#define INTERRUPT_Timer_0_Overflow 1
#define INTERRUPT_Timer_1_Overflow 3
#define INTERRUPT_Timer_2_Overflow 5
#endif
/*-------------------------------------------------------------*-
--------END OF FILE----------------------------------------------
-*-------------------------------------------------------------*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -