//this examples shows how to configure the crossbar
//includes
#include<c8051f020.h>
sbit LED="P1"^6;
void PORT_Init(void);
void delay(unsigned char count)
{
unsigned int i,j;
for(i=0;i<count;i++)
{
for(j=0;j<100;j++)
{
;
}
}
}
int main(void)
{
WDTCN="0xde";
WDTCN="0xad";
PORT_Init();
while(1)
{
LED =~LED;
delay(6000);
}
}
void PORT_Init(void)
{
XBR2 = 0X40;
P1MDOUT=0X40;
}
用户518079 2008-9-30 09:53