LED Pattern Loop

For questions and comments on programming in general. And for any items that don't fit into the forums below.

Moderators: Benj, Mods

Post Reply
kalinga
Posts: 1
Joined: Mon Feb 22, 2010 4:50 am

LED Pattern Loop

Post by kalinga »

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
Attachments
New Pattern.fcf
(7.5 KiB) Downloaded 348 times

User avatar
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

Post by Benj »

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.

Post Reply