I am using MCP7940 RTC from microchip it requires to enter the day of the week as part of updating RTC with date. So how should I calculate day of the week based on the date provided by the user ?
Electronic – How to calculate day of the week for RTC
- Electronic – DS1307 timekeeping date significance (leap seconds?)
- Electronic – Using the ST-LINK Utility to configure the RTC to current time
- Electrical – PIC18F2550 and DS1307 i2c RTC MPLAB assembly code. Have to loop for seconds,mins,hrs
- Electrical – RTC (real-time clock) in STM32L4 series – date and time is not updating on the debugger variable
- Electrical – Couldn’t read the correct values of DS1302 RTC Registers
- Electronic – Coin cell battery recharging circuit for RTC backup power
- Electronic – How to give several classes access to the single RTC on the MCU
If you want to calculate the day-of-week yourself, here's a C implementation of part of a Perl module I wrote about 20 years ago. I like this algorithm because it doesn't require any looping or a table of month lengths. Note that
ints are assumed to be 32 bits.