Page 1 of 1

OSBYTES_OF_DELAYS

PostPosted: Wed Jan 16, 2002 9:25 am
by Eduardo Robles
Hi,

I just wanted to know if the OSBYTES_OF_DELAYS in the Salvo Lite configuration is fixed to 1 byte. I tried to obtain additional delays just by having 2 bytes (configuring OSBYTES_OF_DELAYS 2) instead of one, but it didn't work. I had to use a small loop in the task to get a 2 sec. delay by using OS_Delay(250) and a system tick of 2 mS.

Regards,

Eduardo


Re: OSBYTES_OF_DELAYS

PostPosted: Wed Jan 16, 2002 12:25 pm
by Salvo Tech Support
Hi Eduardo.

You are correct -- the Salvo Lite PIC libraries are configured for one-byte delays.

We'll add that to the manual in the Libraries chapter, since the default for OSBYTES_OF_DELAYS is 0.

Since the libraries are precompiled, changing OSBYTES_OF_DELAYS will have no effect on your compilation. You would need the full version of Salvo (and do a source-code build) to take advantage of this configuration option.

quote:
I had to use a small loop in the task to get a 2 sec. delay by using OS_Delay(250) and a system tick of 2 mS.

This is the best way to achieve long delays while minimizing RAM usage. That's because you only need an extra byte for that particular task, instead of having two-byte delays for every task. Just remember to declare your loop counter as static.

See App Note AN-7 for more info on long delays when OSBYTES_OF_DELAYS is 1.

------------------
-----------------------
Salvo Technical Support
Please request all tech support through the Forums.