1
0
mirror of https://github.com/taigrr/arduinolibs synced 2025-01-18 04:33:12 -08:00

Update alarm clock to support DS3232

This commit is contained in:
Rhys Weatherley
2012-05-25 14:25:53 +10:00
parent be14f5c2e7
commit c2fdaee863
7 changed files with 65 additions and 14 deletions

View File

@@ -28,8 +28,8 @@
The alarm clock described on this page is a large example application that
uses many of the classes in the provided libraries: LCD, Form,
Field, SoftI2C, DS1307RTC, Melody and \ref power_save "PowerSave".
The clock has the following features:
Field, SoftI2C, DS1307RTC (or DS3232RTC), Melody and
\ref power_save "PowerSave". The clock has the following features:
\li Displays both the time and date.
\li 12 hour and 24 hour time display modes.
@@ -53,6 +53,8 @@ Realtime Clock Module</a>. I used the ready-made realtime clock module,
but made my own equivalent to the LCD shield from parts to aid in spacing
out the LCD and pushbuttons on the exterior of the box. The value of the 33R
resistor may need to be adjusted for different types of back light LED's.
See \ref clock_ds3232 "below" for information on using a DS3232-based
clock module instead of a DS1307-based module.
The whole circuit is built on a prototyping shield, with ribbon cables
connecting to the LCD. The Stop Alarm button and piezo buzzer are not
@@ -85,6 +87,25 @@ Arduino designs should also work.
\image html kitten_minimal.jpg
\section clock_ds3232 Using DS3232 instead of DS1307
For clock modules based on the DS3232 chip, such as the
<a href="http://www.freetronics.com/products/real-time-clock-rtc-module">Freetronics Real Time Clock Module</a>, change the \c Clock typedef
in <tt>Clock.h</tt> to the following:
\code
typedef DS3232RTC Clock;
\endcode
The pads on the Freetronics module should be connected to the Arduino
as follows:
\li VCC and GND connected to 5V and GND on the Arduino.
\li SQI connected to A3.
\li SDA connected to A4.
\li SCL connected to A5.
\li BAT, 32K, and RST left unconnected.
*/
/*

View File

@@ -67,7 +67,7 @@ The default implementation simulates the time and date based on the value of
<tt>millis()</tt>.
\li DS1307RTC class that talks to the DS1307 realtime clock chip via I2C.
\li DS3232RTC class that talks to the DS3232 realtime clock chip via I2C.
\li \ref alarm_clock "Alarm Clock" example that uses the DS1307
\li \ref alarm_clock "Alarm Clock" example that uses the DS1307 or DS3232
realtime clock and the LCD library to implement an alarm clock.
\section main_other Other