Pumpkin, Inc.

Pumpkin User Forums

Timeout option and global variables

For issues specific to Microchip's PICmicro® MCUs, including compilers (e.g. HI-TECH PICC & PICC-18, Microchip MPLAB®-C18) and IDEs (e.g. Microchip MPLAB®).

Timeout option and global variables

Postby kamyip » Tue May 11, 2004 2:18 am

Hi again;

1)If I were to use the timeout option for OS_Delay and OS_Wait.. how much more memory does it need.

2) before Salvo, my old program have a number of global variables as boolean flag to tell the state of certain program. It's a nightmare to keep track of it. With Salvo I can do the signalling easily using BinSem. However, are there any overhead in using BinSem? I was wondering if I can migrate all the conventional globals to EFLAG and BinSem etc..

over2u... :-)

Posts: 46
Joined: Mon Apr 15, 2002 11:00 pm

Re: Timeout option and global variables

Postby aek » Tue May 11, 2004 6:57 am


1) You'll have to try it and see -- timeouts require one additional byte per tcb (on PIC18 w/MPLAB-C18) and more ROM to handle the timeout code. Rebuild your application with a t-config library.

2) Each binSem costs 4 bytes of RAM. Generally, beyond a certain level of complexity you'll start to win by using Salvo as the foundation of your code, with its built-in support for events like binSems.


Posts: 1888
Joined: Sat Aug 26, 2000 11:00 pm

Return to PICmicro MCUs

Who is online

Users browsing this forum: No registered users and 2 guests