View previous topic :: View next topic |
Author |
Message |
bolubeyi
Joined: 27 Apr 2012 Posts: 15 Location: TURKEY
|
Multitasking with Pic |
Posted: Thu Apr 04, 2013 1:40 am |
|
|
Hi, Is it possible to multitasking with the pic? if it will be possible, how can i use it? Which pic has include this feaure? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19539
|
|
Posted: Thu Apr 04, 2013 1:46 am |
|
|
Any processor can 'multi task'. To a small extent. However on the PIC is is more like the old Windows 9x, 'co-operative' multi-tasking than the full multi-threading possible on a more complex processor. Look at ex_rtos_demo_1_tasks.c.
Remember there is not basically an OS (which is what implements 'multi-tasking' in a PC), so it is just down to you to write multi tasking software. The RTOS, provides a crude 'underlayer' to give a limited ability. To go beyond this is down to you.
Best Wishes |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9243 Location: Greensville,Ontario
|
|
Posted: Thu Apr 04, 2013 5:37 am |
|
|
Yes, any PIC can 'multitask'.
The term 'multitask' just means, give the illusion you're doing 2 or more things at one time.How many 'tasks' and how complicated those tasks are is the challenge.
Consider the lowly PC mouse. The PIC in there powers 2 or 3 LEDS,gets data from 2 or 3 quadrature encoders,senses 2 or 3 switches,does some math and communicates via a serial port to the host.MCHP has an Application Note on this and should be a 'must read'.
Another example is the PLC.Here a small PIC can control a whole process based on say 8 inputs and 8 outputs.
Todays PICs run very,very fast allowing the programmer to do a lot in a very short time( the essence of 'multitasking').The RTOS is just one method of applying multitasking to a PIC.
cheers
jay |
|
|
|