Home/Support/Support Forum/how to use the uart C interrupt for RCM6760
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

how to use the uart C interrupt for RCM6760

0 votes
i am using the RCM6760 now,i want to use its Serial port C interrupt to receive the character from other device,now, i use
the uart assistant(a pc application software,can receive and send char)as the other device,but the program have no function i want,why?
the code below:

#use "RS232.lib"
void serialc_isr(void);
#define CINBUFSIZE 31
#define COUTBUFSIZE 31
#define BAUDRATE 9600
void main(void)
{
SetVectIntern(0x0e,serialc_isr);
serCopen(BAUDRATE);
WrPortI(SCCR, &SCCRShadow, 0x01);
serCputc(0x55);
while(1)
{
}
}
nodebug root interrupt void serialc_isr()
{
int status,ch;
status=RdPortI(SCSR);
if(status&0x08)
{
printf("a byte is moved from the transmitter buffer\r\n");
}
else if(status&0x80)
{
serCputc(0xb2);
ch = serCgetc();
serCputc(ch);
}
else if(status&0x04)
{
printf("a byte is sending\r\n");
}
}

i can receive the character '0x55' that the uart assistant receive,but send cann't work.
asked Aug 14, 2014 in Rabbit by huanghao New to the Community (1 point)

Please log in or register to answer this question.

2 Answers

0 votes
The RS232.lib uses interrupts. There is no need to set up an ISR in your program. This is all done by the library.
answered Aug 15, 2014 by trooper2 Veteran of the Digi Community (589 points)
Could you give me an example?
0 votes
See samples\SERIAL
answered Aug 18, 2014 by trooper2 Veteran of the Digi Community (589 points)
...