微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 无线和射频 > TI蓝牙设计交流 > cc2540闪灯程序!

cc2540闪灯程序!

时间:10-02 整理:3721RD 点击:

先下载iar8.3 demo软件。

 #include "ioCC2540.h"
       void delay()
       {unsigned int i;
         for(i=0;i<60000;i++)
         asm(" nop ");
       }
  void  main()
    { P0SEL =0;
           P0DIR=0x01;
           P0=0;
             while(1)
             {P0=0;
             delay();
             P0=1;
             delay();
             }
    }

 #include "ioCC2540.h"
       void delay()
       {unsigned int i;
         for(i=0;i<60000;i++)
         asm(" nop ");
       }
  void  main()
    { P0SEL =0;
           P0DIR=0x01;
           P0=0;
             while(1)
             {P0=0;
             delay();
             P0=1;
             delay();
             }
    }

 #include "ioCC2540.h"
       void delay()
       {unsigned int i;
         for(i=0;i<60000;i++)
         asm(" nop ");
       }
  void  main()
    { P0SEL =0;
           P0DIR=0x01;
           P0=0;
             while(1)
             {P0=0;
             delay();
             P0=1;
             delay();
             }
    }

照片!

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top