/*
工程创建MCU选取,Atmel 89C55
单片机:STC15f104W
功能:500M秒闪一次LED
连接说明:LED正极串接1K 电阻接VCC,负极接到 MCU的8脚 P3.3
*/
#include <REG51.h>
sbit LED = P3^3;
void DELAY_MS (unsigned int a){
unsigned int i;
while ( --a != 0 ) {
for (i=0;i<=600;i++);
}
}
void main (void) {
while (1) {
LED = ~LED;
DELAY_MS(500);
}
}本文出自 “魂斗罗” 博客,请务必保留此出处http://990487026.blog.51cto.com/10133282/1726228
原文地址:http://990487026.blog.51cto.com/10133282/1726228