Microcontroller atmega 8 only works when i reset it

Thread Starter

orlandoperalta23

Joined Oct 22, 2015
14
Hi, how are you.

Excuse by my bad english

I have been working on two PCBs that are very similar. They have a microcontroller and a radio frequency module for transmitting wirelessly.

Now, the problem that I have is that once the programming of micro do, this works well. But if I turn off and turn on the system stops working and just do it again when I put the programmer reset pin on the reset pin of the micro. After this, I can remove the link above and follow everything working ... until I return to turn off.

Do you know this is due and that could make for solving this problem? I thought of placing a 1k resistor between reset microcontroller pin and ground ... not if it would work and I have not, for fear of doing worse damage.

If anyone knows the answer, I would be very grateful.

See you soon ...
 

Papabravo

Joined Feb 24, 2006
21,225
The ATmega8 datasheet is here.
http://www.atmel.com/images/atmel-2486-8-bit-avr-microcontroller-atmega8_l_datasheet.pdf

As you can clearly see from page 5 of the datasheet pin PC6 may or may not be an active low RESET input depending on a configuration fuse. If it is a RESET, then a resistor to GND will hold the processor in reset until the end of time. I assume this is not the behavior you are looking for. Please read the datasheet in excruciating detail for information on how to handle the RESET pin. I'm surprised you got as far as you did without reading the datasheet. Were you really expecting this complex system to work the first time, out of the box, without any effort on your part?
 

Thread Starter

orlandoperalta23

Joined Oct 22, 2015
14
Thanks for your answers

Papabravo, you made me remember this scene:
.

Of course I´ve done other test in this process. I started mounting the circuit in a breadboard. I wrote the code, by myself. And I´ve worked with the atmega8 long time ago, so I read the datasheet, focus in important information for my projects.

Now, the circuit in breadboard works fine... no problem when I turn off the circuito or with reset pin. For this reason I had not read this section.

In this moment, I´m seeing that to configure the reset pin as a I/O pin (can this fix my problem?) is necesary to program the RSTDISBL fuse, but this is a almost irreversible process (unless you have a High Voltage Programmer, which I don’t have).

I put a 10k resistor between Vcc and Reset pin (as suggested in this other forum: http://electronics.stackexchange.co...-circuit-only-works-when-connected-to-avr-isp)... but the problem still.

So, my question is if burn the RSTDISBL fuse to configure the reset pin as a I/O pin can fix my problem, or what else can I do to make it work?

Thanks again for your time. ISB123, I attached the schematic

Captura de pantalla 2016-01-31 23.35.57.png
 

DickCappels

Joined Aug 21, 2008
10,169
DON'T BURN THE RSTDISBL FUSE or you will be sorry.

RST pin: 0.047 uf or 0.1ceramic capacitor to ground, 10k to +5.
VCC pin: The 100 uf is ok, but add 0.1 uf to ground.

Keep leads to the capacitors mentioned above short.

Make sure the RES pin connection going to the ISP connector is not very long and does not go close to any noise sources.

Enable brownout detection.

Ensure that the power supply drops to well below the brown-out detection voltage -it might need some sort of bleeder.
 
Top