MSP430 Long Timer Delay

In the previous two posts I described how to use a timer interrupt in order to create precision time delays. This time I describe a method to create much longer time delays. These time delays are useful in looping main “c” functions that require periodic updating.

Similar to a previous post that described a timer interrupt with a M430G2452 mcu, we will be programming a longer time delay using a timer interrupt and the timer will be clocked using a high accuracy external oscillator.

In this example the delay will be contained in a function that can be called any where in the main program loop. Also it would be easy to create different time delay functions by simply changing a couple of variables.

The function works by using a fixed time delay and then looping this delay the required number of times. A timer interrupt is used to increment the loop counter. By changing the value in the loop counter, long accurate time delays can be created.

MSP430 LONG TIME DELAY PROGRAM

 

 

TIMER OUTPUT WAVEFORMS

ONE SECOND TIME DELAY

 

FIVE SECOND TIME DELAY

 

end post

Leave a Reply

Your email address will not be published. Required fields are marked *