#include "pic.h"
__CONFIG(034);
#define INT8U unsigned char
#define INT16U unsigned int
const INT8U LEDCODE0[]={0xed,0xed,0xed,0xed,0xed,0xed,0xde,0xde,0xde,0xde,0xde,0xde,};
const INT8U LEDCODE1[]={0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,};
void MCU_Init(void);
void Display(void);
void LED_Delay(INT16U j);
void main()
{
MCU_Init();
while(1)
{
Display();
}
}
void MCU_Init()
{
TRISIO=0x00;
GPIO=0x00;
ANSEL=0x00;
WPU=0x00;
IOC=0x00;
}
void Display()
{
INT8U i,k;
for(k=0;k<3;k++)
{
for(i=0;i<sizeof(LEDCODE0);i++)
{
GPIO=LEDCODE0[i];
LED_Delay(60);
GPIO=0xff;
LED_Delay(50);
}
}
for(k=0;k<3;k++)
{
for(i=0;i<sizeof(LEDCODE1);i++)
{
GPIO=LEDCODE1[i];
LED_Delay(60);
GPIO=0xff;
LED_Delay(50);
}
}
}
void LED_Delay(INT16U j)
{
INT16U a,b;
for(a=j;a>0;a--)
for(b=70;b>0;b--);
}
## 貴陽太陽能爆閃燈廠家就選貴州眾熠電子科技