Archive for March, 2011

Fixed Time Loop in Microcontrollers

March 31st, 2011 No comments


Most of the times I am developing a piece of code for my PICs, there is a main loop in the flow. The code repeats it self indefinitely doing its thing and it is only interrupted temporarily by the hardware interrupts of the PIC. Now most of the times a simple while(1) { // code here } will do just fine. However, sometimes your need that loop to start at specific time interval for example every half second. This is pretty useful when somewhere in your maths you need a specific dt. Read more…

Categories: electronics, programming Tags: