Led stop blinking after disconnecting the programming cable

Hii!!

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!

Hii!! I’am using Atmels

Hii!!

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!

Show us your schematic.I

Show us your schematic.

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

 

 

Could you have…possibly?
I hate to sound like a microsoft help line person, but is your power connected? Some MCUs can run off of usb juice alone. Got batteries connected?

I’d say make sure to have a

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

the code used to blink led!

I’am using AVR studio, and Ponyprog!

/* Blinker Demo /<o:p></o:p><o:p> </o:p>/ Include useful pre-defined functions /<o:p></o:p>#include <avr/interrupt.h> // Defines pins, ports, etc to make programs easier to read<o:p></o:p>#define F_CPU 100000UL // Sets up the default speed for delay.h<o:p></o:p>#include <util/delay.h><o:p></o:p><o:p> </o:p>int main()<o:p></o:p>{<o:p></o:p><o:p> </o:p> DDRD = _BV(PD4); / enable output on port D, pin 4 */<o:p></o:p> <o:p></o:p> while(1)<o:p></o:p>{<o:p></o:p><o:p> </o:p> PORTD = _BV(PD4); // Turn PORT PD4 on<o:p></o:p> _delay_ms(1000); // Wait 1000 ms (1 sec)<o:p></o:p><o:p> </o:p> PORTD &= ~_BV(PD4); // Turn PORT PD4 off<o:p></o:p> _delay_ms(1000); // Wait 1000 ms (1 sec)<o:p></o:p> <o:p></o:p><o:p> </o:p> }<o:p></o:p><o:p> </o:p> return(0);<o:p></o:p>}<o:p></o:p><o:p> </o:p>

pullup resistor!

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

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.

attiny2313-min.jpg

Thanks for help I’ll try

Thanks for help I’ll try it!

and I’ll let you know about it!

Thanks!

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!

 

<v:shapetype coordsize=“21600,21600” o:spt=“75” o:preferrelative=“t” path=“m@4@5l@4@11@9@11@9@5xe” filled=“f” stroked=“f” id="_x0000_t75"> <v:stroke joinstyle=“miter”></v:stroke><v:formulas><v:f eqn=“if lineDrawn pixelLineWidth 0”></v:f><v:f eqn=“sum @0 1 0”></v:f><v:f eqn=“sum 0 0 @1”></v:f><v:f eqn=“prod @2 1 2”></v:f><v:f eqn=“prod @3 21600 pixelWidth”></v:f><v:f eqn=“prod @3 21600 pixelHeight”></v:f><v:f eqn=“sum @0 0 1”></v:f><v:f eqn=“prod @6 1 2”></v:f><v:f eqn=“prod @7 21600 pixelWidth”></v:f><v:f eqn=“sum @8 21600 0”></v:f><v:f eqn=“prod @7 21600 pixelHeight”></v:f><v:f eqn=“sum @10 21600 0”></v:f></v:formulas><v:path o:extrusionok=“f” gradientshapeok=“t” o:connecttype=“rect”></v:path><o:lock v:ext=“edit” aspectratio=“t”></o:lock></v:shapetype><v:shape alt=“How to get started with microcontrollers - Part 1” type="#_x0000_t75" style=“width: 450pt; height: 282.75pt” id="_x0000_i1025"><v:imagedata o:href=“http://metku.net/articles/microcontroller-part-1/attiny25_testboard_1.png” ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

 

You don’t need to pull out

You don’t need to pull out the resistor during programing. The programmer can pull down the reset line in any case.

 

Visually the code looks
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.

ok. Thamks!
ok. Thanks!

hey! you have showed that
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!

13 and 25 work fine. I of

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.

If you connect the reset pin
If you connect the reset pin directly to VCC, without the pullup resistor, your programmer cannot program the controller.

L293d and ATtiny2313

Can you help to use the motor driver L293d (I have bought) with ATtiny2313 and control direction of motors. Give me simple code and schematic circuit.

Please!