Pumpkin, Inc.

Pumpkin User Forums

Idea for new construction - OSWaitBinKey()

Have an idea on how to make Salvo better? Post it here!

Re: Idea for new construction - OSWaitBinKey()

Postby luben » Thu Dec 21, 2000 9:33 am

Hello,

What can now immagine and what will not reduce the RTOS performance is the following:

In fact if I check for real status of the pin I don't need this to be made immediately. Usually a period of 20-50ms is acceptible. In such big period is no problem to take away a 300uS time for checking of the pins. So, if you have some options like Supertimer, Realtimer, etc. you can add something like RealEvent - it will be checked from time to time and the user can set the value for this option - how often to do such checking. And when there are no waiting for checking events - this options will be disabled.

So, you have to make something like OSInitEventScope(event1, freq_of_checking)
and then OS_WaitEvent(event1, mask, timeout,label). Os course you can implement OSDestroyEventScope()

It's very useful to have possibility to check real events (pin status, variable) inside the program with the resourses of Salvo.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: Idea for new construction - OSWaitBinKey()

Postby luben » Thu Dec 21, 2000 9:39 am

And yes... it will be good to have the full version, no doubt. Here I'm fighting to take the money from the university and all nessesary documentation, like certificates, but I'm afraid that this will take lot of time. For my country (Bulgaria) such ammount is really big, worth. If you know that the living standerd is about 10 times less then US, you can immagine how look the price of 900$ for us - like 9000$ for americans.

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Re: Idea for new construction - OSWaitBinKey()

Postby Salvo Tech Support » Thu Dec 21, 2000 11:11 am

Hi Luben.

Qualified individuals at educational institutions can obtain the full version of Salvo (for non-commercial purposes) at a greatly reduced price. Please contact sales@pumpkininc.com for more info.

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

Re: Idea for new construction - OSWaitBinKey()

Postby NoMore » Fri Dec 22, 2000 2:32 am

Hi Luben

If you want to poll any pin periodicly (say every 20 ms) you can do it like this:

code:

void TaskPollRA0 (void)
{
static bit oldRA0;

oldRA0 = RA0;
for (;;)
{
OS_Delay (2, TaskPollRA01); // sys. tmr ticks every 10ms
if (RA0 ^ oldRA0) // this will seek any transition on RA0
{
oldRA0 ^= 1;
OSSignalBinSem (bsemTRNS_RA0);
}
}
}



Another if (...) will seek when pin goes low:
code:

if (!RA0 & oldRA0) // this will seek high-to-low transition on RA0
OSSignalBinSem (bsemFALL_RA0);
oldRA0 = RA0;


Another if (...) will signal if any pin of port C is high.
In this approach OSInitEventScope(event1, freq_of_checking) is implemented with OSCreateTask(TaskPollRA0,...), OS_WaitEvent(event1, mask, timeout,label) is implemented like OS_WaitBinSem(bsemTRNS_RA0,...) and OSDestroyEventScope() with OSDestroyTask(...).
So no need to load scheduler or other part of RTOS with things you can efficiently do in one of your tasks :-P
You can always correct me if I misunderstood you.
NoMore
 
Posts: 11
Joined: Fri Dec 01, 2000 12:00 am

Re: Idea for new construction - OSWaitBinKey()

Postby luben » Fri Dec 22, 2000 8:09 am

Hello,

I know that when using some additional commands is easy to implement the checking of the pin status. My idea was only to make more convenient Salvo, something like "good wish" - to make it directly into Salvo. But now I see that it's better nothing to change in Salvo. The idea of checking real events is outside of the idea of Salvo's kernel. If Salvo checks real events it will become slowlier. I think is better to keep it in current view.

Maybe my idea could be implemented into OS_WaitBinSem() somehow, who knows. Seems that my ideas was generated just because of the lack of enough information about Salvo :-)

Regards
Luben

luben
 
Posts: 324
Joined: Sun Nov 19, 2000 12:00 am
Location: Sofia, Bulgaria

Previous

Return to Feature Requests

Who is online

Users browsing this forum: No registered users and 0 guests

cron