2024-05-01 01:43 AM
Hi everybody,
I would like create a smart watch with a STML031 and a driver for screen ST7567.
I'm looking for the best way to make this watch in outline. Particularly regarding the precision obtained for 1Hz.
I would like to get as much precision as possible. For this I used a 32.768Hz quartz.
Could someone quickly explain to me the best way to go about it?
Should I use RTC as Clock source?
Should I use the calendar, read the time and display it?
Do I have to trigger a switch every second to update the screen?
In the final draft I will not display seconds. Only hours and minutes So I would like to put the µC to sleep during this time to gain autonomy.
Thanks for reading me
2024-05-01 02:40 AM - edited 2024-05-01 03:15 AM
The first thing to do is to go to the Product Page for the chip you're going to use; eg,
https://www.st.com/en/microcontrollers-microprocessors/stm32l031k6.html
There you will find the Datasheet, Reference Manual, Application Notes, and other supporting information.
These will give you the necessary information to move forward with your project.
It would also be wise to obtain a Nucleo board on which to experiment, investigate, and then prototype your application; eg,
https://www.st.com/en/evaluation-tools/nucleo-l031k6.html
@JJoao.1 wrote:Should I use RTC as Clock source?
The RTC is not a clock source - it requires a clock source.
This is described in the Datasheet & Reference Manual:
@JJoao.1 wrote:Should I use the calendar, read the time and display it?
yes, that is the whole point of the RTC - it does the counting of seconds, minutes, hours, days, etc for you in hardware - so you don't have to code it all in software, and keep the CPU running to do those computations.
@JJoao.1 wrote:Do I have to trigger a switch every second to update the screen?
You can update the screen at any rate you choose, appropriate to your requirements
@JJoao.1 wrote:I would like create a smart watch
What do you mean by that? You haven't described anything "smart" yet - just a plain, ordinary, dumb watch.
2024-05-01 02:42 AM
Application Note AN4759, Introduction to using the hardware real-time clock (RTC) and the tamper
management unit (TAMP) with STM32 MCUs: