I'm an experienced hardware design engineer that has recently been venturing into microcontrollers. I have a good understanding of how they work, and have become an almost adequate C programmer of micros.
Where I'm lacking, and the subject of my question, is structuring my applications. I called the thread "real time" but I do not necessarily mean highly accurate real time programming. I'm talking typical things micros do - reading keypad or other inputs, updating an LCD, reading sensors, responding to serial communications, turning on and off external devices, etc...
Being a hardware guy, I naturally gravitate toward state machines. But an application made up of a large case statement state machine can quickly get out of hand. And I've programmed myself into a corner more than once.
I'm not looking for off-the-shelf RTOS's. What I'm looking for is a source or reference where I can get myself up-to-speed on how to structure my applications. I want to know the basic ways others are doing this and the pros and cons of them.
Can anyone point me to a good resource to get where I want to go?
Thanks.
Where I'm lacking, and the subject of my question, is structuring my applications. I called the thread "real time" but I do not necessarily mean highly accurate real time programming. I'm talking typical things micros do - reading keypad or other inputs, updating an LCD, reading sensors, responding to serial communications, turning on and off external devices, etc...
Being a hardware guy, I naturally gravitate toward state machines. But an application made up of a large case statement state machine can quickly get out of hand. And I've programmed myself into a corner more than once.
I'm not looking for off-the-shelf RTOS's. What I'm looking for is a source or reference where I can get myself up-to-speed on how to structure my applications. I want to know the basic ways others are doing this and the pros and cons of them.
Can anyone point me to a good resource to get where I want to go?
Thanks.