HW-084A => DS3231

HW-084A IIC Module DS3231 High precision real time clock module without battery


13 ₪

الناشر: يوكتويوتا للقطع الالكترونية والصناعية

القسم: متحكمات

تاريخ النشر: 2021-02-03



Introduction

DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, and maintains accurate timekeeping when main power to the device is interrupted. The DS3231 highly accurate Real Time Clock which can maintain hours, minutes and seconds, as well as, day, month and year information. Also, it has automatic compensation for leap-years and for months with fewer than 31 days. The module can work on either 3.3 or 5 V which makes it suitable for many development platforms or microcontrollers. The battery input is 3V and a typical CR2032 3V battery can power the module and maintain the information for more than a year. The DS3231 real time clock module keeps track of the time even when the module is not powered. It has a built-in 3V battery which keeps updating the time. We will get the time and date from the RTC module using the library functions and then we will compare this time with the alarm time that we have set in the code.






Specification

- Highly Accurate RTC Completely Manages All Timekeeping Functions - Real-Time Clock Counts Seconds, Minutes, Hours, Date of the Month, Month, Day of the Week, and Year, with Leap-Year Compensation Valid Up to 2100 - Accuracy ±2ppm from 0°C to +40°C - Accuracy ±3.5ppm from -40°C to +85°C - Digital Temp Sensor Output: ±3°C Accuracy - Two Time-of-Day Alarms - Programmable Square-Wave Output Signal - Simple Serial Interface Connects to Most Microcontrollers - Fast (400kHz) I2C Interface - Battery-Backup Input for Continuous Timekeeping - Low Power Operation Extends Battery-Backup Run Time - 3.3V Operation






Pin Datasheet

*Power Pins: - VCC – this is the power pin. Since the RTC can be powered from 2.3V to 5.5V power, you do not need a regulator or level shifter for 3.3V or 5V logic/power. To power the board, give it the same power as the logic level of your microcontroller – e.g. for a 5V micro like Arduino, use 5V - GND – common ground for power and logic *I2C Logic pins: - SCL – I2C clock pin, connect to your microcontrollers I2C clock line. This pin has a 10K pullup resistor to Vin - SDA – I2C data pin, connect to your microcontrollers I2C data line. This pin has a 10K pullup resistor to Vin *Other Pins: - 32K – 32KHz oscillator output. Open drain, you need to attach a pullup to read this signal from a microcontroller pin - SQW – optional square wave or interrupt output. Open drain, you need to attach a pullup to read this signal from a microcontroller pin






Connecting to Arduino








DS3231 arduino library






Arduino Code

code
نسخ
اقتباس
عرض
تنزيل
	
								
#include <Wire.h> #include <ds3231.h> struct ts t; void setup() { Serial.begin(9600); Wire.begin(); DS3231_init(DS3231_CONTROL_INTCN); /*---------------------------------------------------------------------------- In order to synchronise your clock module, insert timetable values below ! ----------------------------------------------------------------------------*/ t.hour=12; t.min=30; t.sec=0; t.mday=25; t.mon=12; t.year=2019; DS3231_set(t); } void loop() { DS3231_get(&t); Serial.print("Date : "); Serial.print(t.mday); Serial.print("/"); Serial.print(t.mon); Serial.print("/"); Serial.print(t.year); Serial.print("\t Hour : "); Serial.print(t.hour); Serial.print(":"); Serial.print(t.min); Serial.print("."); Serial.println(t.sec); delay(1000); }





سلة المشتريات افراغ السلة