Solved: atmega328p Pro mini strange behaviour

Go To Last Post
6 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I screwed up, and in error, I connected my usbasp programmer to a circuit containing an atmega328p Pro mini board that was running on two AA batteries.

The usbasp supplies voltage (5V) to the circuit. 

There is an led on PD4 in the circuit. Cathode is connected to PD4, anode contains a 1K resistor to VCC. The led is always on as soon as power is applied.

The code no longer works.  I even tried a simple blinky code, nothing is working. Funny thing, I can program it, it verifies, fuses are ok,

just code does not work and LED is always on. 

I don't care about the $3 board, I would just like to know what could have happened to the mcu and how to prevent it in future.

(like maybe a protection circuit of some kind)

It is a big deal to remove the board, the circuit is very delicate and I would rather not if I can help it

or perhaps salvage the board. I know if I remove the board from the main board, I'll be replacing themain board or doing some trace patching!

Curious to know what happened.

Anyone have any ideas?

Last Edited: Tue. Nov 12, 2019 - 10:33 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

It sounds like PD4 is now a permanent short to ground.

Ross McKenzie ValuSoft Melbourne Australia

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If the USBASP supplied +5 to the system's Vcc bus, then the whole AVR system would have been running at that +5 Vcc.  Which is within AVR's voltage range.  The only items that might have been damaged should have been the batteries.  They were putting out ~+2.9V and were receiving +5 being sent into them.  If anything, the internal chemicals of the batteries would have had their voltage-generating reaction reversed, and would have been "recharged" slightly.

 

However, if the USBASP was not supplying Vcc, but instead supplying only the programming signals (MISO, MOSI, SCK, Reset), then this could have caused damage to the AVR.  The anode would be at +5V and the cathode at +3Vcc, resulting in the LED being on even when PD4 was not active (low).

 

Is PD4 the only pin that is not working?  If the LED and resistor is placed on another pin, and the code (which still loads) adjusted for that other pin, does the LED blink?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

thanks,

the fact that i can program and verify the fuses, flash and eeprom should indicate the chip is fine?

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Simonetta wrote:

If the USBASP supplied +5 to the system's Vcc bus, then the whole AVR system would have been running at that +5 Vcc.  Which is within AVR's voltage range.  The only items that might have been damaged should have been the batteries.  They were putting out ~+2.9V and were receiving +5 being sent into them.  If anything, the internal chemicals of the batteries would have had their voltage-generating reaction reversed, and would have been "recharged" slightly.

This was done briefly only while programming, and not left connected.

 

Simonetta wrote:

Is PD4 the only pin that is not working?  If the LED and resistor is placed on another pin, and the code (which still loads) adjusted for that other pin, does the LED blink?

I have to investigate. I took a step back today because I dreaded having to remove the board, (the connections are underneath the small board which will need to be cut)

I will just attach another led and resistor to another pin.

I am hoping the board will not have to be removed.

I will let you know. 

thanks

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So i figured out the very small MLF pkg was not making a good connection (sometimes).

If I press down on the chip, it works. 

So far I have two of these defective little boards (out of five) that caused me to pull my hair out!

The other one, the crystal wasn't making a good connection, I had to wire one of the crystal pins directly to the very small capacitor.

I should have known the price was low for a reason.

From now on I will buy the TQFP ones, at least you can see the pins and fix the obvious problem.

 

Thanks to everyone for responding to my post.