#define clock 16000000
void CommInit(long baud)
{
long y = clock / baud ;
SysRecDptr=0;
SysSendEndFg=1;
RamCler(SysBuf,64);
P3SEL=0x30;
UCA0CTL1|=UCSSEL_2 ;
UCA0BR0 = y % 256;
UCA0BR1 = y / 256;
UCA0MCTL = UCBRS0;
UCA0CTL1 &= ~UCSWRST;
IE2 |= UCA0RXIE ;
} |