hello,
I am beginner to PIC microcontroller and Flowcode. I have created a simple PWM LED chaser for PIC12F675. I want to each pattern loop 5 times and jumps to next pattern. How can I do that? anyone can help me?
Best Regards
Kalinga, Sri Lanka
LED Pattern Loop
- 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: LED Pattern Loop
Hello Kalinga,
In your program simply go into the pat_01 macro and double click the while loop.
Inside the properties page select the Loop Count tick box and set the iterations to 5. Then click ok.
Repeat for your other pattern macros and you should have the functionality you are looking for.
The other approach of remining in the loop while a count variable is less then 5 will also work but you have to remember to manually increment the count variable inside your loop or you will be stuck there forever.
In your program simply go into the pat_01 macro and double click the while loop.
Inside the properties page select the Loop Count tick box and set the iterations to 5. Then click ok.
Repeat for your other pattern macros and you should have the functionality you are looking for.
The other approach of remining in the loop while a count variable is less then 5 will also work but you have to remember to manually increment the count variable inside your loop or you will be stuck there forever.
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