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

📄 init8051.c

📁 在89C51上实现TCPIP协议
💻 C
字号:
/*
 * Copyright (C) 2002 by TechiZ. All rights reserved.
 *
 * This program was written in Korean(Comment and some more).
 *
 * This program was developed by TechiZ(The Company name).
 * TechiZ want to share this program with you who loves the 8051 & the TCP/IP.
 * 
 * You MUST DOWNLOAD THIS CODE from TechiZ Homepage.
 * You DO NOT USE THIS CODE FOR COMMERCIAL PURPOSE.
 * This code is ONLY FREE FOR THE STUDY.
 * If you want more, send me E-mail.
 *
 * E-mail: techiz@techiz.com
 * ( Subject is : [T89C51RD2 & TinyTCP] bla~ bla bla.... )
 *
 * Homepage: http://www.techiz.com
 * 
 * You DO NOT DELETE THIS COPYRIGHT MESSAGE IN THE USING OF THIS CODE.
 *
 * In the using of this code, TechiZ does NOT GUARANTEE ABOUT WORKING WITHOUT ERROR.
 */

/*******************************************************************/
/*                     S Y S T E M     I n i t i a l i z e                                                       */
/*******************************************************************/
#include <aduc812.h>
#include "depend.h"


void system_init(void);

extern union t {				/* time out variable for interrupt */
		word hl;
		byte reg[2];
		word watchdog_counter;
}time[2];

	
void system_init(void)   /*  hardware setting, it is very importand !!!		*/
{
	char ch;
	
	EA = 0;
	TMOD = 0x20;
        PCON = 0x80;
        TH1 = 0xFD;
        TH0 = 0xFD;
        SCON = 0x52;
        TCON = 0x40;
        TR1 = 1;
        TI = 1;
        RI = 0;
        ch = SBUF;
        
}

⌨️ 快捷键说明

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