Git Product home page Git Product logo

Comments (5)

SV-Zanshin avatar SV-Zanshin commented on June 14, 2024

Let me dig up a MCP7940 to see if I can reproduce the problem. Which MCP are you using and on which Arduino processor (perhaps that might play a role in causing the problem).

from mcp7940.

StoneyStu avatar StoneyStu commented on June 14, 2024

Hi,

I'm using an Arduino Micro so 32U4 processor and an MCP7940N RTC.
My application also uses interrupts in the main loop to read a data line
and I was wondering if that might be part of the problem.

Thanks for having a look at this.

Stuart

from mcp7940.

SV-Zanshin avatar SV-Zanshin commented on June 14, 2024

I've got both of those (the Micro and MCP7940N) and will check it tonight. Any time when one programs with interrupts and experiences "hangs" there is a good chance that it is due to that. You might try to use the LED to show that the interrupt is being fired "(digital.write(!digital.read(13));" or use the LED in the MCP7940.adjust() code.
I do seem to remember that I had some issues with the adjust() but can't remember if it was hanging or invalid values.

from mcp7940.

StoneyStu avatar StoneyStu commented on June 14, 2024

Hi,
Before you spend any more time on this, I think the freezing problem is solved.
Although I claimed the adjust() was being called in the main loop, it was actually being called
at the end of an ISR used to detect the last button press of a time/date set menu function.
Of course an ISR isn't the place for this call, and it now seems to work using a flag so that
the function invoked back the main loop to set the time/date on the 7940.
Will do some more testing but I think it's now ok.
thanks for your help.

from mcp7940.

SV-Zanshin avatar SV-Zanshin commented on June 14, 2024

I've got a non-Micro Arduino setup with the MCP7940N and used multiple calls to adjust() with no problems, so I think that you've most likely found the problem. I'll close this issue but don't hesitate to open a new one if necessary.

from mcp7940.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.