为您找到"
F:\LED.C(9): error C141: syntax error near '=' 这是什么意思
"相关结果约100,000,000个
sbit P2^0=A1;sbit P1^0=A2;sbit 语句等号后边应该是地址。sbit P2^0=A1;能通过编译码?本人试一下:test.C(6): error C141: syntax error near '^', pected '='很遗憾,没通过。如果改成 sbit A1=P2^0; sbit A2=P1^0;试试。注意分号,语句只能使用英文字符。还有if(A1=0) 也...
unsigned 应该全部都小写。j=abs(ctemp); ctemp 的范围比 j 大,需要注意溢位。
看看你相应的头文件中具体是怎么定义单片机的引脚的。如"regX51.h","AT89x51.h"就是在.C文件的最开头引用的那个.h文件,include <XXX51.h> 把
sbit P10=p^0 少了分号,而且定义端口最右边的p要大写. TH0=(655535-1000)/256;TL0=(65535-1000)%256;这里的是延时,这里只用看1000就知道延时1ms,如果里面的1000换成10000就是延时10ms include
uint j,c;bit flag_IN = 0;bit flag_OUT = 0;LCD_Init();LCD_Clear();LCD_Write_Char(0,0,'j');LCD_Write_Char(1,0,'=');LCD_Write_Char(5,0,'g');LCD_Write_Char(6,0,'e');LCD_Write_Char(8,0,'c');LCD_Write_Char(9,0,'=');LCD_Write_Char(13,0,'g');LCD...
不是函数内不能声明变量,而是必须放在最前面.int num = 0;P0M0 = 0ff;P0M1=0XFF;...就可以了.P0M0
随手这么写的 include <stdio.h> typedef unsigned char uint8;typedef unsigned int uint16;typedef char int8;typedef int int16;int main(int argc, char *argv[]){ int16 tmp;return 0;} 是没有编译错的 所以可能还是和其他部分有关 另注:int一般4个字节的,用32比较不会混淆,当然你...
stdio是计算机上的标准io操作 keil主要是为了写微型处理器程序,有专门的头文件的,别引用电脑的
include <reg52.h>typedef unsigned int uint16//;typedef unsigned char uint8//;【分号也要去掉】sbit DIOLA = P2^5;main (){ uint16 i;//【把定义放到最前面就可以了】 uint8 j; DIOLA = 1;while (1) { P1 = ~(1<<j++); for (i=0;i<20000;i++);if (j=...