This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Meaning of The Break Detect Function

Hi, I am trying to understand what is the importance of the "Break Detect" function when programming a microcontroller. Can some one tell me what it is useful for.

here is a copy of it

****************************************
void init(void)
{
P0M1 = 0x00; // push pull output
P0M2 = 0xFF;

ES = 1; // enable UART interrupt
EA = 1;
}

void brkrst_init(void) // This function allows ISP entry through the UART break detect
{
AUXR1 |= 0x40; // enable reset on break detect
SCON = 0x50; // select the BRG as UART baud rate source
SSTAT = 0x00;
BRGR0 = 0x70; // 9600 BAUD at 11.0592 MHz
BRGR1 = 0x04;
BRGCON = 0x03; // enable BRG
}

void UART(void) interrupt 4
{
RI = 0; // clear receive interrupt flag
}

Parents Reply Children
No data