void MCU_init(void); /* Device initialization function declaration */
void main(void) {
unsigned char Temp;
MCU_init(); /* call Device Initialization */
/* include your code here */
//////////
EN485A = 1;
while (!SCI1S1_TDRE);
Temp = SCI1S1;
SCI1S1_TDRE=1;
SCI1D = 0x55;
EN485A = 0;
////
EN485B = 1;
while (!SCI2S1_TDRE);
Temp = SCI2S1;
SCI2S1_TDRE=1;
SCI2D = 0x55;
EN485B = 0;
///////
// task();
for(;;) {
/* __RESET_WATCHDOG(); by default, COP is disabled with device init. When enabling, also reset the watchdog. */
} /* loop forever */
/* please make sure that you never leave main */
}作者: xforesight 时间: 2007-7-6 14:41