Octopus Real-time Clock

From ELECFREAKS-WIKI
Jump to: navigation, search

Introduction

Octopus Electronic Bricks, you can use them build electronics projects just as easy as piling bricks. By using Octopus electronic bricks, you may connect Arduino/Freaduino compatible boards easily with various digital, analog and I2C/Uart interfaces. These the breadboard-less firm connection are prepared to extensive modules like poteniometers, sensors, relays, servos…even buttons, just plug and play.

OCTOPUS Real-time Clock is a clock module which can achieve counting for year, month, day, hour by using the DS1307 clock chip.This chip has lots of merits, low power supply, with 56 bytes of non-volatile RAM clock calendar full BCD code real-time clock chip, the address and data via a two-wire bidirectional serial bus transmission, providing seconds, minutes, hours and other information , automatically adjusting the number of days in each month. And more surprisingly, the chip also equip with the function of leap year compensation. Chip has a built-in power-sense circuit, brownout detection, and battery switching function.

Connecting types:G-GND V-VCC SDA-A4 SCL-A5 RST(Pin5 is a square wave output interface. In order to provide more convenience for customers, we design a LED in the board to indicate whether the square waves output or not. If the LED is on, square waves output, which means IC is in normal operating state. Therefore, this interface has no practical effect. Of course, if you want to see the square wave output on an oscilloscope , you can make it connected).

Octopus Real-time Clock A.JPG Octopus Real-time Clock B.jpg

Model: EF04005

Feature

  • Available for counting the seconds, hours, minutes, days of month, months, days of week
  • With the function of leap year compensation.
  • Year recording to the limit of 2100.
  • 56 bytes of non-volatile RAM
  • Two-wire serial interface (IIC communication)
  • Programmable square-wave output
  • Automatic power-off detection and switching circuit
  • In battery backup mode, power consumption is less than 500nA
  • Industrial operating temperature: -40 to 80
  • Power supply needs: 5V and 3.3V
  • Interface type: Digital
  • Pin Definition: 1-GND 2-VCC 3-SCK 4-SDA 5-RST

Schematic

Octopus Real-time Clock D.JPG


Soil-OB-05.jpg

Specification

Pin definition and Rating

GND VCC Signal
GND VCC Signal

Usage

  • 3P buckled wires connector

Soil-OB-07.jpg


Hardware Installation

OCTOPUS Real-time Clock (DS1307).jpg


Programming


Includes important code snippet. Demo code like :

<syntaxhighlight lang="php">

  1. include <WProgram.h>
  2. include <Wire.h>
  3. include <DS1307.h>

int rtc[7]; int ledPin = 13; void setup() {

 DDRC|=_BV(2) |_BV(3);  // POWER:Vcc Gnd
 PORTC |=_BV(3);  // VCC PINC3
 pinMode(ledPin, OUTPUT);  
 Serial.begin(9600);
 RTC.stop();
 RTC.set(DS1307_SEC,1);
 RTC.set(DS1307_MIN,57);
 RTC.set(DS1307_HR,17);
 RTC.set(DS1307_DOW,2);
 RTC.set(DS1307_DATE,18);
 RTC.set(DS1307_MTH,1);
 RTC.set(DS1307_YR,10);
 RTC.start();

}

void loop() {

 RTC.get(rtc,true);
 for(int i=0; i<7; i++)
 {
   Serial.print(rtc[i]);
   Serial.print(" ");
 }
 Serial.println();

digitalWrite(ledPin, HIGH); delay(500); digitalWrite(ledPin, LOW); delay(500); }

</syntaxhighlight>

Example

The projects and application examples.

Octopus Real-time Clock C.jpg


OB.jpg

Soil-OB-06.jpg



SHD IOE01 6.jpg


PushButtonS-07.jpg

Version Tracker

Revision Descriptions Release
v1.0b Initial public release date

Bug Tracker

Bug Tracker is the place you can publish any bugs you think you might have found during use. Please write down what you have to say, your answers will help us improve our

products.

Resources

How to buy

Click here to buy: http://www.elecfreaks.com/estore/octopus-real-time-clock.html

See Also

Other related products and resources.

Licensing

This documentation is licensed under the Creative Commons Attribution-ShareAlike License 3.0 Source code and libraries are

licensed under GPL/LGPL, see source code files for details.

External Links

Links to external webpages which provide more application ideas, documents/datasheet or software libraries