Hi there, Does anyone know if it's possible to rum multiple threads on 8051 mocrocontroller? Thank you.
Nei San; Don't let these guys talk you out of multi-thread system for the 8051. The Keil RTX51 Tiny has run in a chip (old Philips 751)that had only 64 Bytes of RAM and 1K of ROM. The newer RTX51 Tiny 2 allows you to define your minimum set of OS calls and build a stripped down version of the RTX Lib. You will be building some type of scheduler so why not use one already built for the task. I have built a stripped version fully multithreaded with less than 500 bytes of code. The RTOS can be time slice round robin or cooperative or both but not preemptive. Timer0 and Register bank 1 by default are used by the RTOS but you can use the timer ticks for other operations within the RTOS. Also, the 8051 has no stack over flow monitor but since RTX 51 Tiny is managing the stack you can add a fail soft macro with your defined stack limits. With just a bit of forethought to the defined tasks, you can build a good determinate multithread system. The full 8051 interrupt system is still available for parallel operations. Download some of the RTX51Tiny examples from the Keil website to see how simple the RTOS can be. Bradford
Thank you all for the answers. It helped a lot.
The Keil RTX51 Tiny has run in a chip (old Philips 751)that had only 64 Bytes of RAM OK you have proven it can be done, that does not answer "why do it". I am sure that with freezing and some effort it is possible to strike a match on a bar of soap, but would you do that? Erik
RTX51-Tiny is in use since about 15 years, field-proven and stable. It has been used in many, many applications. Why do you re-invent the wheel? Reinhard