mô phỏng Nháy LED trên ISIS - Proteus
Mã nguồn C:
#include
unsigned char nhayled[20]={0x05,0x0e,0x1d,0x3e,0x7d,0xfe,0x01,0x82,0xc1,0xe2,0xf1,0xfa,0xfd,0x02,0xfd,0x02,0xfd,0x02,0xfd,0x02}; //cac hieu ung
void delay(unsigned int i)
{
while(i--)
{
unsigned char j=121;
while(j--){}
}
}
main()
{
unsigned char k;
while(1)
{
for(k=0;k<20 k="" span="">
{
P0=nhayled[k];
delay(250);
}
}
}20>
Đăng nhận xét