| #include<pic.h> #define uchar unsigned char
 #define uint  unsigned int
 __CONFIG(0x3332); // 0011 0011 0011 0010 //晶振8M
 void delay(uint x)
 {
 uint a,b;
 for(a=x;a>0;a--)
 for(b=110;b>0;b--);
 }
 void main()
 {
 TRISD=0x00;//输出
 PORTD=0x00;
 while(1)
 {
 ;
 }
 }
 
 
 问题描述:
 使用芯片PIC877A,原先使用的是16M,但我怕太快了,所以又换成8M,我使用在线下载方式,允动D口的流水灯。结果我发现它总是高电平。根本就不出低电平,结果我的灯亮不了了,彻底杯具中。
 
 求助一下分析情况,会有哪些情况呢?
 |