Pages: [1]   Go Down
Author Topic: Yet another crash  (Read 1016 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

3 in one day?  Completely unrelated.  The clock keeps getting slower and slower until it stops.  I can tell because my code uses delay() to make beeps.  Some of the values in () are hard coded constants.  Still they slow down from 1khz to 1hz clicks.  This one is repeatable.  I would post my code but it would take you much time to find the problem.  I have 2 arrays but I'm very careful about going out of bounds.  No pointers.  Not using 2k.  How else can I effect the clock?  Instead of solving this specific problem, I'd like to learn in general what are the possible causes of this.  The slow down occurs over a minutes time.  After I have sped up my program 100x to test for something like this by changing the innermost delay.  It happens about 10 minutes in, which would be 1000 min in normal speed.  After we have discussed in general how this could happen, I will post my code if anyone wants to read it.  Thank you for listening!
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1918
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The only reason I can think of is interrupts. Do you use them?

Best regards
Jantje

PS
Quote
If you fall... I'll be there for you!
-Floor
great footer  smiley
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Grand Blanc, MI, USA
Offline Offline
Faraday Member
**
Karma: 95
Posts: 4084
CODE is a mass noun and should not be used in the plural or with an indefinite article.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Of course "post your code" is the usual mantra but there is a point here when there are hundreds or thousands of lines of code, multiple modules, etc. Might be a bit much to expect people to wade through.

What I usually do in such a situation is start paring down the code to the bare minimums, find the smallest (or reasonably small) program that still exhibits the symptom.

Sometimes the problem is discovered along the way, and if not, I have a much more concise program that I can post!
Logged

MCP79411/12 RTC ... "One Million Ohms" ATtiny kit ... available at http://www.tindie.com/stores/JChristensen/

Offline Offline
Edison Member
*
Karma: 8
Posts: 1341
If you're not living on the Edge, you're taking up too much space!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Interesting, the same code doesn't do this, on different hardware.  Uno vs Pro.
Logged

If you fall... I'll be there for you!
-Floor

Skype Brighteyes3333
(262) 696-9619

Belgium
Offline Offline
Edison Member
*
Karma: 68
Posts: 1918
Arduino rocks; but with my plugin it can fly rocking the world ;-)
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

It's not clear to me whether your  problem exists on the pro or the uno.
if you only have it on the pro you may run out of memory space. Do you have memory leakage?
do you run the pro on 3.3 or 5 volts?
Best regards
Jantje
Logged

Do not PM me a question unless you are prepared to pay for consultancy.
Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -

Pages: [1]   Go Up
Jump to: