Page 1 of 1

Error in HT-PIC

PostPosted: Mon Dec 01, 2008 8:59 am
by Vijay S
hello friends
i'm using salvo lite 3.2.3 and HT-PIC18 compiler 9.50.when i try to compile example coding i'm getting error
Error[924]:missing argument to "-I" option

what is the problem.. help please

------------------
Vijay S


Re: Error in HT-PIC

PostPosted: Tue Dec 02, 2008 9:14 am
by aek
IIRC -I is a directive to the compiler to identify (system) include paths ... so, you need to look at what's being sent to the command line of the compiler, and then modify MPLAB's build settings to include some additional path. Normally that's C:SalvoInc and the directory that your project's salvocfg.h is located in.

------------------


Re: Error in HT-PIC

PostPosted: Thu Dec 11, 2008 11:48 am
by Vijay S
how to make the Task run on periodic intervals..for ex if i need Task1 to be executed every 10ms,how to achieve this

Re: Error in HT-PIC

PostPosted: Fri Dec 12, 2008 7:03 am
by aek
Use OS_Delay() or OS_DelayTS(). OS_DelayTS() gives timing that is jitter-free over the long term.

Assuming a system timer of 100Hz (i.e. OSTimer() is called every 10ms), then OS_Delay(1) will give a delay that ranges from 0 to 20ms (+/- 1 tick is the standard resolution of timing functions in the API).

So, for more accurate 10ms periodicity, you need to call OSTimer() at a higher rate. E.g. call it at 500Hz, and use OS_Delay(5) -- this gives you 10ms +/- 2ms, which is reasonably accurate. Note that calling OSDelay() at 500Hz suggests that you should be running your PIC at 20MHz or so for best performance.

code:
void my_periodic_task (void) {
while (1) {
OS_DelayTS(5, label);
.... //do something
}
}

results in do something happening every 5 system ticks.

------------------