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

serial ISR doesn't run

Hello,

the ISR runs only for the first time. I'm not sure if the settings for the interrupt are correct. Can anyone explain me the difference between ASC0_RIC_IR and ASC0_RIC

thanks for help

Rainer

void rs232_open()
{

ASC0_CON = 0x8011; // set serial mode // Baudrate Generator disabled,Baudrate timer prescaled divide by 2 // even parity, ignore Parity, Receiver enabled REN = 1, One Stop Bit // 8 Bit data asyncron Mode

ASC0_BG = 0x81; // set baudrate fix Input Clock Dividers // 19200Baud 0x40/0x41 // 9600Baud 0x81/0x82

ASC0_TIC = 0x80; // set transmit interrupt flag ASC0_RIC = 0x45; // delete receive interrupt flag

}

void int_232_serv() interrupt intreg = 43
{

register BYTE c; ASC0_RIC_IE=0; // Receive interrupt disabled

c = ASC0_RBUF;

Receive = TRUE;

ASC0_RIC_IR = 0; ASC0_RIC_IE = 1;
}

0