This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
new to msp430.
I wanted to display the RTC in milliseconds, on the MSPEXPFR4133 Launchpad instead of the standard Real Time Clock, so that it shows the Minutes/Seconds/Millisecconds
I changed the value of RTCMOD directly from the 32768 to 32 (just to see the difference)
and it speeded up the time display on the LCD (using code from project msp430fr413x_lpm_3_5_02).
I am trying to find the right place to set this, however. I went through a few documents/app notes
and got a bit confused by the different register settings related to timing/clock/RTCs
So, should I be focussing on the RTCMOD ? or is there a good document/example that would show how to do this on the Launchpad ?
thanks for any help!!
You can’t simply speed-up the RTC by changing the prescaler value. This won’t get you anywhere.
You need to count the milliseconds in parallel to the RTC.
You may use a timer. Run it by the same frequency/clock source as the RTC. Configure it to run from 0 to 32767 (like the RTC prescalers do). Now synchronize the two so that the timer starts with 0 on a fresh second.
Now the timer count is the clock tick of the RTC and you may divide its value by 32.768 (multiply with 1000L and shift right by 15) to get the millisecond that belongs to the current second/minute reading of the RTC.
Of course you can simply count the timer overflows as seconds and ignore the RTC completely. :)
Displaying the result is a different thing, and requires a change ind the current display function too, but that should be simple and straight.
**Attention** This is a public forum