Pumpkin, Inc.

Pumpkin User Forums

OSBYTES_OF_DELAYS

If you have a general question or comment regarding Salvo, post it here.

OSBYTES_OF_DELAYS

Postby Eduardo Robles » Wed Jan 16, 2002 9:25 am

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

Eduardo Robles
 
Posts: 14
Joined: Mon Jun 18, 2001 11:00 pm
Location: Sao Paulo, SP, Brazil

Re: OSBYTES_OF_DELAYS

Postby Salvo Tech Support » Wed Jan 16, 2002 12:25 pm

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.

--------
Salvo Technical Support
Please request all tech support through the Forums.
Salvo Tech Support
 
Posts: 173
Joined: Sun Nov 19, 2000 12:00 am


Return to General

Who is online

Users browsing this forum: No registered users and 1 guest

cron