Hi Everybody ,
I was wondering if is there a way for creating a multitasking environment in MikroC.
A kind of external library which, once loaded, would permit writing things like these:
Create_Task(*Pointer_to_my_function_1)
Create_Task(*Pointer_to_my_function_2)
And these tasks start to run simoultaneously.
What I can't understand is how to restart a function previously interrupted EXACTLY from where it has been interrupted.
I mean:
task_1 (){
do_something
do_something_else
print_something
}
If my 'scheduler' interrupts this function just before it executes 'do_something_else', i want that next time it becomes active, it starts EXACTLY from 'do_something_else' and not from 'do_something'.
I hope anybody can help, because I've read tons of material on this topic, but I cant find the solution for implementig such things in MikroC.
Thanks for reading this long post .
Multitasking with MikroC?
That's the first time I've heard that rumor. For PIC, or dsPIC (/PIC24)? I would think that it would be much easier and more flexible on the 16-bit platform, because of the multiple interrupts (and stack pointer, etc.). I don't think attempting it for 8-bit would be worth the effort.Code_Nerd wrote:The last I heard was that the mE guys are going to incorporate it in v7.0!
If you know what you're doing, you're not learning anything.
-
- Posts: 71
- Joined: 10 Jun 2006 13:45
thanks :-)
Thanks a lot for reply.
Any further help would be appreciated
Any further help would be appreciated
Re: thanks :-)
what further help can we give you?spookyrufus wrote:Thanks a lot for reply.
Any further help would be appreciated
mC doesnt have multitasking..
I realised that many of the tasks that may require multitasking can still be achieved the "normal" way with some clever coding / use of delays etc.. I also found mC to be much easier to use in regards to LCD, USART etc than the C18 libraries. So I sacrificed the RTOS for ease of use..egomez wrote:And why have you switched to mC which doesn't support multitasking?Code_Nerd wrote: I have used Salvo on the 8 bit PICs and thought it was great
Do you have easier projects now? Or are you doing smaller projects with mC, and other with some other compiler and Salvo?
Regards
Code
Re: Multitasking with MikroC?
Hi everyone!
i want to an application multitasking.
for example:
i want to a basic pattern generator.
but i have a timing algoritm,because,
when i use a delay() function, all the pins are effected of this...
plc help me!!!
i want to an application multitasking.
for example:
i want to a basic pattern generator.
but i have a timing algoritm,because,
when i use a delay() function, all the pins are effected of this...
plc help me!!!