Interrupts decisions & inputs with a push button
Posted: Mon Jan 18, 2016 3:26 pm
Hi,
Name is Jeff - I am new to this product and am giving it a try with flowcode v6 for pic (8 bit) I am using a pic16f690 and the concept of the project is easy but after watching flowcode training videos for days and days now, I am more confused than ever.
Here is the concept – you have 1 push button that is momentary and 8 leds. When you are holding down the button, led 1 lights for as long as you are holding it. When you let the button go, nothing lights. When you hit the button (and hold) again, led 2 lights for as long as you hold it. Rinse and repeat for all leds. This is a concept so it can be 50 leds or 2 leds but you get the idea.
I have seen people use interrupts, macro component calls, and switches to accomplish something similar. My question: I was hoping someone could truly explain these flowcode items in a way that is related to this concept project so that I may better understand how (and almost as important) WHEN to use them. Maybe I can use all three to accomplish the same task – but should I, and how?
The picture attached is how far I have gotten with 1 led working just fine with the concept.
Thanks community!
Name is Jeff - I am new to this product and am giving it a try with flowcode v6 for pic (8 bit) I am using a pic16f690 and the concept of the project is easy but after watching flowcode training videos for days and days now, I am more confused than ever.
Here is the concept – you have 1 push button that is momentary and 8 leds. When you are holding down the button, led 1 lights for as long as you are holding it. When you let the button go, nothing lights. When you hit the button (and hold) again, led 2 lights for as long as you hold it. Rinse and repeat for all leds. This is a concept so it can be 50 leds or 2 leds but you get the idea.
I have seen people use interrupts, macro component calls, and switches to accomplish something similar. My question: I was hoping someone could truly explain these flowcode items in a way that is related to this concept project so that I may better understand how (and almost as important) WHEN to use them. Maybe I can use all three to accomplish the same task – but should I, and how?
The picture attached is how far I have gotten with 1 led working just fine with the concept.
Thanks community!