Author Topic: reset pin on attiny13a  (Read 3191 times)

0 Members and 1 Guest are viewing this topic.

Offline m.m.mTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ir
  • EE MSc Student and Hobbyist
reset pin on attiny13a
« on: June 27, 2014, 01:52:59 pm »
I know it's a frequent question but I found no answer for my application. can I connect a switch to the reset pin of an MCU and connect the other side of the switch to +5v supply and use the reset pin as input without disabling reset or low voltage ISP? I wanted to make a tiny IR remote for the lights.
25 y/o Electronics Lover
 

Offline XOIIO

  • Super Contributor
  • ***
  • Posts: 1625
  • Country: ca
Re: reset pin on attiny13a
« Reply #1 on: June 27, 2014, 02:25:22 pm »
I think you need to connect reset to ground, never used that chip myself though, but on everything I've using it is ground.

Offline wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: reset pin on attiny13a
« Reply #2 on: June 27, 2014, 02:42:12 pm »
You can't do that. So you must disable reset pin and use parallel or high voltage serial programming if you need to reprogram it. Otherwise it will work like normal reset and MCU will restart when you pull this pin to GND. What the point to connect other side of the switch to the +5V when you obviously can't pull down side of the switch which is connected to this pin.
 

Offline wraper

  • Supporter
  • ****
  • Posts: 16864
  • Country: lv
Re: reset pin on attiny13a
« Reply #3 on: June 27, 2014, 02:49:35 pm »
You can use attiny24 if want to keep low voltage ISP, It is very cheap and have 14 pins.
 

Offline m.m.mTopic starter

  • Regular Contributor
  • *
  • Posts: 105
  • Country: ir
  • EE MSc Student and Hobbyist
Re: reset pin on attiny13a
« Reply #4 on: June 27, 2014, 03:32:34 pm »
thank you both, nope I want to use this chip because of low pin count. can I add my desired code to the beginning of the program before the while (1) loop (for example send "turn off the first light" command) and connect the switch to ground in order to reset the chip whenever the switch is pressed and when is resets it restarts the whole program from the beginning and so turns it off?
I also won't replace the batteries much.
25 y/o Electronics Lover
 

Offline XOIIO

  • Super Contributor
  • ***
  • Posts: 1625
  • Country: ca
Re: reset pin on attiny13a
« Reply #5 on: June 27, 2014, 03:47:02 pm »
thank you both, nope I want to use this chip because of low pin count. can I add my desired code to the beginning of the program before the while (1) loop (for example send "turn off the first light" command) and connect the switch to ground in order to reset the chip whenever the switch is pressed and when is resets it restarts the whole program from the beginning and so turns it off?
I also won't replace the batteries much.

Yes, reset is basically a power cycle for the chip.

Offline jlmoon

  • Supporter
  • ****
  • Posts: 609
  • Country: us
  • If you fail the first time, keep trying!
Re: reset pin on attiny13a
« Reply #6 on: June 27, 2014, 03:55:08 pm »
Microchip makes some small footprint parts that you can wiggle a pin tied to INT0 and it will wake the chip out of deep sleep mode, the 24F part comes to mind (current is nill in this mode) and then it will execute code within your wake up blocks.

see http://ww1.microchip.com/downloads/en/DeviceDoc/39727a.pdf
for the details..
Recharged Volt-Nut
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf