Please advice how to create code for multi threading, I mean do different task same time, ie BlinK 2 different Led in different frequency.
Thanks
Multi Tasking/Multi Threading
- Benj
- Matrix Staff
- Posts: 15312
- Joined: Mon Oct 16, 2006 10:48 am
- Location: Matrix TS Ltd
- Has thanked: 4803 times
- Been thanked: 4314 times
- Contact:
Re: Multi Tasking/Multi Threading
Hello,
There are a number of ways to do this. The easiest is probably using a timer interrupt. Here is an old example showing how to bit bang several PWM outputs.
http://www.matrixtsl.com/article.php?a=52
Using this approach you could have different LED flash rates.
There are a number of ways to do this. The easiest is probably using a timer interrupt. Here is an old example showing how to bit bang several PWM outputs.
http://www.matrixtsl.com/article.php?a=52
Using this approach you could have different LED flash rates.
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
Flowcode Product Page - Flowcode Help Wiki - Flowcode Examples - Flowcode Blog - Flowcode Course - My YouTube Channel
-
- Matrix Staff
- Posts: 9520
- Joined: Sat May 05, 2007 2:27 pm
- Location: Northamptonshire, UK
- Has thanked: 2585 times
- Been thanked: 3815 times
- Contact:
Re: Multi Tasking/Multi Threading
Moved post from Programming Tips & Tricks.
You are starting off with a question and not sharing a tip or trick.
Martin
You are starting off with a question and not sharing a tip or trick.
Martin
Martin