I have an authentic Arduino UNO, but I didn't want to pay full price for a new one to build semi perminate projects, so I bought a few ATMEGA328P-PU chips off of AliExpress:
But when I try to use Arduino IDE to upload the sketch to the new chips, I get these errors:
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
It happens 10 times and quits.
It works fine when I put the original chip back in.
If anyone has any experience with this I'd be very grateful!
EDIT:
Trying the burn bootloader steps, and I'm getting a new error.
Steps I took:
I'm doing the 8MHz option, and so I downloaded the breadboard-1-6-x.zip file. (I'm using Arduino IDE 1.6.5 on Mac).
I uploaded the ArduinoISP example to my working chip, then wired it up to the breadboard as per the picture.
I switched the programmer to Arduino as ISP and set the board to ATMEGA328 on breadboard (8MHz clock)
I went to tools>burn bootloader, and got this error:
Arduino: 1.6.5 (Mac OS X), Board: "ATmega328 on a breadboard (8 MHz internal clock)"
/Users/andy/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/andy/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.usbmodem411 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0x05:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xE2:m
avrdude: Version 6.0.1, compiled on Apr 14 2015 at 16:30:25 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2009 Joerg Wunsch
System wide configuration file is "/Users/andy/Desktop/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf" User configuration file is "/Users/andy/.avrduderc" User configuration file does not exist or is not a regular file, skipping Using Port : /dev/cu.usbmodem411 Using Programmer : stk500v1 Overriding Baud Rate : 19200 avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x15 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
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: -1543397124 Firmware Version: 2165568.-1543397124 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.
Problem uploading to board. See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.
Making a little progress at least...
Solution:
I was using this layout:
Since that was failing I decided to try using the nano that I got at the same time, and after a lot of research I found this video:
https://www.youtube.com/watch?v=94KCYqS3--A
I jumpered the pins shown at the 1:30 mark to the ICSP port, and tried burning the bootloader twice per chip, and on the second try it worked! Don't know why it had to be tried twice.
I may go back to trying the breadboard method, just to see if it works if I try burning it twice.
-
1Part of an authentic Arduino is a preexisting bootloader on the chip.gre_gor– gre_gor03/24/2017 18:50:15Commented Mar 24, 2017 at 18:50
-
You need a Chinese programmer as well, since the Chinese chips don't understand our language. I've had luck with the avr USB/ASP or USB/isp series. r.ebay.com/lALcjcaaa– aaa03/24/2017 18:53:53Commented Mar 24, 2017 at 18:53
-
^ True solution, but not right explanation, Ben Heck covers the difference very well in the beginning of this: "make an avr development board" video (youtu.be/ncobWc61wL4)aaa– aaa03/24/2017 18:56:10Commented Mar 24, 2017 at 18:56
-
How is it connected? And you can add -F to the avrdude command?aaa– aaa03/30/2017 15:57:21Commented Mar 30, 2017 at 15:57
1 Answer 1
It's because these are unprogrammed chips, meaning they haven't had a bootloader programmed into them yet. Here is a tutorial for using your Arduino board to program a bootloader into them (there are many such tutorials available).
It only needs to be done once per chip so it will be worth your while to program all of them, once you have set up to do one. This is a very economical way to build "home-brew-duinos".
-
I don't have the crystal, so I'll have to order some I suppose... I did see in this Instructible that you can run at least some of them without the crystal. However, I also got an Arduino Nano that works... Could I put the 328P-PU into the UNO, and then program it with the Nano?AndyD273– AndyD27303/24/2017 19:59:39Commented Mar 24, 2017 at 19:59
-
@AndyD273: Sure, just use the ISP connection near the main MCU, not the ISP connection near the USB connector.Ignacio Vazquez-Abrams– Ignacio Vazquez-Abrams03/24/2017 22:10:30Commented Mar 24, 2017 at 22:10
-
you can run them at 8mhz w/o a crystal, 16 with one.dandavis– dandavis03/25/2017 23:18:57Commented Mar 25, 2017 at 23:18
-
Ok, I got it wired up using the internal 8mhz clock as in your link, but I'm getting a new error. I posted it above.AndyD273– AndyD27303/28/2017 17:03:17Commented Mar 28, 2017 at 17:03