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

Quick question on delay_ms

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



Joined: 07 Dec 2007
Posts: 8

View user's profile Send private message

Quick question on delay_ms
PostPosted: Mon Jun 02, 2008 10:11 pm     Reply with quote

I'm using this delay(delay_ms(3000) )in my routine. When in a delay, the rda interrupt does not seem to work. It works fine outside the delay, but it seems to disable interrupts. I have been reading the CCS manual, and it sounds like it should just increase the time of the delay. Extended to service interrupt.

my rda interrupt:

Code:
#int_rda
void serial_isr()
{
   int t;

   buffer[next_in]=getc();
   if(buffer[next_in]==':')
   {
   bufferloaded = 1;
   bufmax = next_in;
   }
   
   t=next_in;
   next_in=(next_in+1) % BUFFER_SIZE;
   if(next_in==next_out)
     next_in=t;           // Buffer full !!
}


Version 4.064
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Mon Jun 02, 2008 10:28 pm     Reply with quote

Do you have any other interrupt routines in which you are using delays ?

What PIC are you using ?

Make sure that compiler warnings are enabled. Do you get any warnings
when you compile the code.
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