Author Topic: Using the reset button  (Read 8012 times)

digi_guy

  • Jr. Member
  • **
  • Posts: 87
Using the reset button
« on: November 30, 2014, 10:41:51 am »
Got my Digispark Pro!

Has anyone used the reset button?  The pinout diagram says it is user programable but I can't find any example code. 

It says PA7 so I assumed pinMode(5, INPUT) would let me use it as an input but it retains the reset feature. 

How is it set to Reset, program, user button, or unused?

ej.cardinal

  • Newbie
  • *
  • Posts: 6
Re: Using the reset button
« Reply #1 on: December 04, 2014, 07:55:25 am »
I'm not sure about the DS Pro's chip, but from playing with other AVR chips I believe to use that port for something other than reset you need to reprogram a fuse (just search around). I'm also pretty sure that will mess with the bootloader.

If someone knows better, I'd love to hear it!

mybook4

  • Newbie
  • *
  • Posts: 12
Re: Using the reset button
« Reply #2 on: December 22, 2014, 06:00:28 pm »
I'm also interested in learning more about the reset switch. I would like to be able to use PA7 as another gpio pin.

defragster

  • Sr. Member
  • ****
  • Posts: 467
Re: Using the reset button
« Reply #3 on: December 23, 2014, 06:15:22 pm »
Search the Wiki and Forum for pointers and discussion - DigiSpark didn't have a reset pin and had it repurposed.

It is a different MCU so the details may be different from what you see - if you try anything and I'd suppose you'll own whatever happens for your efforts:

http://digistump.com/wiki/digispark/tutorials/programming

>>EDIT>> This is the PRO forum - and the Pro has a reset button.  The original Digispark did not and that was my reference here.  If the PRO hardware reset button can be reprogrammed - it hasn' been posted and then may have been a red herring on my part.

http://digispark.s3.amazonaws.com/DigisparkProDiagram2.png
« Last Edit: May 14, 2015, 10:35:54 pm by defragster »

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Using the reset button
« Reply #4 on: December 24, 2014, 01:04:49 pm »
Our final decision in production was to ditch the user programmable reset on the release firmware - we felt the user experience of a hard reset was better than that of a soft reset. Instead we will be offering a firmware upgrade in the near future that will allow you to "switch" your Pro to user programmable reset mode.

tozz88

  • Newbie
  • *
  • Posts: 15
Re: Using the reset button
« Reply #5 on: April 15, 2015, 12:05:11 am »
okay its like 5 months later. have you figured out the reset yet? when i bought this on kickstarter it was advertized it has a reset button. I would really really like to use it.

Tozz

digistump

  • Administrator
  • Hero Member
  • *****
  • Posts: 1465
Re: Using the reset button
« Reply #6 on: June 23, 2015, 02:08:19 pm »
@Tozz The button does work as a reset button out of the box

To use it as a standard button or digital pin (P13) you can use a AVR programmer (Arduino, USBASP, Digispark running littlewire, etc) to change the high fuse to 0x5F (though you'll need a HVSP to change it back if you decide you'd like the reset back)

To use it as a soft-reset you can watch for a button press on PIN 13 and then do a watchdog reset

Admittedly - this didn't turn out as we had originally planned in the Kickstarter - we hoped to have this be the default mode, but after feedback felt having the default be a hard reset made more sense, unfortunately, some features have to change from prototype/beta to final device.