element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet & Tria Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • About Us
    About the element14 Community
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Japan
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      •  Vietnam
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Freedom development platform
  • Products
  • Dev Tools
  • Freedom development platform
  • More
  • Cancel
Freedom development platform
Documents Codewarrior Tutorial for FRDM-KL25Z & ARDUINO : Processor Expert Maxim I2C RTC for the Data Logger Shield
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Freedom development platform to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Engagement
  • Author Author: FreescaleTools_and_Software
  • Date Created: 7 Jan 2013 3:38 PM Date Created
  • Last Updated Last Updated: 12 Mar 2013 6:17 PM
  • Views 818 views
  • Likes 0 likes
  • Comments 0 comments
Related
Recommended

Codewarrior Tutorial for FRDM-KL25Z & ARDUINO : Processor Expert Maxim I2C RTC for the Data Logger Shield

This tutorial was extracted from Erich Styger blog http://mcuoneclipse.wordpress.com with his agreement.

   

image image

   

There was one part missing to complete the software support for my Arduino DataLogger Shield on top of my Freescale FRDM-KL25Z Freedom boardFreescale FRDM-KL25Z Freedom board: support for the Maxim DS1307 RTC (Real Time Clock).

   

image

DS1307 on the Adafruit Data Logger Shield (Source: http://www.ladyada.net/make/logshield/design.html)

   

  

Things got delayed a bit, as I first needed to get the I2C infrastructure up and running (see this post). But finally, I have things working :-) . I proudly present: RTC_Maxim!

    

   

Maxim I2C Real Time Clocks

 

The component now supports two different Maxim I2C Realtime Clocks: the DS3232 and the DS1307.

  

The DS1307 present on the Adafruit Data Logger Shield:

  

image

DS1307 on the Arduino Data Logger Shield, on top of the FRDM-KL25Z

  

   

The DS3232 is a device I have used in many of my designs:

 

image

DS3232 on custom Tower Board

 

 

For ‘classic’ (non-LDD) Processor Expert, there has been a component (RTC_I2C_DS1307) for the DS1307 with my custom extensions for the DS3232. But as with many other things: these ‘classic’ components do not work for Kinetis, as with Kinetis there are LDD (Logical Device Driver) components, and they are not compatible. That’s why I ended up implementing my own RTC_Maxim component which works both for the LDD and non-LDD world (see as well this post).

 

 

RTC_Maxim Processor Expert Component

 

The component takes advantage of the GenericI2C component.

 

image

Properties of the RTC_Maxim Processor Expert component

 

 

As ‘Device’ either the DS3232 or the DS1307 can be selected. The component features an optional Shell interface (ParseCommand()) to the FSShell. Beside of this, it features the usual functions to get/set date and time:

 

image

Methods of the RTC_Maxim Processor Expert component

 

 

The Read() and Write() methods are used to to access the device non-volatile memory and registers.

 

 

Limitations

 

The component now only supports date and time functions, plus access to the device non-volatile RAM. Support for the other features (temperature sensor, alarm functions, oscillator output, etc) would be a topic for further work. Maybe somebody volunteers to extend the current functionality ?

 

 

Component Sources

 

The component (and sources) can be downloaded from this link: RTC_Maxim.

The FSShell and FAT_FileSystem components have been updated as well with new interfaces.

 

Happy Maximing :-)

  • avr
  • cortex-m0+
  • freescale
  • kinetis
  • cortex
  • frdm-kl25z
  • stm32
  • kinetis-l
  • cortex-m0
  • arm
  • arduino
  • freedom
  • pic
  • Share
  • History
  • More
  • Cancel
  • Sign in to reply
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2026 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube