#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();
}
#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)
ErrorUSE 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...