Questions tagged [real-time-clock]

Quoting Wikipedia:

A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time.

Micro controllers, Android, related assembly (or low-level) code are concepts that usually accompany so make sure you pick the right one.

199 questions
1
vote
1 answer

RTC Memory ESP8266 12-E read an write

What would be the right syntax for writing a variable lets say the int 100 into the RTC Memory of an ESP8266 12-E module and retrieve it after reboot or deep sleep.
Peter S
  • 625
  • 1
  • 9
  • 32
1
vote
0 answers

Raspberry PI Zero DS3231 RTC

I have an Raspberry PI Zero and want to add a HWClock DS3231 (https://www.amazon.de/DS3231-RTC-Modul-f%C3%BCr-Raspberry/dp/B01B4IV30C/ref=sr_1_fkmr0_2?s=computers&ie=UTF8&qid=1486456449&sr=8-2-fkmr0&keywords=raspberry+pi+zero+rtc) on it. On my…
1
vote
1 answer

NTP and RTC HW Clock weird results

In an attempt to make the system time on an ODroid as close to realtime as possible, I've tried adding a real time clock to the ODroid. The RTC has an accuracy of +/- 4ppm. Without the realtimeclock, I would get results like this (Synced with…
Benjamin Larsen
  • 560
  • 1
  • 7
  • 21
1
vote
1 answer

RTC initialisation in an MCU - why use a global callback

The code below is related to the initialization of an RTC in an MCU. Would anybody know the rational for passing NULL to rtc_init() and then setting a global callback global_rtc_cb equal to it. Why would you use a global callback at all when there…
logitech mouse
  • 91
  • 1
  • 10
1
vote
2 answers

Arduino with servo and RTC

I am making a project that involves a RTC and a servo motor so that it only turns on at a certain time. A snippet from the loop is: void loop() { DateTime now = rtc.now(); if (DateTime == 19:10) { //Some stuff } else { …
user5987041
1
vote
2 answers

STM32L1x Stop mode + RTC too much current

I am able to put my stm32L1xDiscovery board in STOP mode with RTC running. according to the datasheet this should draw about 1.3 µA. But my application draws 3.3 µA. I noticed I did not put the FLASH in a low power mode during sleep. But when I did…
1
vote
0 answers

Should a real-time game clock emit the time every second?

Building a real-time game, and I'm not sure of the better way to handle the in-game timer. Should I have: Socket.io emit the current game time of the model every second. Socket.io emit a game.started() function that starts a client-side clock,…
1
vote
0 answers

printing a temperature from arduino in 24 hr format

I have made a project to keep the record of temperature and time but while printing the records the time is not shown in proper way as in 24 hr format. what i get is this: 8/4/2015 15:57:09 24.9 8/4/2015 15:57:39 25.39 8/4/2015 15:58:09 …
1
vote
2 answers

RTC + Scheduler using Arduino mini

I am using Arduino mini 5V for my project and RTC - Real Time Clock Module DS1307 I would like to wake the board at a certain time and run a function. (Buzzer is connected to D3) When I use the TimeAlarm alone and manually set the time everything…
Sarah A
  • 1,185
  • 12
  • 27
1
vote
1 answer

DST doesn't work on an Embedded linux distribution (without network connection)

I've been trying to set up the DST on an embedded linux, which has intalled a Yocto Project/OpenEmbedded linux distribution. The first step was to check if the symbolic link from /etc/localtime to /usr/share/zoneinfo/Europe/Paris was set up. ln -s…
DBeltran
  • 13
  • 2
1
vote
1 answer

How the set RTC as wake up source and set a specific time on all the days using sys file system

I am using a imx6 SabreSD. I need to set the RTC as the wake up source, and I need to set a specific time on all the day,say 12 midnight(may not be in power down mode at that time) I have a sample echo +x > /sys/class/rtc/rtc0/wakealarm; RTC…
1
vote
1 answer

Why RTC_WAKEUP doesn't work?

public void runSound(){ Intent it = new Intent(Values.TAG_EXECUTE_ALARM); PendingIntent pendIntent = PendingIntent.getBroadcast(this, 0, it, 0); Calendar calendar = Calendar.getInstance(); …
Rafael Ito
  • 37
  • 5
1
vote
2 answers

I am trying to write a program in C to use an DS1302 RTC with a PIC16F877a

so I am currently trying to Read and Write the time to the RTC and these methods will just not work. this is what I have: so it sends the address byte to determine where it would like to read from then flips the pin to input and reads each bit out…
0
votes
0 answers

Converting 24 hr formatted time to 12 hr format in HTML

I am currently trying to translate a Wallpaper Engine wallpaper from Chinese to English, part of this process is converting the 24 hours time standard to the 12 hours standard. Here is the code I believe is used to calculate the time, any help would…
0
votes
0 answers

Maintaining ESP32-C3 (or other ESP32) timer across deep sleep

I'm looking for a timer on the ESP32-C3 that persists through sleep phases. The system time does and it is fed by one of two clocks as described here:…
NewEndian
  • 559
  • 2
  • 16