Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 10, 2024, 10:35:21 22:35


Login with username, password and session length


Pages: [1]
Print
Author Topic: RTOS CCS Error... help  (Read 3581 times)
0 Members and 1 Guest are viewing this topic.
TirthankarMukherjee
Guest
« on: December 30, 2007, 08:38:16 08:38 »

Code:
#include "G:\program PIC\16f877A\real_rtos1.h"

#use rtos(timer=0,minor_cycle=500ms)

#task(rate=500ms,max=100ms)
void read_IR( )
{
  printf("hello world");
}

#task(rate=1000ms,max=100ms)
void read_IR1( )
{
  int i;
  printf("hello USA !");
 // delay_ms(50);
  for(i=0;i<50;i++)
  {
  printf("CCS Rocks !!");
  }
}

void main()
{

   setup_adc_ports(NO_ANALOGS);
   setup_adc(ADC_OFF);
   setup_psp(PSP_DISABLED);
   setup_spi(SPI_SS_DISABLED);
   setup_timer_0(RTCC_INTERNAL|RTCC_DIV_1);
   setup_timer_1(T1_DISABLED);
   setup_timer_2(T2_DISABLED,0,1);
   setup_comparator(NC_NC_NC_NC);
   setup_vref(FALSE);
   setup_port_a( ALL_ANALOG );
   setup_adc( ADC_CLOCK_INTERNAL );
   set_adc_channel( 0 );
   set_tris_b(0xf0);
   rtos_run();
 


}

Code:
#include <16F877A.h>
#device adc=10

#FUSES NOWDT                    //No Watch Dog Timer
#FUSES HS                       //High speed Osc (> 4mhz)
#FUSES PUT                      //Power Up Timer
#FUSES NOPROTECT                //Code not protected from reading
#FUSES NODEBUG                  //No Debug mode for ICD
#FUSES NOBROWNOUT               //No brownout reset
#FUSES NOLVP                    //No low voltage prgming, B3(PIC16) or B5(PIC18) used for I/O
#FUSES NOCPD                    //No EE protection
#FUSES WRT_50%                  //Lower half of Program Memory is Write Protected

#use delay(clock=20000000)
#use rs232(baud=9600,parity=N,xmit=PIN_C6,rcv=PIN_C7,bits=8)

Error


Code:
USE parameter value is out of range :: Minor cycle too short for this timer 

Cant compile my first RTOS in CCS 4.058.. [lease help me to detect the problem.... Basically I want to do object detection with IR and run my stepper motor... so want to implement RTOS functions... but I got stuck while compiling....

A newbie is waiting for answers....

Thanks in Advance...
Logged
future
Newbie
*
Offline Offline

Posts: 16

Thank You
-Given: 10
-Receive: 7


« Reply #1 on: December 31, 2007, 10:10:46 22:10 »

where are your processor definitions?
the rtos uses the clock speed to make some decisions.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC