LED嵌入式一个小程序

来源:百度知道 编辑:UC知道 时间:2024/09/23 00:38:40
/********************************************************
*
* Function: main()
*
* Description:Blink the green LED once a second
*
* Notes: This outer loop is hardware-independent. However,
* it depends on two hardware-dependent functions
*
*Returns: This routine contains an infinite loop
*
********************************************************/
void
main(void)
{
while(1)
{
toggleLed(LED_GREEN); /* Change the state of the LED. */
delay(500); /* Pause for 500 milliseconds. */
}
} /* main() */

#dedine P2LTCH 0xFF5E /*The offset the P2LTCH register. */

/********************************************************
*
* Function: toggleLed()
*
* Description: toggle the state of one or both LEDs.
*
* Notes: This function is specific to Arcon's Targel188EB board.
*

兄弟最好问一下你身边的人或者去下载个keil c内含I/O检测,那位兄弟说的对,你编译运行一下,之后打开监测就可以看见了,keil破解版很多的,
提示下你,学单片机不是抄或者看别人程序能学好的,必须自己从硬件开始学,你的程序明显是抄的,c和汇编的混编,不是你这种初学者光看可以明白的,自己先找一张汇编指令表看看吧。。。。其实这个程序不适合你的。。。
对于初学者来说不要太心急,要慢慢来学
也可以参照教材边看边学
或到网上下载个视频教程来看看
希望能给你一点点帮助!!

不了解ing。