Hi Jan,
Here are two different ways of changing the pattern each time switch is pressed.
I'm not sure if you wanted pattern to keep being repeated (One Mandatory button call different macros V3.fcf) until you press switch just like in the video you posted a link to?
Or pattern should just stop (One Mandatory button call different macros V2.fcf) until switch is pressed then pattern changes, just like the flowchart you posted.
Either way The Flowcharts I have posted also allow more patterns (an unlimited amount) to be easily added.
If you want the pattern to be constantly repeated, but want to choose stop the pattern then in One Mandatory button call different macros V3.fcf,
Then change Count = 1 to Count = 0
Also to change pattern just hold switch in until LED's stay out.
The ideas other posters posted are also a very good idea and are not wrong at all!. I just wanted to post an alternative idea, so give you more choice.
One other thing. You hardware would not work because your Configuration setting are wrong.
I have guessed you want to use the internal oscillator?
And not use a pull-up resistor connected to MCLR?
So have altered the settings just for that.
Take a look at:
http://www.matrixmultimedia.com/mmforum ... =26&t=6936
For help on configuration settings.
Martin
Edit: Opps I did not chage the oscillator speed to 4MHz. that is now done on both flowcharts.
So if you plan on using them with internal osc. then you will need to download them again.
What is the specs. e.g osc type and speed. using a crystal or internal oscillator?