//太简单了 P2^0,P0^0 --- P2^7,P0^7 试试
#include
void main()
{
while(1)
{
P0=P2;
}
}
#include
#define unit unsigned int
void delay ()
{
unit i,j ;
for (i =10;i --)
for (i =1000;j >0;j --);
}
void main ()
{ while (1)
{ p0=0x00;
p2=0xff;
if (p2!=0xff)
{ p0=~p2;
delay ();
}
}
}