Interupt on change or even better a real INT pin. Then you can count all pulses without too much work. A good start is as always DT's instant interupts that makes it fast, fun and flexible.
Interupt on change or even better a real INT pin. Then you can count all pulses without too much work. A good start is as always DT's instant interupts that makes it fast, fun and flexible.
Why any real INT should be less work than any dedicated counter? No advanatage at all.
Q: Sir We need to know when something chagend, a button press
A: Load the counter to 255, on the next press it will generate an overflow interrupt
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Why? Since he already used PORTB.1 in his code an interrupt solution requires no HW change.
And it was just a example to show an other possibility....
Bookmarks