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

Consultation on rate of rtos task execution

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



Joined: 17 Jun 2009
Posts: 3

View user's profile Send private message

Consultation on rate of rtos task execution
PostPosted: Wed Jun 17, 2009 8:23 pm     Reply with quote

The value given in this parameter, that indicates really? Since in a simple example I have made I set up a task to run every 2ms, it is the only task, but I check that runs every 1.7 ms. What can be the problem? Confused

The execution time of task is approximately 2us.

Code:
#include <18F2550.h>
#device adc=8

#fuses HSPLL,NOWDT,NOPROTECT,NOLVP,NODEBUG,USBDIV,PLL3,CPUDIV1,VREGEN

#use delay(clock=48000000)

#use rtos(timer=0,minor_cycle=1ms)
//******************************************************************************
#use fast_io(b)

#bit Led0=0xF81.0

#task(rate=2ms,max=5us)
void Tarea1(void);


void main(){
   set_tris_b(0x00);
   setup_adc_ports(NO_ANALOGS|VSS_VDD);
   setup_adc(ADC_OFF);
   setup_wdt(WDT_OFF);
   setup_comparator(NC_NC_NC_NC);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   Led0=0;
   
   rtos_run ();
}
void Tarea1(void){
   Led0=1;
   delay_us(2);
   Led0=0;
}


thanks!

PD:My English is bad Rolling Eyes
Suky



Joined: 17 Jun 2009
Posts: 3

View user's profile Send private message

Re: Consultation on rate of rtos task execution
PostPosted: Sat Jun 20, 2009 10:15 am     Reply with quote

Nobody knows whether it should be so, or am I doing something wrong? Rolling Eyes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Jun 20, 2009 12:08 pm     Reply with quote

Read this thread on RTOS execution rates:
http://www.ccsinfo.com/forum/viewtopic.php?t=29772
Suky



Joined: 17 Jun 2009
Posts: 3

View user's profile Send private message

PostPosted: Sat Jun 20, 2009 1:49 pm     Reply with quote

PCM programmer wrote:
Read this thread on RTOS execution rates:
http://www.ccsinfo.com/forum/viewtopic.php?t=29772


Thank you for the tip

Best Wishes!
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