C 程序请高手看下,为什么出现如下错误……感谢!#includesbit KEY = P3^7;sbit LED = P1^7;void main(void){P1M0 = 0X00; //0000 0000 1.7/1.6/1.5/1.4 1.3/1.2/1.1/1.0P1M1 = 0X00; //0000 0000 P3M0 = 0X80; //1000 0000P3M1 = 0X00; //0000 0000L

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/11 03:50:25
C 程序请高手看下,为什么出现如下错误……感谢!#includesbit KEY = P3^7;sbit LED = P1^7;void main(void){P1M0 = 0X00; //0000 0000 1.7/1.6/1.5/1.4 1.3/1.2/1.1/1.0P1M1 = 0X00; //0000 0000 P3M0 = 0X80; //1000 0000P3M1 = 0X00; //0000 0000L
xSk@WNJKm̺ON~6ڴ~a֮-ZslsFA4uKJW y>= pz 2hCۮ5n7"V` 7-R8&EG4m.LJWb--h!^i$UKa-}=S]rAriӸFs" HC:8SHるA9>+xi#. 78m ֗@<C9SH#z- 1 IccEa8e~'FHg UY)} gb\XDtk`5t/y_!qsHI\2%0H:H y%MEkXC** >)D"qJ$N%ѯvۢ Q@{Ljx5#>ms5 :X7vyWvj:/ΉY&ۤӋ!lQ=R?wީZ/EyiܴZrb!ŽP

C 程序请高手看下,为什么出现如下错误……感谢!#includesbit KEY = P3^7;sbit LED = P1^7;void main(void){P1M0 = 0X00; //0000 0000 1.7/1.6/1.5/1.4 1.3/1.2/1.1/1.0P1M1 = 0X00; //0000 0000 P3M0 = 0X80; //1000 0000P3M1 = 0X00; //0000 0000L
C 程序请高手看下,为什么出现如下错误……感谢!
#include
sbit KEY = P3^7;
sbit LED = P1^7;
void main(void){
P1M0 = 0X00; //0000 0000 1.7/1.6/1.5/1.4 1.3/1.2/1.1/1.0
P1M1 = 0X00; //0000 0000
P3M0 = 0X80; //1000 0000
P3M1 = 0X00; //0000 0000
LED = 1; //P1.7
KEY = 0;//P3.7
while(1){
LED = KEY;
}
}
错误如下;
Build target 'Target 1'
assembling STARTUP.A51...
compiling 328.c...
328.C(10):error C202:'P1M0':undefined identifier
328.C(11):error C202:'P1M1':undefined identifier
328.C(12):error C202:'P3M0':undefined identifier
328.C(13):error C202:'P3M1':undefined identifier
Target not created

C 程序请高手看下,为什么出现如下错误……感谢!#includesbit KEY = P3^7;sbit LED = P1^7;void main(void){P1M0 = 0X00; //0000 0000 1.7/1.6/1.5/1.4 1.3/1.2/1.1/1.0P1M1 = 0X00; //0000 0000 P3M0 = 0X80; //1000 0000P3M1 = 0X00; //0000 0000L
P1M0,P1M1,P3M0,P3M1 是STC单片机专用的特殊功能寄存器,必须在编译器内增加STC单片机的相关文件.单片机什么型号?我发给你.