The DS1307 used in the first module works very well, however the external temperature can affect the frequency of the oscillator circuit which drives the DS1307’s internal counter. This may sound like a problem, however will usually result with the clock being off by around five or so minutes per month.
But 8 ms (which is quite a small duration for us) is way much larger. Now the following table summarizes the results of using different prescalers 8, 64, 2. From the values of the counter, we can easily rule out the top three prescalers as they are above the maximum limit of an 8-bit counter (which is 255). Now refer to the descriptions of clock select bits as shown in the TCCR0 register. Now as soon as the timer overflows, an interrupt is fired and an Interrupt Service Routine (ISR) is executed.It would be worth reading my MSP430 Programming Tutorial, Part 1 covers the basics and Part 2 gives clear examples. The MSP430G2253 has two 16 bit timers, Timer0 and Timer1 both are Timer_A variants with three capture/compare registers.The MSP430 family guide lists two types of 16 bit timer, Timer_A and Timer_B.Then there's WDC's outstanding programming manual which I can't pass up an opportunity to recommend.Virtually all programming manuals will give some treatment to interrupts.