Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 19:23 15 Sep 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : MICROMITE RTC WAKEUP

Author Message
crez

Senior Member

Joined: 24/10/2012
Location: Australia
Posts: 152
Posted: 02:24am 29 May 2014
Copy link to clipboard 
Print this post

The pcf8563 RTC chip has a countdown timer and alarm functions built in. This allows you to wake the uMite from low power sleep at a specified time. Connect pin 3 of the RTC to the wakeup pin of the uMite (pin 16 in my case) and also a 1Meg resistor to the uMite 3.3v supply.

The following code sets the countdown timer in the RTC to 25 and then puts the uMite to sleep. The RTC then wakes the uMite after 25 seconds have expired. Moving the ' from the 6th to the 7th line will make the delay 25 minutes instead of seconds.

It is also possible to set a wakeup at a particular time, day of month, day of week or combination thereof.


RTC gettime
Print"time before sleep ";Time$
I2C open 100,100
T=25 'THIS VALUE IS LOADED INTO THE COUNTDOWN TIMER
I2C write &H51,0,2,&H0F,T 'set COUNTDOWN VALUE AT &H0F TO T
'I2C write &H51,0,2,&H0E,&B10000011 'CLK=MINUTES,TIMER ENABLED
I2C write &H51,0,2,&H0E,&B10000010 'CLK=SECONDS,TIMER ENABLED
I2C write &H51,0,2,&H01,&B00000001 'CLEAR FLAGS, START TIMER
I2C CLOSE

CPU sleep

RTC gettime
Print "time after sleep ";Time$


David
 
psergiu

Regular Member

Joined: 09/02/2013
Location: United States
Posts: 83
Posted: 05:38am 29 May 2014
Copy link to clipboard 
Print this post

On the Olimex MOD-RTC UEXT module, according to the schematic, the "R4" and "R8" solder pads are there for exactly this purpose and will connect pcf8563 pin3 to the UEXT/COM3 RX pin - but i don't know which pin number is that on a DuinoMite - anyone knows ?

Thanks.
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025