I have a circuit and when I put a big capacitor (330uF) near the atmega, the atmega gets stuck after running for a while. When I discharge the capacitor the circuit works again for a while and then stops again. On oscylloscope, i saw that the circuit stops working after the capacitor charges.
If I take that capacitor out, the circuit works perfectly.
I have an atmega168 running at 8mhz, with external crystal, and in the board there are also shift-registers and uln2803 drivers to control a LED matrix.
Does anyone knows what's happening? The circuit is working, as I took the capacitor out, but I'd like to know what happened so i don't make the same mistake in future projects.
At AREF, it's just decoupling capacitor as in the datasheet... Anyway, I am not using the AD...
Maybe it's not the charging that makes it stop... I thought that was the reason, cause when I saw it discharged, the circuit worked again... it doesn't work too long by the way
Are you sure the cap is connected to where you think it is? What does the cap charge up to when it stops working?
Once VCC is over ~3.9 volts, the processor should just run, and if it continues to 5V it should not make a difference.
If the power supply has enough current, the cap should charge up almost immediately if it is actually connected to VCC.
the atmega, the 100n caps and the shift registers are smd... the capacitor itself is pth
I'm starting to think that the behavior after I discharge the capacitor is just a coincidence, and it's charging is not actually the reason of the problem...
Still it is difficult to explain this issue besides faulty wiring. Other than that I would check reset, power (including brown-out detection) and clock.
Stupid question, can you take the capacitor out of the circuit? Or change the program you're using to troubleshoot the problem?
If you're not sure if it's the capacitor or the software, changing one of them would be enough to determine that. Also, what's the voltage on the capacitor pins once it finishes charging?
I don't think the capacitor is defective, as I switched it and the problem wasn't solved...
bubulindo, I took the capacitor out of the circuit, and the problem never happened again. I'm just trying to understand what happend, so I don't make the same mistake again.
BenF, I also don't think that wiring problem. I soldered it, but it's a manucfatured board. Reset is right, and the brown-out detection is disabled. Also, I checked the 3v3 line after the system got stuck, and it's just fine... fixed at 3v3