im having a problem with mikroc code

Thread Starter

abo zaynab

Joined May 1, 2018
in my code im having different times to my coffee machine for every push button but i want to manipulate those timers some how like entering service mode in original circuit by pressing the stop button for few seconds then change every time and save it then it works as the last change has been made. thx forward



Joined Aug 27, 2009
Here’s a link to a forum discussing coding a state machine in C. It discusses one way, but that’s may be others.

Take a look...
Good link but I would advise beginners to say away from polymorphism in C (function pointers) in interrupt I/O driven, time critical state machines on controllers. The stack space is limited (for passing state variables), context switch times can be unpredictable and it's easy to have atomic update issues unless care is taken. The computed goto switch construct can be clumsy at times but it provides a good model of actual processor execution flow.