Comments (5)
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.
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.
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.
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.
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)
- Observation about calibrate... HOT 3
- ppm out of range HOT 2
- Battery backup not working if power to micro-controller is cut HOT 3
- Cancel a setAlarm HOT 7
- ATmega328PB & MiniCore incompatible?? HOT 3
- How to obtain power failure date/hour HOT 1
- hello guys, HOT 17
- Change source code formatting to adhere to standards HOT 1
- Add a new example program for MCP7940N power fail HOT 1
- Optimize c++ code HOT 1
- Add a regression test example program HOT 1
- How can i get number of seconds since Epoch HOT 3
- DateTime(0) doesn't resolve correctly to the epoch HOT 5
- Question about int8_t MCP7940_Class::calibrate(const int8_t newTrim)... HOT 4
- Working with ESP chips HOT 4
- RPI2040 using Wire1 instead of Wire
- readRAM has wrong return type
- Wire.begin() is not called if ESP8266 is not defined
- How do i set the MFP pin to 1 ? (and no square wave)
- Weekday changes after deviceStart causing alarm to not work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mcp7940.