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;
}
}