|
#include <reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
void DelayMS(uint x)
{
uchar t;
while(x--)
{
for(t=120;t>0;t--);
}
}
void main()
{
// uchar i;
P2=0x01;
while(1)
{
P1=0X18;
DelayMS(1000);
P1=0X24;
DelayMS(1000);
P1=0X42;
DelayMS(1000);
P1=0X81;
DelayMS(1000);
}
}
|
|