does Arduino MEGA2560 support Multi-Threading library??
There is only one processor so true multi-threading is impossible. Have a look at the demo Several Things at a Time. That is the method for getting pseudo multi-threading with the least overhead.
...R
Robin2:
There is only one processor so true multi-threading is impossible. Have a look at the demo Several Things at a Time. That is the method for getting pseudo multi-threading with the least overhead....R
Thanx
but do u know any thing about Multi-Threading library in arduino mega?
You can explore this if this is really what you think you need... but there is one processor, so no two things will happen at the same time. this can help conceptually if you can't think in terms of linear / time driven state machine type of programming style.
Robin2:
There is only one processor so true multi-threading is impossible. Have a look at the demo Several Things at a Time. That is the method for getting pseudo multi-threading with the least overhead....R
The definitions of multi-threading and multi-processing do not mandate use of a multi-processor architecture.
Pseudo-parallelism is the normal term for when multiple threads or processes run on a single processor.
Pseudo-threading if anything means threading implemented in a library, rather than in the OS kernel.
Implementing threads in a library really just gives you multiple stacks and not much more - OS threads
have OS resources (file descriptors etc) and are also called lightweight-processes. A full process has its
own address space and is protected from other processes. Threads can trample each other.
i studied that Arduino UNO has Multi-Threading is it true?
rainyboy:
i studied that Arduino UNO has Multi-Threading is it true?
What does the library documentation say?
.
Was that an attempt at a bump?
rainyboy:
i studied that Arduino UNO has Multi-Threading is it true?
What do you mean by 'studied'?
rainyboy:
i studied that Arduino UNO has Multi-Threading is it true?
What did I say in Reply #1?
...R
If by multithreading you want to ask that whether if 2 functions can run parallelly. For eg. 1 function running led blink and other sending some data to a server and both function be independent to each other. then YES, MULTITHREADING IS POSSIBLE using WDT & main clock.
To run 2 different functions independently, your MCU should have 2 independent oscillators (WDT oscillator & main clock oscillator), which are available in every arduino.
& Its programme is also not that much difficult just try once.
bandejiyar:
If by multithreading you want to ask that whether if 2 functions can run parallelly. For eg. 1 function running led blink and other sending some data to a server and both function be independent to each other. then YES, MULTITHREADING IS POSSIBLE using WDT & main clock.To run 2 different functions independently, your MCU should have 2 independent oscillators (WDT oscillator & main clock oscillator), which are available in every arduino.
& Its programme is also not that much difficult just try once.
I would not subscribe to 'multithreading is possible'.
I miss you working example of this extraordinary claim.
We can and do multi thread on any and ALL single CPU processors.
THIS HAS BEEN TRUE SINCE THE 1950! AND UNIVAC.
Multi threading does not require multiple processors or cores!
Multi processing does not require multiple processors or cores!
All it means is saving where we are upto in one job/task and then moving on to some other task.
The speed of the CPU (Even when they ran at kilo hertz ) makes such that they appear to do many things at the same time. This is what is meant (At least in the university I got my IT degree from ) as multi threading.
The same trick is used to do multi processing which, also, does not require multiple processors!
Just be cause the Thread class is not used and not supported by/on the arduinos does not mean that they do not multi thread.
What Robin2 shows in his "how to do more than one thing at a time" post IS MULTI THREADING.
Mark
I've started a new thread What is "multi threading and how do we do it"? - Bar Sport - Arduino Forum
toavoid a hijack
Mark