Voting resources, early voting, and poll worker information - VOTE. ... Adafruit is open and shipping.
0

Intermittent resets - only when pushing buttons
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Intermittent resets - only when pushing buttons

by madworm_de on Sat Sep 26, 2009 12:43 am

Hi,

I just built my clock ;-)

Compared to the Jyetech DSO from seeedstudio this was of recreational value.

One thing bugs me though. As the title says, the clock resets intermittently when I push the buttons. It first happened when I tried to increase the brightness, so I thought it might not get enough juice, but the 5V is stable. I feed it with 9V DC coming from a switching wall wart. Once I've set all settings and leave it alone it works. It also can't be a bad power plug, as nothing happens if I just wiggle it.

I didn't forget any capacitors and there are no shorts or bad solder joints. If you want pictures, here's the flickr set.

Hints to solve this are much appreciated.
NO LARDO CHIPS
madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 6:56 am

Re: Intermittent resets - only when pushing buttons

by madworm_de on Sat Sep 26, 2009 6:23 am

One thing I can exclude:

It's not caused by the ATmega168V-10PU chip I have. I switched it to an old 20MHz ATmega168 and the behaviour is exactly the same.

Now I'm trying to find glitches on the 5V line with my old scope, but I'm not confident I will be successful. It's got storage, but only 10MHz bandwidth and it is all analog and probably more than 30 years old. I doubt it was ever meant to do that job.
NO LARDO CHIPS
madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 6:56 am

Re: Intermittent resets - only when pushing buttons

by adafruit on Sat Sep 26, 2009 1:23 pm

did you reload the firmware?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Intermittent resets - only when pushing buttons

by madworm_de on Sat Sep 26, 2009 2:08 pm

Yes. I used the firmware available on the clock's make page for both chips.

But just to make it clear, the problem was present right from the beginning and I reflashed the chips only _after_ I switched them around.
NO LARDO CHIPS
madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 6:56 am

Re: Intermittent resets - only when pushing buttons

by adafruit on Sat Sep 26, 2009 3:59 pm


adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Intermittent resets - only when pushing buttons

by madworm_de on Sun Sep 27, 2009 9:08 pm

Does that refer to the delay 'bug' or the 'rare' bug ?

My next move will be evaluating the MCUSR and use the beeper to tell what caused the reset.
NO LARDO CHIPS
madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 6:56 am

Re: Intermittent resets - only when pushing buttons

by adafruit on Mon Sep 28, 2009 1:07 am

both

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Intermittent resets - only when pushing buttons

by mike31416 on Mon Sep 28, 2009 12:08 pm

I have the same problem and it seems to happen more when changing the brightness.

mike31416
 
Posts: 126
Joined: Wed Aug 26, 2009 12:06 pm

Re: Intermittent resets - only when pushing buttons

by adafruit on Mon Sep 28, 2009 12:28 pm

mike31416 wrote:I have the same problem and it seems to happen more when changing the brightness.


did you burn the firmware or is this from a kit?

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Intermittent resets - only when pushing buttons

by mike31416 on Mon Sep 28, 2009 3:12 pm

Did not reprogram, its the original kit.

mike31416
 
Posts: 126
Joined: Wed Aug 26, 2009 12:06 pm

Re: Intermittent resets - only when pushing buttons

by brain_recall on Wed Sep 30, 2009 6:32 pm

I just had this happen to me as well. I was setting the alarm, scrolling through hours fairly quickly, and it reset on me. The clock lost about 20 minutes, but otherwise it appears normal. I'm using the kit-supplied firmware. Is this likely from the delay overflow, or could this be something with the watchdog timer?
brain_recall
 
Posts: 14
Joined: Thu Aug 27, 2009 10:46 pm

Re: Intermittent resets - only when pushing buttons

by adafruit on Wed Sep 30, 2009 6:37 pm

not sure. the bug is sneaky

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Intermittent resets - only when pushing buttons

by mike31416 on Wed Sep 30, 2009 7:14 pm

Can you post the version of firmware that came with clock version 1.1? Maybe a few other sets of eyes looking over the code may help track it down.

Mike

mike31416
 
Posts: 126
Joined: Wed Aug 26, 2009 12:06 pm

Re: Intermittent resets - only when pushing buttons

by adafruit on Wed Sep 30, 2009 9:59 pm

good idea! :oops:
its there now

adafruit
 
Posts: 12151
Joined: Thu Apr 06, 2006 4:21 pm
Location: nyc

Re: Intermittent resets - only when pushing buttons

by madworm_de on Wed Sep 30, 2009 11:12 pm

Are you sure this is the right version ?

Code: Select all | TOGGLE FULL SIZE
 while (1) {
    //_delay_ms(100);
    kickthedog();

[...]

      switch(displaymode) {

[...]

      case (SET_BRIGHTNESS):
   displaymode = SET_VOLUME;
   display_str("set vol ");
   set_volume();
   break;
      case (SET_VOLUME):
   displaymode = SET_REGION;
   display_str("set regn");
   set_region();
   break;
   /*
      case (SET_REGION):
   displaymode = SET_SNOOZE;
   display_str("set snoz");
   set_snooze();
   break;
   */
      default:
   displaymode = SHOW_TIME;
      }
 
[...]


Maybe I wasn't looking hard enough, but I think the switch cases seem weird. Or is "displaymode" the mode _before_ the button event ?
... just forget it. It's too late over here.
NO LARDO CHIPS
madworm_de
 
Posts: 99
Joined: Mon Jun 09, 2008 6:56 am

Please be positive and constructive with your questions and comments.