Download coen-2003-project-27.. - Computer Engineering

Transcript
void
Timer1_Init(void)
{
TMOD |= 0x28;
CKCON &= ~0x03;
TL1
TH1
= 0x96;
= 0x96;
TCON
|= 0x40;
IE
|= 0x08;
}
//----------------------------------------------------------------------------// UART_Init
//----------------------------------------------------------------------------//
// Configure the UART for single processor comms, ignoring stop bit logic level
// and enable recieve
//
void
UART_Init(void)
{
//enable revceive
SCON0 = 0x10;
IE
|= 0x10;
RI0
= 0;
TI0
= 0;
IP
= 0x10;
HW_DONE = 0;
}
//---------------------------------------------------------------------------// void SWUART_Init(void)
//----------------------------------------------------------------------------