รายการอุปกรณ์
///////////////////////////////////////////////
SOURCE CODE
#include <REGX52.H>
#define PX P2
void DELAY_MS(unsigned int TIME);
void main()
{
while(1)
{
PX=0X00;
DELAY_MS(500);
PX=0XFF;
DELAY_MS(500);
}
}
void DELAY_MS(unsigned int TIME)//DELAY HAVE INPUT
{
unsigned int i,j;
for(i=0;i<TIME;i++)
{
for(j=0;j<111;j++);
}
}
#include <REGX52.H>
#define PX P2
void DELAY_MS(unsigned int TIME);
void main()
{
while(1)
{
PX=0X00;
DELAY_MS(500);
PX=0XFF;
DELAY_MS(500);
}
}
void DELAY_MS(unsigned int TIME)//DELAY HAVE INPUT
{
unsigned int i,j;
for(i=0;i<TIME;i++)
{
for(j=0;j<111;j++);
}
}