element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • 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 Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • 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
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • 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
Embedded and Microcontrollers
  • Technologies
  • More
Embedded and Microcontrollers
Pic Microcontrollers Forum 8 bit PIC with RTC chip.
  • Blog
  • Forum
  • Documents
  • Quiz
  • Polls
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Embedded and Microcontrollers to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 12 replies
  • Subscribers 190 subscribers
  • Views 2328 views
  • Users 0 members are here
Related

8 bit PIC with RTC chip.

asanyi
asanyi over 2 years ago

Hi, my circuit is composed from a PIC16F15345 microcontroller and a MCP79411 RTC chip, connected with i2c, it has an own 32.768 crystal. The 16F15345 also drives deprez meters and LEDs with PWM signals. While the power of the main circuit is switched off, the RTC runs correctly (precise timing) from its backup 3V battery. But activating the power of the PIC and the PWM driving, the RTC has lost its correct operation, delaying 30 minutes per 12 hour! Any idea to fix is accepted...

  • Sign in to reply
  • Cancel

Top Replies

  • michaelkellett
    michaelkellett over 2 years ago in reply to asanyi +2
    You will have far more success if you learn to plan and draw schematics. Even if freehand in your notebook they can be copied. What is a "deprez solenoids" MK
  • asanyi
    asanyi over 2 years ago in reply to ggabe +2
    Main power at normal operation, 5V: supplied the PIC VDD pin, supplied the MCP79411 RTC on pin8 VDD, supplied the anods of the LEDs. The deprez coil are drived from PWM pins of the PIC VIA NPN transistors…
  • michaelkellett
    michaelkellett over 2 years ago +1
    You need to show us the circuit diagram and ideally some pictures of the hardware. The kind of problem you describe is often caused by bad layout, inadequate power supply decoupling or ciruit errors…
Parents
  • michaelkellett
    michaelkellett over 2 years ago

    You need to show us the circuit diagram and ideally some pictures of the hardware.

    The kind of problem you describe is often caused by bad layout, inadequate power supply decoupling or ciruit errors.

    Without more information it is not possible to tell which, if any, is the cause here.

    MK

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Cancel
  • ggabe
    ggabe over 2 years ago in reply to michaelkellett

    Please explain how the backup battery and the USB power interacts. Beside the hardware, the I2C commands can mess with the timer. For example, if you have code that stops the timer then restarts, it can explain loosing the 30 second you’ve mentioned.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • asanyi
    asanyi over 2 years ago in reply to ggabe

    Main power at normal operation, 5V: supplied the PIC VDD pin, supplied the MCP79411 RTC on pin8 VDD, supplied the anods of the LEDs. The deprez coil are drived from PWM pins of the PIC VIA NPN transistors, the common other ends of the coils are on the 5V of main power. RTC backup (when the main power is switched off):   simple a 3V coin battery is connected to the RTC pin3, as the manual describes. The i2c communication must not disturb the time management of the RTC. The program: the RTC alarm is programmed in sec=0 match, so once per minute. The alarm pin7 of the RTC is connected to the INT pin of the PIC, it is prorammed for falling edge interrupt. When the once per minute interrupt occurs, the interrupt rutin reads the hour and minute timekeeping register of the RTC via i2c and clear the alarm flag. I think this is the regular way. Finally here is my nice schematic...image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Reply
  • asanyi
    asanyi over 2 years ago in reply to ggabe

    Main power at normal operation, 5V: supplied the PIC VDD pin, supplied the MCP79411 RTC on pin8 VDD, supplied the anods of the LEDs. The deprez coil are drived from PWM pins of the PIC VIA NPN transistors, the common other ends of the coils are on the 5V of main power. RTC backup (when the main power is switched off):   simple a 3V coin battery is connected to the RTC pin3, as the manual describes. The i2c communication must not disturb the time management of the RTC. The program: the RTC alarm is programmed in sec=0 match, so once per minute. The alarm pin7 of the RTC is connected to the INT pin of the PIC, it is prorammed for falling edge interrupt. When the once per minute interrupt occurs, the interrupt rutin reads the hour and minute timekeeping register of the RTC via i2c and clear the alarm flag. I think this is the regular way. Finally here is my nice schematic...image

    • Cancel
    • Vote Up +2 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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 © 2025 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