Skip to content

ximtech/DS1307

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DS1307

STM32 Low Layer(LL) library. DS1307 serial real-time clock (RTC) is a low power, full binary-coded decimal (BCD) clock/calendar plus 56 bytes of NV SRAM.

image

Features

  • Power Supply from 3.3V to 5V DC
  • Completely Manages All Timekeeping FunctionsReal-Time Clock Counts:
    • Seconds
    • Minutes
    • Hours
    • Date of the Month
    • Month
    • Day of the Week
    • Year with Leap-Year Compensation Valid Up to 2100
  • 56-Byte, Battery-Backed, General-Purpose RAM with Unlimited Writes
  • I2C Serial Interface
  • Low Power Operation Extends Battery Backup Run Time
  • Consumes Less than 500nA in Battery-Backup Mode with Oscillator Running
  • Automatic Power-Fail Detect and Switch Circuitry

Add as CPM project dependency

How to add CPM to the project, check the link

CPMAddPackage(
        NAME DS1307
        GITHUB_REPOSITORY ximtech/DS1307
        GIT_TAG origin/main)

Project configuration

  1. Start project with STM32CubeMX:
  2. Select: Project Manager -> Advanced Settings -> I2C -> LL
  3. Generate Code
  4. Add sources to project:
add_subdirectory(${STM32_CORE_SOURCE_DIR}/I2C/Polling)  # add I2C dependency

include_directories(${includes} 
        ${DS1307_DIRECTORY})   # source directories

file(GLOB_RECURSE SOURCES ${sources} 
        ${DS1307_SOURCES})    # source files
  1. Then Build -> Clean -> Rebuild Project

Wiring

  • image

Usage

  • Usage example: link