Or build your own time slicing system...not hard, but a bit time wasting
Interrupt all the way!
Timer interrupt is one of my favorite.
Or build your own time slicing system...not hard, but a bit time wasting
Interrupt all the way!
Timer interrupt is one of my favorite.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Or simply a loop that does those three operations one after the other... since they happen so fast, to the user they will look simultaneous.
"I think fish is nice, but then I think that rain is wet, so who am I to judge?" - Douglas Adams
I (and many/{all} of us) had exactly that question.
Happily, interrupts were made for that, reacting at specific realtime events, such as: -A/D activity, USART I/O, QEI, Timers, Capture, Keyboard, switch, and so on.-
There are 2 ways to handle interrupts:
1.- The standard way is using 'ON INTERRUPT' statement & stuff. (see manual/forum)
2.- The recommended way is using Darrel Taylor's 'Instant Interrupts', once you understand it, you'll enjoy it's benefits. (documentation in a thread in the forum).
My personal choice is labeling tasks to optimize troubleshooting (if happen), code and memory. (why labeling? because PBP doesn't allow functions or sub/procedures structure)
Rodrigo.
"Beethoven had his critics too, see if you can name 3 of them"
For Multiple work, you can make Multiple interrupt (pin) on port c or d or b then ON INTERRUPT, you can do as you wish.
.
Bookmarks