Let's Make Robots!

led stop blinking after disconnecting the programming cable


  I'am using Atmels ATtiny2313 microcontroller. Few days ago I was able to blink led after disconnecting the proframming cable. but now after disconnecting the programming the led stops blinking!!!!!!why???

Anyone Please help me why this happen????

Plzz help me!

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I'd say make sure to have a power indicator led(just so you know power is going to the proc after the programming cable is disconnected.)

 Like RF said, need a schematic and maybe some code to see whats goin on.

the code used to blink led!

I'am using AVR studio, and Ponyprog! 


/* Blinker Demo */


/* Include useful pre-defined functions */

#include <avr/interrupt.h>    // Defines pins, ports, etc to make programs easier to read

#define F_CPU 100000UL        // Sets up the default speed for delay.h

#include <util/delay.h>


int main()



  DDRD = _BV(PD4);         /* enable output on port D, pin 4 */





    PORTD = _BV(PD4);      // Turn PORT PD4 on

    _delay_ms(1000);       // Wait 1000 ms (1 sec)


    PORTD &= ~_BV(PD4);    // Turn PORT PD4 off

   _delay_ms(1000);        // Wait 1000 ms (1 sec)








Visually the code looks fine. It looks like it should run on any attiny proc, so I could try it on mine. I'm using the stk500 from sparkfun to do my programming. I don't have a 2313 specifically which may skew the results. I'll throw it on an attiny13 and 25 and maybe a 168(non arduino) as it has more closer related features.

13 and 25 work fine. I of course had to change from PD to PB since I've only got the port b pins.

Aside form that it worked without issue.

No pullup or pulldown resistors were used or needed.

Show us your schematic.

I guess you forget a pullup resitor on the reset line or something like that.



ya! I didn't put the resistor on the reset line, but before sometime I was able to blink led even after removing the programming cable! But now I'am not abl to blink led!!  I will put the pullup resisitor on the reset line!

  But what is pullup resistor!


A pullup resistor means a resistor connected between a processor pin and VCC. It may work without the resistor, but sometime not. An open reset pin is a potential candidate for malfunction. The processor may work for some time, or may reset some time or will never be wakeup from reset. The attached schematic shows the minimum external components for a ATtiny2313. The 100nF capacitor is also mandatory for proper operation. Should be placed as close as possible to the processor.


hey! you have showed that the reset pin is connected to Vcc through resistor.so the reset pin should be connected to Vcc,is it!
If you connect the reset pin directly to VCC, without the pullup resistor, your programmer cannot program the controller.

Thanks for help I'll try it!

and I'll let you know about it!


But that reset pin is connected to connector which is used to connect the programming cable. 

so is it that we have to pull resistor out during programming!

is it!