Reviving those pesky (and cheap) ATMEGA328p-PU from Ebay

Topics related to the HV Rescue Shield:
http://mightyohm.com/hvrescue2
Post Reply
Maxcross21
Posts: 2
Joined: Mon Sep 25, 2017 12:19 pm

Reviving those pesky (and cheap) ATMEGA328p-PU from Ebay

Post by Maxcross21 »

Hello,

This is my first post; I wanted to share my experience about purchasing ATMEGA328P-PU off Ebay.

I received 10 MCUs from a chinese vendor; I was unable to program any of them using the Arduino IDE. After a while I read about MightyOhm HVRescue shield and decided to try it. I purchased it but Hurricane Irma delayed the delivery almost two weeks.

The kit was easy to assemble; I added a ZIF socket to make the process of inserting/removing/resetting the chips easier and safer (no bent pins).
CAM04415.jpg
and it took a couple of seconds per chip.

Next, I followed the instructions of this Instructables page: http://www.instructables.com/id/How-to- ... duino-isp/


I could burn the bootloader using an Arduino MEGA 2560 as the ISP an Arduno UNO with a removable chip header as the target ( I placed another ZIF socket on the Arduino UNO for the sake of convenience).

First, I connected my Arduino MEGA2560 to the PC; loaded the "Arduino ISP" sketch from Menu"

File>
Examples> ArduinoISP
Upload

Next, I unplugged the Arduino MEGA 2560 from the PC, and made the connections using jumper wires.

As you can see in the second picture, my setup differs a little bit from the Instructables page: I used an external power source for the Arduino UNO (9V) and retained the GND connection to the Arduino MEGA 2560.
CAM04418[1].jpg
Then, I connected the Arduino MEGA 2560 to the PC; I selected from the Menu:

Tools >
Board: Arduino/Genuino UNO
PORT: (your PC port assigned to Arduino MEGA
Programmer: Arduino as ISP
Burn Bootloader

Success! I could load normally sketches on my MCUs without any problems.

I hope this helps, it really sucks waste your time returning things to China, risking to receive another set of chips with the same issue.


And to the creator of the HVRescue, my sincere thanks and admiration.

Regards,

Andrew
Last edited by Maxcross21 on Thu Sep 28, 2017 11:32 pm, edited 1 time in total.
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Reviving those pesky (and cheap) ATMEGA328p-PU from Ebay

Post by mightyohm »

Andrew,

Thanks for the feedback. I'm glad you got your chips working.
What was the problem with the fuses that you had to use the Rescue Shield to fix?
Maxcross21
Posts: 2
Joined: Mon Sep 25, 2017 12:19 pm

Re: Reviving those pesky (and cheap) ATMEGA328p-PU from Ebay

Post by Maxcross21 »

Hi, Jeff

The chips couldn't be programmed with the Arduino Uno; I tried to burn the bootloader using the method posted in Arduino.cc; it also failed.
I kept receiving this message:
Using Port : COM34
Using Programmer : stk500v1
Overriding Baud Rate : 19200
AVR Part : ATmega328P
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PC2
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :

Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 20 4 0 no 1024 4 0 3600 3600 0xff 0xff
flash 65 6 128 0 yes 32768 128 256 4500 4500 0xff 0xff
lfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
efuse 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
lock 0 0 0 0 no 1 0 0 4500 4500 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00

Programmer Type : STK500
Description : Atmel STK500 Version 1.x firmware
Hardware Version: 2
Firmware Version: 1.18
Topcard : Unknown
Vtarget : 0.0 V
Varef : 0.0 V
Oscillator : Off
SCK period : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000 (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.03s

avrdude: Device signature = 0x000000
avrdude: Yikes! Invalid device signature.
Double check connections and try again, or use -F to override
this check.


avrdude done. Thank you.
I read somewhere that ATMEGA328p-PU chips are rarely damaged, and that AVR High Voltage Programming could fix the problem with incorrect fuse values. Then I found your device.

These are original fuses found on the 10 chips:
fuses.jpg
fuses.jpg (28.44 KiB) Viewed 41483 times
and also, for all of them, these values were reported by the sketch:
Signature: 1E 95 0F
Lock Bits: CF

I changed them all to:
HFUSE: 0xC7
LFUSE: 0xDF

I first used the original sketch, HVRescue_Shield212 and it went through the 10 chips without errors, but I couldn't burn the bootloader.
Then I used the HVRescue_Shield_Plus_100 sketch and it worked.

Thank you,
Andrew
User avatar
mightyohm
Site Admin
Posts: 1064
Joined: Fri Apr 03, 2009 10:29 pm
Location: Seattle, WA
Contact:

Re: Reviving those pesky (and cheap) ATMEGA328p-PU from Ebay

Post by mightyohm »

Thanks for posting the details!

Cheers!
Post Reply