Whadda DS1302 Скачать руководство пользователя страница 3

 

 

 
 

 3 

 

What is Arduino® 

 

 

Arduino

®

 is an open-source prototyping platform based on 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). Additional shields/modules/components are required for reading a twitter 
message or publishing online. Surf to 

www.arduino.cc

 for more information. 

Product 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. 

Specifications 

 

 

 

power supply: 1 x CR2032 (included) 

 

 

TTL compatible: VCC = 5 V 

 

 

temperature range: 0 °C to +70 °C 

Features 

 

 

 

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 

 

 

31 x 8 battery-backed general-purpose RAM 

 

 

simple serial port interfaces to most microcontrollers: simple 3-wire interface 

 

 

single-byte or multiple-byte (burst mode) data transfer for read or write of clock or 

RAM data 

 

 

low power operation extends battery backup run time: 2.0 V to 5.5 V full operation 

 

 

uses less than 300 µA @ 2.0 V 

Содержание DS1302

Страница 1: ...USER MANUAL EN DS1302 real time clock module WPI301 whadda com ...

Страница 2: ...sons 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 General Guidelines Refer to the Velleman Service and...

Страница 3: ...1 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 Specific...

Страница 4: ...round 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 gr...

Страница 5: ... the larger of VCC1 or VCC2 When VCC2 is greater than VCC1 0 2 V VCC2 powers the WPI301 When VCC2 is less than VCC1 VCC1 powers the WPI301 GND Ground Example Before being able to use the sample program an additional library needs to be installed Go to Sketch Include Library Manage Libraries Put DS1302 in the search bar and install the RTC library by Makuna should be the first result ...

Страница 6: ...ude ThreeWire h include RtcDS1302 h ThreeWire myWire 6 7 5 IO SCLK CE RtcDS1302 ThreeWire Rtc myWire void setup Serial begin 57600 Serial print compiled Serial print __DATE__ Serial println __TIME__ Rtc Begin RtcDateTime compiled RtcDateTime __DATE__ __TIME__ printDateTime compiled Serial println Rtc SetDateTime compiled if Rtc IsDateTimeValid Common Causes 1 first time you ran and the device wasn...

Страница 7: ...RTC is newer than compile time this is expected else if now compiled Serial println RTC is the same as compile time not expected but all is fine void loop RtcDateTime now Rtc GetDateTime printDateTime now Serial println if now IsValid Common Causes 1 the battery on the device is low or even missing and the power line was disconnected Serial println RTC lost confidence in the DateTime delay 10000 t...

Страница 8: ...8 snprintf_P datestring countof datestring PSTR 02u 02u 04u 02u 02u 02u dt Month dt Day dt Year dt Hour dt Minute dt Second Serial print datestring ...

Страница 9: ...9 whadda com Modifications and typographical errors reserved Velleman Group nv WPI301_v01 Velleman Group nv Legen Heirweg 33 9890 Gavere ...

Отзывы: