#include <p24Fxxxx.h> 
#include <stdio.h> 
int main(void) 
{ 
    unsigned short a = 0x83FF; 
    unsigned char  i = 0; 
    TRISB |= a; /*configure PORTB<13:10> as output*/   
     
    while(1) 
    { 
    PORTB = 0x4000; 
    for(i=0;i<16;i++) 
    { 
      
     PORTB += 0x0400; 
     PORTB |= 0xBFFF; 
    } 
    }    
} 
 
以上是我编写的程序。编译通过。 
用KIT2烧录程序。烧完后板子指示灯没有反应。 
不知道有没有烧录成功,还是程序有问题? 
第一次用PIC单片机,对开发工具还不是很熟。 |   
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册 
 
 
 
×
 
     
  
 |