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
Raspberry Pi
  • Products
  • More
Raspberry Pi
Raspberry Pi Forum PiFace RTC on Raspberry Pi2: still losing time on reboot!
  • Blog
  • Forum
  • Documents
  • Quiz
  • Events
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Raspberry Pi to participate - click to join for free!
Featured Articles
Announcing Pi
Technical Specifications
Raspberry Pi FAQs
Win a Pi
Raspberry Pi Wishlist
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Suggested Answer
  • Replies 24 replies
  • Answers 1 answer
  • Subscribers 688 subscribers
  • Views 3968 views
  • Users 0 members are here
  • clock
  • pi
  • rtc
  • raspberry_pi
  • raspberrypi
  • date
  • settings
  • piface
Related

PiFace RTC on Raspberry Pi2: still losing time on reboot!

Former Member
Former Member over 10 years ago

Hi!

 

I bought a PiFace RTC and I'm trying it on a Raspberry Pi 2 Model B. I followed the many guides I found on the internet, but I'm still having problem with the date: when I reboot, the system time is always set to Jan 1, 1970! It seems to be in a reset condition.

The I2C detects well the device at the address 0x6F, and the battery is ok.

After the execution of the .sh script as written in the PiFace RTC user guide, I set the actual date with "sudo date -s "12 jan 2016 10:30:00",

set the i2c module from raspi-config.

I triyed in so many ways but I really can't understand what I'm doing wrong!

 

Any idea would be appreciated!
Thanks,

 

Andrea.

  • Sign in to reply
  • Cancel
  • mconners
    0 mconners over 10 years ago in reply to Former Member

    After reading this and a couple of similar posts, I decided to try hooking up a similar device, the DS 1307, in the same manner. I wrote a blog about it here

     

    Enabling RTC on the Raspberry Pi 2

     

    Mike

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • Former Member
    0 Former Member over 10 years ago in reply to mconners

    Michael Conners ha scritto:

     

    After reading this and a couple of similar posts, I decided to try hooking up a similar device, the DS 1307, in the same manner. I wrote a blog about it here

     

    Enabling RTC on the Raspberry Pi 2

     

    Mike

    Thanks Mike, this is very interesting and well described! My rtc device has a MCP7940N onboard. Can I ask you which particular RTC commercial board with the DS1307 did you used in your guide?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mconners
    0 mconners over 10 years ago in reply to Former Member

    laser srl wrote:

     

    Thanks Mike, this is very interesting and well described! My rtc device has a MCP7940N onboard. Can I ask you which particular RTC commercial board with the DS1307 did you used in your guide?

     

    I tried to figure out the manufacturer the other day and I can not remember where I purchased it. There is a good chance it's a Chinese board I bought from ebay. Adafruit sells a kit, but I'm not sure where the best source for you would be in Europe.

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mconners
    0 mconners over 10 years ago in reply to Former Member

    Looking at your post above, I noticed one of the lines in your rc.local has

     

    1. echo mcp7941x 0x6f > /sys/class/i2c-dev/i2c-1/device/new_$  

     

    does it really have a $ at the end? Is that valid? The examples I've seen, and a code snippet I found for the I2C driver, said new_device

     

    in fact in my example on my blog post, I had

     

    echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-1/new_device

     

    notice, there is a difference

    /sys/class/i2c-adapter

    vs

    /sys/class/i2c-dev

     

    although I see that both exist on my pi

     

    I'd also consider commenting out the calibrate line in the rc.local

     

    Mike

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
<
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