CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RDA Interrupt not working

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
cam_male2003



Joined: 21 Sep 2005
Posts: 12

View user's profile Send private message Yahoo Messenger

RDA Interrupt not working
PostPosted: Tue Apr 18, 2006 12:42 pm     Reply with quote

I am using 18lf8722 and are using both uarts. Here is the RS232 Line in my code
#use rs232(baud=2400,xmit=PIN_c7,bits=8,parity=n,rcv=PIN_c6,ERRORS,STREAM=USB) //,disable_ints) //USB CHECKED OK, could not get RDA to work
#use rs232(baud=2400,xmit=PIN_g1,rcv=PIN_g2,RESTART_WDT,parity=n,bits=8,ERRORS,STREAM=RS232) //,disable_ints) //works with RS232
I enabled the RDA Interrupt. But it does not work.. Any Ideas? Rolling Eyes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Apr 18, 2006 1:14 pm     Reply with quote

You have to use the correct pins and you have to use the correct
statement to invoke the RDA interrupt for the 2nd serial port.
Example:
Code:

#include <18F8722.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock=4000000)

#use rs232(baud=2400,xmit=PIN_C6, rcv=PIN_C7, ERRORS, STREAM=USB) 
#use rs232(baud=2400,xmit=PIN_G1,rcv=PIN_G2,RESTART_WDT, ERRORS,STREAM=RS232)

#int_rda
void rda_isr()
{
char c;

c = fgetc(USB);
}

//------------------
#int_rda2
void rda2_isr()
{
char c;

c = fgetc(RS232);
}

//=======================
void main()
{

while(1);
}
cam_male2003



Joined: 21 Sep 2005
Posts: 12

View user's profile Send private message Yahoo Messenger

PostPosted: Tue Apr 18, 2006 1:19 pm     Reply with quote

thank you.. I will get the second one fixed
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group