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 non-responsive

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



Joined: 27 Jun 2006
Posts: 39

View user's profile Send private message

RDA interrupt non-responsive
PostPosted: Tue Dec 23, 2008 6:12 pm     Reply with quote

I am in the middle trying to implement a serial interrupt using the #int_rda. It works fine in a test program, but when trying to port it into a project it does not respond. There seems to be some conflict with existing usage in the project.

I am using rs232 to output data, and have a I2C bus, which is active and am running and LCD. The only one that i can see being a problem at all would be the I2C as it uses some of the serial registers.

Are there any other problems that I may be running into? Is it possible to use I2C and the RDA interrupt simulaneously?

Here are the fuses that i currently have enabled:
Code:

#include <18F4520.h>//CCS 4520 header file for registers
#define OSC_FREQ 4000000 
//Fuses
#fuses INTRC//HS //INTRC//HS//INTRC
#fuses NOPROTECT,MCLR,NOBROWNOUT,BORV45,NOWDT,NOPUT,NOSTVREN,NODEBUG
#fuses NOLVP,NOWRT,NOCPB,NOWRTB,NOWRTC,NOCPD,NOWRTD,NOEBTR,NOEBTRB
#fuses NOXINST   //extended cpu
#use delay(clock=OSC_FREQ)
//RS232 Setup
#use rs232(baud=9600, xmit=PIN_C6, rcv=PIN_C7,bits = 8)


Compiler:4.083

Thanks for the input.
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Dec 23, 2008 6:55 pm     Reply with quote

Comment sections of code until it starts working. For example, if you
call a routine to read the temperature from an i2c chip, then comment
out the "guts" of that routine. Then temporarily insert code in that
routine to return a hard-coded value for the temperature. For example,
always return 70 degrees (Fahrenheit). Also, comment out the
#use i2c () statement and any code that initializes the i2c pins. If the
you suspect that the i2c is causing the problem, this trouble-shooting
will help you to see if it's true.
fvnktion



Joined: 27 Jun 2006
Posts: 39

View user's profile Send private message

PostPosted: Wed Dec 24, 2008 11:00 am     Reply with quote

Thanks for the great advice PCM. Just to update the post in case anyone else is interested.


I did what you recommended and did end up getting the the INT_RDA to by basically eliminating all use of the I2C. I thought that I would try and older version compiler to see if there was any difference in outcome. I loaded 4.057 and all of the code with all functionality enabled worked fine. I reloaded 4.083 and somehow someway all of the code was working fine.

Some crazy black magic going on there somewhere. Possibly a corrupted file or some other reinstall fixing solution.

Anyway, thanks for the help.

Cheers
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