Trying to read what is on a couple of microcontrollers i got off ebay.
I've been playing around with Nic Gammon's suite of sketchs to get an understanding of everything.
I've setup a connection from a Mega2560 using the ICSP headers to a breadboard.
I run the script and get the following printout
Atmega chip programmer.
Written by Nick Gammon.
Compiled on Apr 21 2016 at 22:00:56 with Arduino IDE 10608.
Attempting to enter ICSP programming mode ...
Entered programming mode OK.
Signature = 0x1E 0x95 0x0F
Processor = ATmega328P
Flash memory size = 32768 bytes.
LFuse = 0x62
HFuse = 0xD9
EFuse = 0xFF
Lock byte = 0xFF
Clock calibration = 0x89
Type 'L' to use Lilypad (8 MHz) loader, or 'U' for Uno (16 MHz) loader ...
Seems to be picking up that I have an ATmega328p-PU mc plugged in but when i go to verify it i get a whole lot of errors (1893 to be exact). They are all along the lines of,
Verification error at address 7864. Got: 0xFF Expected: 0x0C
From my understanding this would suggest something is not right but given it is picking up the mc type i'm a little stumped. Any ideas.
It does seem like ability to read the signature means you have it wired ok. Things to try:
Check make sure your wiring is not just marginally ok, that the connections are solid.
Swap out and use different wires.
Try with a different breadboard or different place on the breadboard.
Check with a multimeter to make sure you are getting 0 ohms or really close to 0 ohms on those wires.
Try with a different programmer Arduino or programmer device such as USBasp.
Connect 0.1uF decoupling capacitors close to the MCU between the VCC and GND and between AVCC and GND.
Do you have any known good MCUs (other than the recent batch you bought from eBay) to try out?
Try the ArduinoISP example sketch, and the Burn Bootloader function of the IDE. Select on the menu the programmer “Arduino as ISP”.
I'll try all those things out and report back. The sockets on the female headers don't seem all that secure the jumpers pull out easily. I'll trouble shoot and report back.
If the code reports the right mcu type, there is nothing wrong with wiring. What I wonder, though, is, which one of Nick's code you were running. You apparently were not running his hex uploader, which has the capability of reading the content of an mcu and saving it to sd card. It will follow its readouts with a standard menu, including reading FLASH and writing FLASH.
I was using the programmer and the reader. Didn’t get into hex codes or anything. Do you suggest I go down that path?
use hex uploader code. It comes with a menu via the serial port.