1

I am trying to upload the Blink sketch to my ATmega chip which is now on a breadboard connected via an FTDI chip.

My clock is running, power is OK. I connected the reset pin via a 100 kohm to the vcc and have a 0.1 uF capacitor between the reset pin and the DTR pin of my FTDI chip.

a picture a close up

Connections to the PCB with the FTDI chip: Connections to the PCB with the FTDI chip

Does anybody know what I am doing incorrectly?

On a side note, I am running Ubuntu 16.04

All this seems correct to me, yet when I try to program the controller I get this exact:

/home/yalishanda/Downloads/arduino-1.8.5/arduino-builder -dump-prefs -logger=machine -hardware /home/yalishanda        /Downloads/arduino-1.8.5/hardware -tools /home/yalishanda/Downloads/arduino-1.8.5/tools-builder -tools /home/yalishanda    /Downloads/arduino-1.8.5/hardware/tools/avr -built-in-libraries /home/yalishanda/Downloads/arduino-1.8.5/libraries -libraries     /root/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path /tmp/arduino_build_476404 -warnings=none -build-        cache /tmp/arduino_cache_889393 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr -verbose /home/yalishanda/Downloads/arduino-1.8.5/examples/01.Basics/Blink/Blink.ino
/home/yalishanda/Downloads/arduino-1.8.5/arduino-builder -compile -logger=machine -hardware /home/yalishanda/Downloads/arduino-1.8.5/hardware -tools /home/yalishanda/Downloads/arduino-1.8.5/tools-builder -tools /home/yalishanda    /Downloads/arduino-1.8.5/hardware/tools/avr -built-in-libraries /home/yalishanda/Downloads/arduino-1.8.5/libraries -libraries /root/Arduino/libraries -fqbn=arduino:avr:uno -ide-version=10805 -build-path /tmp/arduino_build_476404 -warnings=none -build-cache /tmp/arduino_cache_889393 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr -prefs=runtime.tools.avrdude.path=/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr -prefs=runtime.tools.avr-gcc.path=/home/yalishanda/Downloads/arduino-1.8.5/hardware    /tools/avr -verbose /home/yalishanda/Downloads/arduino-1.8.5/examples/01.Basics/Blink/Blink.ino
Using board 'uno' from platform in folder: /home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr
Using core 'arduino' from platform in folder: /home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr
Detecting libraries used...
"/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr/cores/arduino" "-I/home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_476404/sketch/Blink.ino.cpp" -o "/dev/null"
Generating function prototypes...
"/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics  -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr/cores/arduino" "-I/home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_476404/sketch/Blink.ino.cpp" -o "/tmp/arduino_build_476404/preproc/ctags_target_for_gcc_minus_e.cpp"
"/home/yalishanda/Downloads/arduino-1.8.5/tools-builder/ctags/5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "/tmp/arduino_build_476404/preproc/ctags_target_for_gcc_minus_e.cpp"
Compiling sketch...
"/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10805 -DARDUINO_AVR_UNO -DARDUINO_ARCH_AVR   "-I/home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr/cores/arduino" "-I/home/yalishanda/Downloads/arduino-1.8.5/hardware/arduino/avr/variants/standard" "/tmp/arduino_build_476404/sketch/Blink.ino.cpp" -o "/tmp/arduino_build_476404/sketch/Blink.ino.cpp.o"
Compiling libraries...
Compiling core...
Using previously compiled file: /tmp/arduino_build_476404/core/wiring_pulse.S.o
Using previously compiled file: /tmp/arduino_build_476404/core/WInterrupts.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/hooks.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/wiring.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/wiring_analog.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/wiring_digital.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/wiring_pulse.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/wiring_shift.c.o
Using previously compiled file: /tmp/arduino_build_476404/core/CDC.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/HardwareSerial.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/HardwareSerial0.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/HardwareSerial1.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/HardwareSerial2.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/HardwareSerial3.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/IPAddress.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/PluggableUSB.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/Print.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/Stream.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/Tone.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/USBCore.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/WMath.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/WString.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/abi.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/main.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/new.cpp.o
Using previously compiled file: /tmp/arduino_build_476404/core/core.a
Archiving built core (caching) in: /tmp/arduino_cache_889393    /core/core_arduino_avr_uno_fbfa3aa7d5698fed1dc5326dc32eae8f.a
Linking everything together...
"/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-gcc" -w -Os -g -flto -fuse-linker-plugin -Wl,--gc-sections -mmcu=atmega328p  -o "/tmp/arduino_build_476404/Blink.ino.elf" "/tmp/arduino_build_476404/sketch/Blink.ino.cpp.o"     "/tmp/arduino_build_476404/core/core.a" "-L/tmp/arduino_build_476404" -lm
"/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-objcopy" -O ihex -j .eeprom --set-section-flags=.eeprom=alloc,load --no-change-warnings --change-section-lma .eeprom=0  "/tmp/arduino_build_476404/Blink.ino.elf"     "/tmp/arduino_build_476404/Blink.ino.eep"
"/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avr-objcopy" -O ihex -R .eeprom      "/tmp/arduino_build_476404/Blink.ino.elf" "/tmp/arduino_build_476404/Blink.ino.hex"
Sketch uses 928 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables. Maximum is 2048 bytes.

/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/bin/avrdude -C/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/ttyUSB0 -Uflash:w:/tmp/arduino_build_476404/Blink.ino.hex:i 

avrdude: Version 6.3, compiled on Jan 17 2017 at 11:00:16
     Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
     Copyright (c) 2007-2014 Joerg Wunsch

     System wide configuration file is "/home/yalishanda/Downloads/arduino-1.8.5/hardware/tools/avr/etc/avrdude.conf"
     User configuration file is "/home/yalishanda/.avrduderc"
     User configuration file does not exist or is not a regular file, skipping

     Using Port                    : /dev/ttyUSB0
     Using Programmer              : stk500v1
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x00
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x00
...
  • Start with connecting all power pins. You've left Vcc on pin 20 and GND on pin 22 unconnected. – KIIV Jan 21 '18 at 18:59
  • @KIIV ok, did that although I was not sure whether that was really necessary. Unfortunately it still doesn't work – LandonZeKepitelOfGreytBritn Jan 21 '18 at 19:03
  • Why it's showing stk500v1 protocol instead of arduino for the avrdude? – KIIV Jan 21 '18 at 19:11
  • 1
    Do you have a normal Arduino Uno board? You can swap out the chip there and see if you can program it. The board is guaranteed to have all the connections right. If it still fails, your ATMega328P has not been programmed with the Arduino Bootloader. You'll need another working Arduino or a ICSP programmer for that. Also: youtube.com/watch?v=5fvdxd0QhTw and baldengineer.com/diy-arduino-schematic-checklist.html might be good references for you. – Maximilian Gerhardt Jan 21 '18 at 19:28
  • 1
    @LandonZeKepitelOfGreytBritn How do you know the chip should have a bootloader when new? Did you specifically buy one with a bootloader installed? They don't come from the factory like that. – Majenko Jan 21 '18 at 23:03
2

Right now you don't have a bootloader on your chip that's the reason why it wouldn't be programmed via UART so to flash the bootloader you need an ISCP programmer and an arduino bootloader.hex file.

-1

10K reset pullup. Check your crystal caps, they should be 22pF.

The response does look like the chip does not have a bootloader tho. Or Rx & Tx lines are swapped.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.