Bad 328P?

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

I'm trying to upload an Arduino program to a 328P using a Sparkfun USBTinty -- it's worked for me before as has this chip.

 

I'm pretty certain that the chip is bad, but I wondered if I'm missing anything.

 

Now I get an error using both the Ard export and AVRdude.

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "qk_file_batt.ino.standard.hex"
avrdude: input file qk_file_batt.ino.standard.hex auto detected as Intel Hex
avrdude: writing flash (16054 bytes):

Writing | ################################################## | 100% 50.86s

avrdude: 16054 bytes of flash written
avrdude: verifying flash memory against qk_file_batt.ino.standard.hex:
avrdude: load data flash data from input file qk_file_batt.ino.standard.hex:
avrdude: input file qk_file_batt.ino.standard.hex auto detected as Intel Hex
avrdude: input file qk_file_batt.ino.standard.hex contains 16054 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 27.11s

avrdude: verifying ...
avrdude: verification error, first mismatch at byte 0x0780
         0x0e != 0x8a
avrdude: verification error; content mismatch

avrdude: safemode: Fuses OK (E:FD, H:DE, L:FF)

avrdude done.  Thank you.

 

Tried to do a bootloader burn from the Ard, but that also failed -- similar error

I COULD burn the null app that you get just by opening the Ard, but I'm guessing that it's just too small to get to a bad area.

 

Thanks,

 

hj

 

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

Try just erasing the flash and then read it out to a file.

Check the file to see if all bytes are erased.

 

 

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

Is your uC a m328p as AVRdude thinks it is?

 

Because you seem to be able to program your chip and read / verify most of it almost everything must be OK.

Is this error persistent? or did it happen just once?

If it goes wrong, does the error always occur at the same byte? (Your AVR might be toasted).

What happens if you program another AVR?

 

What happens if you wiggle the wires during programming verifying?

Maybe the wires are of dubious quality, connectors worn out, bad soldering.

 

Do your programmer and target use the dame voltage levels?

 

Do you have only one programmer or multiples?

USBtinyISP's are pretty cheap. I use USBasp myself, but have a bunch of them, just to be able to swap them out to debug programming errors.

Paul van der Hoeven.
Bunch of old projects with AVR's:
http://www.hoevendesign.com

Last Edited: Sun. Feb 4, 2018 - 11:43 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Had meant to reply earlier. Beginning to suspect the programmer.  ANd yes, I'm using an M328p.

 

I was mainly wondering if I was missing something. I've done this before, but not for a while.

 

But - progress report

 

It's a bit odd. I sent the clear instruction from avrdude and it cleared everything out. After that I was able to download a bootloader.

Still could not load the program I wanted from the programmer.

 

Finally got it loaded from the serial port ( would not do that earlier).

 

Not getting a lot done because I have a lot of stuff going on right now. So.I don't know if the program really got loaded, but the Ard interface said that it did.

 

I should buy another programmer or two in any event.

 

Thanks for the suggestions,

 

hj

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

As there are mentions of Arduino here then instead of the USBTiny if you have a real Arduino too could you use the ArduinoISP sketch as a programmer instead?

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

There are simple things to check: target voltage, integrity of programming connections including ground, oscillator, cap on reset value, bypass caps on vcc....Also Investigate with scope, look for contention or other problems.

It all starts with a mental vision.