XS128单片机实验:B口灯交替闪亮
时间:12-01
来源:互联网
点击:
#include /* common defines and macros */
#include "derivative.h" /* derivative-specific definitions */
#include "WQ.h"
//This is the firstprogramof mine,its used to text the board;
//LED will twinkle in very fast speed;
void DELAY(int y)
{
int i,x;
for (i=y;i>0;i--)
for(x=220;x>0;x--);
}
void main(void) {
DDRB =0XFF; //置1,作为输出口
while(1){
PORTB=0x55;
DELAY(550);
PORTB=0XAA;
DELAY(550);
}
}
#include "derivative.h" /* derivative-specific definitions */
#include "WQ.h"
//This is the firstprogramof mine,its used to text the board;
//LED will twinkle in very fast speed;
void DELAY(int y)
{
int i,x;
for (i=y;i>0;i--)
for(x=220;x>0;x--);
}
void main(void) {
DDRB =0XFF; //置1,作为输出口
while(1){
PORTB=0x55;
DELAY(550);
PORTB=0XAA;
DELAY(550);
}
}
XS128单片机实验交替闪 相关文章:
- Windows CE 进程、线程和内存管理(11-09)
- RedHatLinux新手入门教程(5)(11-12)
- uClinux介绍(11-09)
- openwebmailV1.60安装教学(11-12)
- Linux嵌入式系统开发平台选型探讨(11-09)
- Windows CE 进程、线程和内存管理(二)(11-09)