1、做一个端口头文件PORT.h
内容:PORT.H
/*
Port Header file for generic 80C51 and 80C31 microcontroller.
Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/
sbit _cs=P0^7;
sbit _dat=P2^4;