# RS232 Interrupt

**URL:** <https://forums.digi.com/t/rs232-interrupt/9951>\
**Category:** Rabbit\
**Created:** [August 24, 2007, 2:06pm UTC](https://forums.digi.com/t/rs232-interrupt/9951 "2007-08-24T14:06:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Proteo](https://avatars.discourse-cdn.com/v4/letter/p/5f8ce5/32.png) [@Proteo](https://forums.digi.com/u/Proteo)\
**Post date:** [August 24, 2007, 2:06pm UTC](https://forums.digi.com/t/rs232-interrupt/9951/1 "2007-08-24T14:06:55Z")

</div>

Hi dear,  
i’m “new” with the Rabbit, and i need your help pls

i don’t understand where is the mistake in the code here attached. the routine about the interrupt doesn’t work, i’m sure that i’m missing something, pls could you show my some codes that use this type of interrupt or indicate me where i can found datasheet or manual about that?

thanks in advance

#use REMOTE.LIB  
#use SETUP.LIB  
#use LCD\_HD44780\_1.LIB

#define CINBUFSIZE 31  
#define COUTBUFSIZE 31

root interrupt void IsrSerialC();

void main(void)

WrPortI ( PADR,&PADRShadow,0x00 );   
WrPortI ( SPCR,&SPCRShadow,0x84 );

SetVectIntern(0x0E,IsrSerialC);  
BitWrPortI(SCCR, &SCCRShadow,1,0);

while(1)  
{…}

root interrupt void IsrSerialC()  
{  
int c  
auto char STROut[50];   
int i,err;

BitWrPortI(SCCR, &SCCRShadow, 0, 0);  
BitWrPortI(SCCR, &SCCRShadow, 1, 0);

chr = serCgetc();  
if (chr!= -1 && chr != 13)  
{  
if (chr != 10)  
{  
STROut[i] = toupper(chr);  
i++;  
}  
}  
if(chr==13)  
{  
STROut[i]=‘\0’;  
err=chkfrmstr(STROut);  
if ( err \< 0) Error(err);  
i=0;  
STROut[i]=‘\0’;  
chr=-1;  
}  
}

---

<div class="post-metadata">

**Author:** ![chriswiseman](https://avatars.discourse-cdn.com/v4/letter/c/d78d45/32.png) [@chriswiseman](https://forums.digi.com/u/chriswiseman)\
**Post date:** [May 8, 2009, 4:40pm UTC](https://forums.digi.com/t/rs232-interrupt/9951/2 "2009-05-08T16:40:38Z")

</div>

I would be interested in how you solved this problem as I am programming a similar application 🙂
