attiny24 Startup Problem

Go To Last Post
5 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi all, i coded an application running on a attiny24.
The device is battery powered.

I left the reset pin floating since there is an internal pull up resistor in the chip. However sometimes when power is applied the program doesn't start. When the program start everything work as designed.

So i have to plug and unplug the battery a few time befor normal start.
I guess that some noise on the reset pin could cause a reset, but in this case the program should start again but instead it hang.

Any hint ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

How is the chip clocked? Internally or a crystal?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If you have a large capacitor on the input power (battery) you need a fast discharge path (for when you turn off) or just use small cap (1uF) otherwise the uC want reset properly, I had this issue recently, didn't need lots of capacitance so cut it right down so that it discharges through the supply impedance quickly at turn off.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@clawson : it is internally 8 Mhz clocked. I don't need accuracy in timing.

@Rfrost : I experimenting the same issue. I noticed that from a cold start it run properly but if i disconnect and reconnect power within one second it hang ... At first i was using 220 uF since the supply power come from a 12V battery to a 7805 regulator to generate 5 volt. Now i dropped the capacitance to 2,2 uF and the situation improved a lot. But not disappeared at all. I guess that the right way to overcome this problem would be to held the reset pin low throug a resistor to Vcc and a capacitance to ground in order to power properly the chip and then set reset high when capacitor is charged but the VCC transient switch has been already stabilized. You agree ?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

There are a few ways to ensure a good reset, normally the features of a reset circuit are combined with other supply supervision functions that today are included in the uC parts. If I am using a high voltage supply say a 12V, I like to have a early warning of the power failing so that there's plenty of time to close the application program before the power has gone altogether. Traditionally the R/C reset circuit was a good choice but with a capacitance discharge diode for when you turn off, otherwise you may still have to wait a while before turning on. Another good method is to use a specially design reset device like a Torex XC61 series device, these devices will hold the reset line low until power is up to good level. But to be honest the uC's reset circuitry should be enough, my recent design uses nothing on the reset pin but I did get a bit paranoid when I started to have problems with static electricity.