单片机的 I/凳裤野O 口 请用大写 P1
因为reg51.h里面 是这么定义的
/*--------------------------------------------------------------------------
REG51.H
Header file for generic 80C51 and 80C31 microcontroller.
Copyright (c) 1988-2002 Keil Elektronik GmbH and Keil Software, Inc.
All rights reserved.
--------------------------------------------------------------------------*/
#ifndef __REG51_H__
#define __REG51_H__
/枣喊* BYTE Register */
sfr P0 = 0x80;
sfr P1 = 0x90; /* 看这里, P1口的纯掘寄存器地址为0x90 */
sfr P2 = 0xA0;
sfr P3 = 0xB0;
11行p1前面加个char