im having a problem with mikroc code

Thread Starter

abo zaynab

Joined May 1, 2018
35
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
 

Attachments

nsaspook

Joined Aug 27, 2009
13,310
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...
https://stackoverflow.com/questions/1371460/state-machines-tutorials
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.
 
Top