I've got a very simple circuit (as you can see from the diagram below) with an ATTiny45 and a piezo buzzer. Everything worked great as I was testing it out and had the ISP (an AVR ISP MkII) attached. The piezo played the little tune it was supposed to, every thing was fine. But when I disconnected the ISP from the ICSP header everything goes haywire. The speaker just kind of constantly stutters. It almost seems like make it's constantly resetting but I'm not sure why. I tried placing a resistor between VCC and RESET to make sure it's pulled high, but that has no effect. I've also checked everywhere and there's no shorts that shouldn't be there.

Any thoughts of what the AVR ISP has that my circuit doesn't and obviously needs?


simulate this circuit – Schematic created using CircuitLab

  • \$\begingroup\$ Check your clock fuse settings. Check if the ATTiny is set for external clock source, and if the AVR ISP is providing such a clock. Set the clock fuses to use the internal RC oscillator of the ATTiny. \$\endgroup\$ Jul 18, 2013 at 14:06
  • \$\begingroup\$ Did you measure supply voltage? \$\endgroup\$
    – jippie
    Jul 18, 2013 at 14:57
  • 1
    \$\begingroup\$ While it may not be your problem, an 8 ohm speaker on an output pin is an absurdly heavy load... perhaps with the lack of a supply bypass cap as mentioned by vicatcu that could be causing self-reset or similar. \$\endgroup\$ Jul 18, 2013 at 15:43
  • \$\begingroup\$ It's running at an internal 1MHz, but I'll try burning the fuses again, just in case. Supply voltage measured by both my bench supply and multimeter is 3.2V (haven't actually used the batteries yet, but it's the same voltage). It's not actually an 8 ohm speaker, it's a little piezo buzzer. There wasn't a piezo symbol. Should have clarified. \$\endgroup\$
    – Adam Haile
    Jul 18, 2013 at 17:31

1 Answer 1


You don't have a 10 kohm pullup resistor to VCC on RESET and you don't have a 100nF capacitor between VCC and GND pins of the ATtiny45. Start there.

  • \$\begingroup\$ I've done a bunch of circuits that have neither of those things... guess I just got lucky. I'll give it a shot. \$\endgroup\$
    – Adam Haile
    Jul 18, 2013 at 17:33
  • \$\begingroup\$ Wonder why the ISP would be fixing it though... \$\endgroup\$
    – Adam Haile
    Jul 18, 2013 at 17:39
  • \$\begingroup\$ Could it be because I'm using 3V instead of 5V? Been looking around online and have been hard pressed to find an ATTinyX5 circuit that uses the resistor and cap. I don't doubt that it helps... I always use it on the ATMega, but just trying to figure out what makes mine different. This is the first time I've used it at 3V \$\endgroup\$
    – Adam Haile
    Jul 18, 2013 at 19:08
  • \$\begingroup\$ Maybe as the piezo tries to make noise it draws too much current and the voltage fluctuates? I noticed it does draw a decent amount of power when using the piezo. \$\endgroup\$
    – Adam Haile
    Jul 18, 2013 at 19:13
  • \$\begingroup\$ Yup, circuit needed a cap. Threw in the resistor for good measure. The piezo was drawing ~17mA, which being at the high end of the IO limit probably was making the voltage fluctuate. Thanks! \$\endgroup\$
    – Adam Haile
    Jul 19, 2013 at 2:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.