Go Down

Topic: Using Arduino as ISP to burn Blink to atmega328pu chip - Help! (Read 565 times) previous topic - next topic

maglobal

Jul 10, 2018, 12:08 am Last Edit: Jul 10, 2018, 01:04 am by maglobal Reason: removing smiley face....dumb.
OK....I am going to ask for help!

I am and I am not a newbie....new to microcontroller programming though...I got to be overlooking something very basic...always is basic...once you know what it is!  

After two weeks of daily frustrations....all I want to do is burn the Blink sketch to an ATMEGA328 PU and then have it run on a standalone breadboard. I have followed the instructions to a TEE as below. They mirror numerous other postings.

https://www.instructables.com/id/Burning-Sketch-To-Atmega328P-PU-On-A-Breadboard-Us/

All goes well up to loading the Blink sketch....I get the following error following compilation....

I am using Arduino IDE 1.8.6.
RPI 3 running LInux Jessie.

have searched extensively to try to run down these errors....makes no sense that the Serial Port is not found....since the ArduinoISP sketch downloads to two different UNOs on the serial port  /dev/ttACM0 successfully....just get the error when using Arduino as ISP Programmer....
The full verbose error message is attached.


avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x14

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x02

avrdude: stk500_getparm(): (a) protocol error, expect=0x14, resp=0x10
       Hardware Version: 569736
       Firmware Version: 106140.397896
       Topcard         : STK502
       Vtarget         : 1.8 V
       Varef           : 0.0 V
       Oscillator      : Off
       SCK period      : 0.1 us

avrdude: stk500_initialize(): (b) protocol error, expect=0x10, resp=0x01
avrdude: initialization failed, rc=-1
       Double check connections and try again, or use -F to override
       this check.

avrdude: stk500_disable(): protocol error, expect=0x14, resp=0x10

avrdude done.  Thank you.

the selected serial port
does not exist or your board is not connected

spycatcher2k

OK- now post a close up in focus image of YOUR wiring.
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

maglobal

thank you for your response! I appreciate cheeky! Yes...please make me work for it. Today I spent the morning trying to decipher avrdude error messages and reviewing my rpi port permissions, trying to set it in arduinoisp, trying to figure out how libraries may play into it....

I am 70 years old...recently retired and have decided that over the next 5 years I am going to master microcontroller programming after an IT career on the infrastructure side....

Attached is the breadboard. The LED lit is the heartbeart. the Green led on the left is pin 13.

it seems the uno recognizes the serial port...however once it goes as Arduino as ISP that seems to drop. The processor light flashes briefly during the failed attempt.

using atmega328 pu from multiple sources...two provided with bootloader loaded and one set blank where I attempted to load the bootloader.



spycatcher2k

Remove the capacitor on the reset pin (pin 1). and replace it with a 10K resistor to +ve.
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

larryd



Also, we need to see different views, get rid of that bright LED.

You need a decoupling capacitor (.1 μF ) next to the chip, 5v to GND.




No technical PMs.
The last thing you did is where you should start looking.

larryd

No technical PMs.
The last thing you did is where you should start looking.

maglobal

thank you for your response! I appreciate cheeky! Yes...please make me work for it. Today I spent the morning trying to decipher avrdude error messages and reviewing my rpi port permissions, trying to set it in arduinoisp, trying to figure out how libraries may play into it....

I am 70 years old...recently retired and have decided that over the next 5 years I am going to master microcontroller programming after an IT career on the infrastructure side....

Attached is the breadboard. The LED lit is the heartbeart. the Green led on the left is pin 13.

it seems the uno recognizes the serial port...however once it goes as Arduino as ISP that seems to drop. The processor light flashes briefly during the failed attempt.

using atmega328 pu from multiple sources...two provided with bootloader loaded and one set blank where I attempted to load the bootloader.



maglobal

- replaced components as specified in your responses..
- removed distracting led connections from uno to breadboard
- attached clearer images.

Thank you for the gammon link....and your time and patience.

spycatcher2k

Your capacitors are 220pF, you need to change them to 22pF.

Upload Arduino as ISP sketch to UNO
Choose Arduino as isp (NOT arduinoISP) in the programmer menu
from tools, click burn bootloader.

Post any error you get!
Mrs Drew
-=-
http://www.uk-pcb.co.uk - UK PCB Fab Company
I will design & code for you, but I will also charge you (PM me)
If you don't like my answers, realize : I'm not being cheeky, I'm Just trying to prompt you to use your own brain/google etc.

larryd

As mentioned, use 22pF.












Neatness counts with breadboard circuits:




No technical PMs.
The last thing you did is where you should start looking.

maglobal

bootload burn ERROR attached.

replaced the 221 with 22...(misread how to read capacitor coding...sigh...lesson learned)


larryd

Change both 221 to 220 or just 22



No technical PMs.
The last thing you did is where you should start looking.


larryd

Not sure why you are using a zif socket and it is not obvious from the images that the pins are correctly wired.
Try plugging the controller into the breadboard directly.

I follow the Nick Gammon write-up for ICSP programming, never had a problem.


FYI
Bootloader discussion here:
https://www.gammon.com.au/forum/?id=11635   


No technical PMs.
The last thing you did is where you should start looking.

maglobal

Basic issue seems to keep coming back to....

the selected serial port
 does not exist or your board is not connected

I will work through the gammon site....

Go Up