For a project I am building, I needed a tft display. So I promptly bought one of those generic 2.4 inch ones that doubled as a shield. Plugging it on top of my uno, it worked great, except that I was really low on flash space. I also wanted to include some more code so the uno wasn't going to cut it. I remembered hearing about the large Atmega1284's and their large flash memory. I bought one and tried to program it the same way I did with an attiny85. I downloaded and installed MCU dude Mighty Core and set up all the options. 16mhz ext. crystal, atmega 1284, BOD 2.7v, LTO disabled, standard pinout, and arduino as isp (mighty core). On the hardware side I put a 16mhz crystal with 22pf caps, 10k reset resistor, and a led across pin 13. Pins 6,7,8,9 were connected to uno pins 10,11,12,13 and a 10uf cap was placed across reset. After uploading the isp sketch to uno, I flashed the boot loader and it burned no problem. When I tried to upload the blink sketch is where the problem is. If I hit upload it gives me the error message stk500 not in sync and sometimes skt500 not responding If I hit upload using programmer, it says upload successful but the led doesn't flash. At this point I'm lost.
Thanks for reading it all and thanks for your time.
You can see that on the DIP-40 ATmega1284 that Arduino pin 13 (as shown in the blue oval) is at physical pin 19.
roessleralec:
If I hit upload it gives me the error message stk500 not in sync and sometimes skt500 not responding
Upload is for if you have a USB to TTL serial adapter connected to the RX and TX pins of the ATmega1284. Since you say that Upload Using Programmer is completing successfully, I can tell that you instead still have your ISP programmer connected to the ATmega1284. Note that when you do an Upload Using Programmer it erases the bootloader from the chip. If you ever do connect a USB to TTL serial adapter to your ATmega1284 and want to do a standard Upload through it, you will first need to do a Burn Bootloader using your ISP programmer to put the bootloader back.
Ok thank you for your reply. Yes, the LED is connected to pin 19 (arduino pin 13). If I understand correctly, I was just erasing the boot loader every time? If so Ill have to solve the error message.
This is the error message I get when I try to upload the blink sketch
Arduino: 1.8.10 (Windows 10), Board: "ATmega1284, Yes (UART0), Standard pinout, 1284, BOD 2.7V, LTO disabled, External 16 MHz"
Sketch uses 1204 bytes (0%) of program storage space. Maximum is 130048 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 16375 bytes for local variables. Maximum is 16384 bytes.
C:\Users\Alec\Downloads\arduino-1.8.10-windows\arduino-1.8.10\hardware\tools\avr/bin/avrdude -CC:\Users\Alec\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3/avrdude.conf -v -patmega1284 -carduino -PCOM4 -b115200 -D -Uflash:w:C:\Users\Alec\AppData\Local\Temp\arduino_build_208171/Blink.ino.hex:i
avrdude: Version 6.3-20190619
Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "C:\Users\Alec\AppData\Local\Arduino15\packages\MightyCore\hardware\avr\2.0.3/avrdude.conf"
Using Port : COM4
Using Programmer : arduino
Overriding Baud Rate : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x5b
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x5b
I've already explained this to you. With your current settings, if you want to do an Upload, you need the USB to TTL serial adapter. If you want to use your ISP programmer to do an upload then you need to do an Upload Using Programmer.
It is possible to configure the Arduino IDE so that it does an Upload Using Programmer when you do an Upload. This is likely how the hardware packages you used for your ATtiny85 and maybe the ATmega328 also were configured. MightyCore also has this option, but you need to select Tools > Bootloader > No bootloader and then do a Tools > Burn Bootloader to set the fuses accordingly.
But this is all just a big red herring. Once you do that, there is absolutely no difference between Upload and Upload Using Programmer and you already have Upload Using Programmer working. The thing you should be working to solve is the problem of the LED not blinking when you successfully upload the Blink sketch. You're just wasting time with this silliness of obsessing over using Upload.
roessleralec:
If I understand correctly, I was just erasing the boot loader every time?
No, you don't understand correctly. Upload Using Programmer first erases the bootloader, then it uploads the sketch. If all it did was erase the bootloader, why the heck would it be called "Upload Using Programmer"?
You are missing two critical components - a 0.1uF ceramic capacitor, connected between Vcc and Gnd, and between AVcc and Gnd, right next to the chip. Without these, it may work under some circumstances, but hang or reset under others (depending on the code running on it, devices connected to it, the power supply, and the length of the wires from the power supply). Any guide which omits these necessary capacitors ("decoupling capacitors") was written by someone who doesn't know what they're doing, and should not be trusted. You need this for a '328p and tiny85 too, by the way.
(also, make sure you have Vcc and AVcc connected - some bad guides get this wrong too; Omitting this connection also "sort of works" thanks to an internal protection diode, but running it like that can damage the chip, as said diode is only designed to carry very low current)