velleman VMA301 DS1302 Real Time Clock Module User Manual
- June 8, 2024
- Velleman
Table of Contents
VMA301
DS1302 REAL-TIME CLOCK MODULE
User Manual
Introduction
To all residents of the European Union
Important environmental information about this product
This symbol on the device or the package indicates that disposal of the device
after its lifecycle could harm the environment. Do not dispose of the unit (or
batteries) as unsorted municipal waste; it should be taken to a specialized
company for recycling. This device should be returned to your distributor or
to a local recycling service. Respect the local environmental rules.
If in doubt, contact your local waste disposal authorities.
Thank you for choosing Velleman® ! Please read the manual thoroughly before
bringing this device into service.
If the device was damaged in transit, do not install or use it and contact
your dealer.
Safety Instructions
- This device can be used by children aged from 8 years and above, and persons with reduced physical, sensory or mental capabilities or lack of experience and knowledge if they have been given supervision or instruction concerning the use of the device in a safe way and understand the hazards involved. Children shall not play with the device. Cleaning and user maintenance shall not be made by children without supervision.
- **** Indoor use only.
Keep away from rain, moisture, splashing and dripping liquids.
General Guidelines
-
Refer to the Velleman® Service and Quality Warranty on the last pages of this manual.
-
Familiarise yourself with the functions of the device before actually using it.
-
All modifications of the device are forbidden for safety reasons. Damage caused by user modifications to the device is not covered by the warranty.
-
Only use the device for its intended purpose. Using the device in an unauthorised way will void the warranty.
-
Damage caused by disregard of certain guidelines in this manual is not covered by the warranty and the dealer will not accept responsibility for any ensuing defects or
problems. -
Nor Velleman nv nor its dealers can be held responsible for any damage (extraordinary, incidental or indirect) – of any nature (financial, physical…) arising from the possession, use or failure of this product.
-
Due to constant product improvements, the actual product appearance might differ from the shown images.
-
Product images are for illustrative purposes only.
-
Do not switch the device on immediately after it has been exposed to changes in temperature. Protect the device against damage by leaving it switched off until it has
reached room temperature. -
Keep this manual for future reference.
What is Arduino®
Arduino ® is an open-source prototyping platform based in easy-to-use hardware
and software. Arduino ® boards are able to read inputs – light-on sensor, a
finger on a button or a Twitter message – and turn it into an output –
activating of a motor, turning on an LED, publishing something online. You can
tell your board what to do by sending a set of instructions to the
microcontroller on the board. To do so, you use the Arduino programming
language (based on Wiring) and the Arduino ® software IDE (based on
Processing).
Surf to www.arduino.cc and
www.arduino.org for more information.
V. 01 – 14/05/2018 | 2 | ©Velleman nv |
---|
Overview
The DS1302 trickle-charge timekeeping chip contains a real-time clock/calendar and 31 bytes of static RAM. It communicates with a microprocessor via a simple serial interface. The real-time clock/calendar provides seconds, minutes, hours, day, date, month, and year information. The end of the month date is automatically adjusted for months with fewer than 31 days, including corrections for leap year. The clock operates in either the 24-hour or 12-hour format with an AM/PM indicator.
Arduino® | VMA301 |
---|---|
D5 | CE |
D6 | I/O |
D7 | SCLK |
5 V | VCC |
GND | GND |
power supply ………………………………………… 1 x CR2032
TTL compatible ………………………………………… VCC = 5 V
temperature range ……………………………………….. 0 °C to +70 °C
Pin Layout
CE| Input. The CE signal must be asserted high during a read or a write. This
pin has an internal 40 kΩ (typ) pulldown resistor to ground. Note: Previous
data sheet revisions referred to CE as RST. The functionality of the pin has
not changed.
---|---
I/O| Input/push-pull output. The I/O pin is the bidirectional data pin for the
3-wire interface. This pin
has an internal 40 kΩ (typ) pulldown resistor to ground.
SCLK| Input. SCLK is used to synchronize data movement on the serial
interface. This pin has an internal
40 kΩ (typ) pulldown resistor to ground.
VCC| Primary power supply pin in dual supply configuration. VCC1 is connected
to a backup source to
maintain the time and date in the absence of primary power. The VMA301
operates from the
larger of VCC1 or VCC2. When VCC2 is greater than VCC1 + 0.2 V, VCC2 powers
the VMA301. When
VCC2 is less than VCC1, VCC1 powers the VMA301.
GND| Ground.
Example
// Example sketch for interfacing with the DS1302 timekeeping chip.
//
// Copyright (c) 2009, Matt Sparks
// All rights reserved.
//
// http://quadpoint.org/projects/arduino-ds1302
include <stdio.h>
include <DS1302.h>
namespace {
// Set the appropriate digital I/O pin connections. These are the pin
// assignments for the Arduino as well for as the DS1302 chip. See the DS1302
// datasheet:
//
// http://datasheets.maximintegrated.com/en/ds/DS1302.pdf
const int kCePin = 5; // Chip Enable
const int kIoPin = 6; // Input/Output
const int kSclkPin = 7; // Serial Clock
// Create a DS1302 object.
DS1302 rtc(kCePin, kIoPin, kSclkPin);
String dayAsString(const Time::Day day) {
switch (day) {
case Time::kSunday: return “Sunday”;
case Time::kMonday: return “Monday”;
case Time::kTuesday: return “Tuesday”;
case Time::kWednesday: return “Wednesday”;
case Time::kThursday: return “Thursday”;
case Time::kFriday: return “Friday”;
case Time::kSaturday: return “Saturday”;
}
return “(unknown day)”;
}
void printTime() {
// Get the current time and date from the chip.
Time t = rtc.time();
// Name the day of the week.
const String day = dayAsString(t.day);
// Format the time and date and insert into the temporary buffer.
char buf[50];
snprintf(buf, sizeof(buf), “%s %04d-%02d-%02d %02d:%02d:%02d”,
day.c_str(),
t.yr, t.mon, t.date,
t.hr, t.min, t.sec);
// Print the formatted string to serial so we can see the time.
Serial.println(buf);
}
} // namespace
void setup() {
Serial.begin(9600);
// Initialize a new chip by turning off write protection and clearing the
// clock halt flag. These methods needn’t always be called. See the DS1302
// datasheet for details.
rtc.writeProtect(false);
rtc.halt(false);
// Make a new time object to set the date and time.
// Sunday, September 22, 2013 at 01:38:50.
Time t(2018, 5, 10, 15, 8, 50, Time::kThursday);
// Set the time and date on the chip.
rtc.time(t);
}
// Loop and print the time every second.
void loop() {
printTime();
delay(1000);
}
More Information
Please refer to the VMA301 product page on www.velleman.eu for more information.
Use this device with original accessories only. Velleman nv cannot be held
responsible in the event of damage or injury resulting from (incorrect) use of
this device. For more info concerning this product and the latest version of
this manual, please visit our website
www.velleman.eu. The information in this manual is
subject to change without prior notice.
© COPYRIGHT NOTICE
The copyright to this manual is owned by Velleman nv. All worldwide rights
reserved. No part of this manual may be copied, reproduced, translated or
reduced to any electronic medium or otherwise without the prior written
consent of the copyright holder.
Velleman® Service and Quality Warranty
Since its foundation in 1972, Velleman® acquired extensive experience in the
electronics world and currently distributes its products in over 85 countries.
All our products fulfil strict quality requirements and legal stipulations in
the EU. In order to ensure the quality, our products regularly go through an
extra quality check, both by an internal quality department and by specialized
external organisations. If, all precautionary measures notwithstanding,
problems should occur, please make appeal to our warranty (see guarantee
conditions).
General Warranty Conditions Concerning Consumer Products (for EU):
-
All consumer products are subject to a 24-month warranty on production flaws and defective material as from the original date of purchase.
-
Velleman® can decide to replace an article with an equivalent article, or to refund the retail value totally or partially when the complaint is valid and a free repair or replacement of the article is impossible, or if the expenses are out of proportion.
You will be delivered a replacing article or a refund at the value of 100% of the purchase price in case of a flaw occurred in the first year after the date of purchase and delivery, or a replacing article at 50% of the purchase price or a refund at the value of 50% of the retail value in case of a flaw occurred in the second year after the date of purchase and delivery. -
Not covered by warranty:
- all direct or indirect damage caused after delivery to the article (e.g. by oxidation, shocks, falls, dust, dirt, humidity…), and by the article, as well as its contents (e.g. data loss), compensation for loss of profits;
- consumable goods, parts or accessories that are subject to an aging process during normal use, such as batteries (rechargeable, non-rechargeable, built-in or replaceable), lamps, rubber parts, drive belts… (unlimited list);
- flaws resulting from fire, water damage, lightning, accident, natural disaster, etc.…;
- flaws caused deliberately, negligently or resulting from improper handling, negligent maintenance, abusive use or use contrary to the manufacturer’s instructions;
- damage caused by a commercial, professional or collective use of the article (the warranty validity will be reduced to six (6) months when the article is used professionally);
- damage resulting from an inappropriate packing and shipping of the article;
- all damage caused by modification, repair or alteration performed by a third party without written permission by Velleman®.
-
Articles to be repaired must be delivered to your Velleman® dealer, solidly packed (preferably in the original packaging), and be completed with the original receipt of purchase and a clear flaw description.
-
Hint: In order to save on cost and time, please reread the manual and check if the flaw is caused by obvious causes prior to presenting the article for repair. Note that returning a non-defective article can also involve handling costs.
-
Repairs occurring after warranty expiration are subject to shipping costs.
-
The above conditions are without prejudice to all commercial warranties.
The above enumeration is subject to modification according to the article (see article’s manual).
Made in PRC
Imported by Velleman nv
Legen Heirweg 33, 9890 Gavere, Belgium
www.velleman.eu
Documents / Resources
|
velleman VMA301 DS1302 Real Time Clock
Module
[pdf] User Manual
VMA301 DS1302 Real Time Clock Module, VMA301, DS1302, VMA301 Real Time Clock
Module, DS1302 Real Time Clock Module, Real Time Clock Module, Real Time
Clock, Real Time Module, Clock, Clock Module, Module
---|---
References
Read User Manual Online (PDF format)
Read User Manual Online (PDF format) >>