[资料分享] 智林LPC111X核芯板程序

ddllxxrr   2010-6-20 09:41 楼主

 

 

/*

                                         \\\|///
                                       \\  - -  //
                                     (  @ @  )
+---------------------oOOo-(_)-oOOo-------------------------+
|                       Z111x Demo                          |
|                                                           |
|                 刘笑然 by Xiaoran Liu                     |
|                        2010.3.26                          |
| ========================================================= |
|        智林测控技术研究所 ZERO Research Institute         |
|                      www.the0.net                         |
|                             Oooo                          |
+-----------------------oooO--(   )-------------------------+
                                     (   )   ) /
                                      \ (   (_/
                                       \_)    

*/
/*----------------------------------------------------------*\
 |  引入相关芯片的头文件                                    |
\*----------------------------------------------------------*/
#include <LPC11xx.h>   /* LPC11xx Peripheral Registers */
#include "system_LPC11xx.h"
/*----------------------------------------------------------*\
 | HARDWARE DEFINE                                          |
\*----------------------------------------------------------*/
#define LED       (1<<5)      /* LED D1 connect to PIO3_5 */
/*----------------------------------------------------------*\
 |  Delay  延时 Inserts a delay time.                       |
 |  nCount: 延时时间 specifies the delay time length.       |
\*----------------------------------------------------------*/
void Delay(unsigned nCount) {
  for(; nCount != 0; nCount--);
  }
/*----------------------------------------------------------*\
 | MIAN ENTRY                                               |
\*----------------------------------------------------------*/
int main() {
  SystemInit();
  /* Enable AHB clock to the GPIO domain. */
  LPC_SYSCON->SYSAHBCLKCTRL |= (1<<6);
  LPC_GPIO3->DIR |= LED;      // pin output
  for(;;) {
    LPC_GPIO3->DATA &= ~LED;  // reset pin : LED light
   Delay(2000000);
    LPC_GPIO3->DATA |=  LED;  // set pin: LED off
   Delay(2000000);
    }
  }
/*---------------------  END OF FILE  ----------------------*\
 |                        COPYRIGHT                         |
 |        智林测控技术研究所 ZERO Research Institute        |
 |                      www.the0.net                        |
\*----------------------------------------------------------*/

为方便大家看我打个包

1.0 - GPIO_OUT.rar (73.96 KB)
(下载次数: 44, 2010-6-20 09:41 上传)

http://shop34182318.taobao.com/ https://shop436095304.taobao.com/?spm=a230r.7195193.1997079397.37.69fe60dfT705yr

回复评论

暂无评论,赶紧抢沙发吧
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复