图拉丁吧 关注:7,518,111贴子:127,608,163
  • 1回复贴,共1

求助,很急,能不能帮帮忙解释一下这个程序

只看楼主收藏回复

#include <reg52.h>
#include <intrins.h>
#define uchar unsigned char
#define uint unsigned int
uchar tc0 = 0,tc1 = 0;
void main()
{
P0 = 0xfe;
P2 = 0xfe;
TMOD = 0x11;
TH0 = (65535-15000)/256;
TL0 = (65535-15000)%256;
TH1 = (65535-15000)/256;
TL1 = (65535-15000)%256;
IE = 0x8a;
TR0 = 1;
TR1 = 1;
while(1);
}
void Time0() interrupt 1
{
TH0 = (65535-15000)/256;
TL0 = (65535-15000)%256;
if(++tc0 == 10)
{
tc0 = 0;
P0 = _crol_(P0,1);
}
}
void Time1() interrupt 3
{
TH0 = (65535-15000)/256;
TL0 = (65535-15000)%256;
if(++tc1 == 10)
{
tc1 = 0;
P2 = _crol_(P2,1);
}
}


IP属地:安徽来自Android客户端1楼2013-12-02 20:10回复
    图吧会有懂代码的?        ———我认识你 你就是上次留片种的楼主,你他妈害的老子下了一夜的《喜羊羊》,他妈居然还还带码,这事老子已经报警了。。


    IP属地:广东来自Android客户端2楼2013-12-02 21:00
    回复