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
  • misaz
    misaz over 2 years ago

    Do your board follow general recommendations for crystals like following?

    • No component under crystal, only ground plane
    • Groud plane around crystal from all sides on the same layer
    • Traces to chip as short as possible and preferably both the same size
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
  • asanyi
    asanyi over 2 years ago in reply to misaz

    Thanks, the recommendations are clear, but to easy to realize on a prototype board, check the attached photo. So it is not the best one, additionally the RTC chip is soldered into a SOIC/DIP PCB. But similar layout worked well in other boards. Only if a PWM is running, I have the problem. Can be the root cause the interference between the frequency of the RTC osc (32.768 Hz) and the used PWM period=32msec (31.25kHz)? May I try with totally different PWM period?image

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

    Thanks, the recommendations are clear, but to easy to realize on a prototype board, check the attached photo. So it is not the best one, additionally the RTC chip is soldered into a SOIC/DIP PCB. But similar layout worked well in other boards. Only if a PWM is running, I have the problem. Can be the root cause the interference between the frequency of the RTC osc (32.768 Hz) and the used PWM period=32msec (31.25kHz)? May I try with totally different PWM period?image

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

    Is your PWM output on pin number 3?

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

    The PWM signals are generated by the PIC, as all together 4 PWMs I need: meter for hours, meter for minutes, LED backlight for hour meter, LED backlight for minutes meter (these are bright regulated depends on the lighting of the environment), I use the PWM3, PWM4, PWM5, PWM6 capability of the PIC16F15345, pin7, pin6, pin5, pin8. All PWM channels are running from TMR2, with same base period, but separatelly programmable duty%. This part works well, I have wondered that this small PIC has 6 PWM outputs.

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