本帖最后由 大秦正声 于 2015-7-31 09:09 编辑
#include "..\DEBUG.C" //调试信息打印
#include "..\DEBUG.H"
#include "CH559.H" ///头文件
//主函数
void main( )
{
P4_DIR = 0xff; //设置P4输出
P4_OUT =0xf;
while(1)
{ P4_OUT =0xe;
mDelaymS(1000);///官方的延时函数
P4_OUT =0xd;
mDelaymS(1000);
P4_OUT =0xb;
mDelaymS(1000);
P4_OUT =0x7;
mDelaymS(1000);
P4_OUT =0xf;
mDelaymS(1000);
P4_OUT =0x7;
mDelaymS(1000);
P4_OUT =0xb;
mDelaymS(1000);
P4_OUT =0xd;
mDelaymS(1000);
P4_OUT =0xe;
mDelaymS(1000);
P4_OUT =0xf;
mDelaymS(1000);
}
}
|