When I ordered an Arduino I was waiting so long for the package to arrive fro China that I ended up ordering another. As it was they both ended up appearing on the same day. That is a long winded way to say that I now have a spare 328p IC, and I was looking to put it straight on a breadboard to play around with.
Not having any other way, I loaded the ArduinoISP sketch, wanting to use that to "burn" the chip. I hooked it all up and sort of got things working, however...
When I ran the "Burn Bootloader" in the Arduino IDE, I could write to the chip ok, then if I switched directly to Atmel studio, I could then load in a program without issue, but if I disconnected the power and tried to do the same again, I would get "verification error, first mismatch at byte 0x000000xx" errors.
Thinking that the problem was due to the clunky setup I had of using an Arduino as a programmer, I got myself a el cheapo USBAsp device, hoping that would fix the issue. Nope, I still get errors when I try and program the IC directly, but if I use the "Burn Bootloader", and then write my program onto the IC, it works like a charm.
I am thinking that I have a problem with the RESET line, but nothing I do seems to make a difference. I have tried putting 1K, 10K, 47K resistors to both +5V and Ground, with no noticeable difference. When I use the IDE to "Burn Bootloader" first, it works every time.
Please can some clever person help ?