help with arduino to breadboard for v1.8.0

I have purchased a tiny avr programmer from sparkfun to program individual microcontroller chips (I am currently using the atmega328). I have followed the arduino to breadboard tutorial found here https://www.arduino.cc/en/Tutorial/ArduinoToBreadboard but none of the zip downloads support arduino version 1.8.0. Are there any zip files for version 1.8.0 that will allow me to write to the atmega328s flash or will I have to re-download version 1.6.0 and use the zip from the tutorial? Thanks for any help.

summary: version: 1.8.0 programmer: tiny avr programmer https://www.sparkfun.com/products/11801 microcontroller: atmega328p goal: be able to write to flash (I am working on a simple robotics project with 9g servos)

This has worked for me. Gives you lots of options.

MiniCore

https://github.com/MCUdude/MiniCore

"Supported clock frequencies

16 MHz external oscillator (default) 20 MHz external oscillator 18.432 Mhz external oscillator * 12 MHz external oscillator 8 MHz external oscillator 8 MHz internal oscillator ** 1 MHz internal oscillator"

Thanks for the reply. I keep getting an error avrdude: ser_open(): can't open device "\.\COM5": The system cannot find the file specified. Are you using a tiny avr programmer?

No, I have two different attinyisp programmers ,but not that one and I use Linux Mint.

Check this from the Sparkfun site.

" This device is incompatible with Windows 8 / 8.1 / 10! [FIXED!]

about 2 years ago by Member #679961 verified purchaser

FIX: The links to the drivers are for an old Adafruit code base. The folk over at Adafruit have a signed Windows 8 - 10 driver on their site; https://learn.adafruit.com/usbtinyisp/download

It works and is verified with the 64 bit Windows 8 / 10"

Just in case anyone else has the original question, the "breadboard-1-6-x.zip" download works fine for Arduino IDE 1.8.x. However, I definitely agree with the MicroCore recommendation.

thebouljello: Thanks for the reply. I keep getting an error avrdude: ser_open(): can't open device "\.\COM5": The system cannot find the file specified.

What are you doing when you get that error?

pert: What are you doing when you get that error?

I clicked the circular upload button at the top left of the IDE

kprims:
FIX: The links to the drivers are for an old Adafruit code base. The folk over at Adafruit have a signed Windows 8 - 10 driver on their site; Download | USBtinyISP | Adafruit Learning System

It works and is verified with the 64 bit Windows 8 / 10"

I should have mentioned in the beginning that I am able to upload to the attiny85 just fine, so it is not a matter of the programmer driver or serial port. I can only upload to the atmega328 by clicking “upload using programmer” under the sketch tab. However, I cannot upload to the atmega328 using the circular upload button in the top left and therefore, cannot run the program when I disconnect the atmega328 from my computer. I downloaded the attiny boards from spark fun and they work fine.

thebouljello: I clicked the circular upload button at the top left of the IDE

Then that's the expected behavior if you're trying to upload to the ATmega328 using the tiny avr programmer. In this case what happens when you click the upload button is the Arduino IDE tries to do an upload over serial using the Arduino bootloader but if you don't have a USB-serial adapter connected to the ATmega328 then there is no serial port to upload over and so you get that error. If you want to upload using the programmer the you need to do Tools > Upload Using Programmer. If you don't like using the menu then you can hold shift while clicking the upload button, which will do an "Upload Using Programmer". You can edit boards.txt of the MiniCore boards.txt to make the upload button automatically do an Upload Using Programmer if this really is an issue for you.

pert: You can edit boards.txt of the MiniCore boards.txt to make the upload button automatically do an Upload Using Programmer if this really is an issue for you.

The main issue with using "upload using programmer" is that it does not write the program to flash and therefore, will not work when it is disconnected from the computer. For example, I wrote a basic blink led program to the atmega328 using the "upload using programmer" button. It works fine, but when I place the atmega328 on a breadboard and attach a battery, the led does not blink. However, this is not the case for the attiny85. I can write to the attiny85 just fine with the circular upload button in the top left. When I place the attiny85 on a breadboard and attach an led, resistor, and battery, the led blinks. I would like to try editing the text files to use the upload button.

thebouljello:
The main issue with using “upload using programmer” is that it does not write the program to flash

Wrong. That’s exactly what it does.

thebouljello:
I wrote a basic blink led program to the atmega328 using the “upload using programmer” button.

Explain exactly how you did this. Which setting did you have selected in the Tools > Clock menu?

thebouljello:
It works fine

What do you mean by “It works fine”?

thebouljello:
when I place the atmega328 on a breadboard and attach a battery, the led does not blink.

Explain exactly how you have this wired up.

thebouljello:
I can write to the attiny85 just fine with the circular upload button in the top left. When I place the attiny85 on a breadboard and attach an led, resistor, and battery, the led blinks.

You’re on the wrong track “Upload Using Programmer” is going to have exactly the same result no matter which way you trigger it. Try doing a Sketch > Upload Using Programmer on your ATtiny85, you’ll see it also works. This is the sort of troubleshooting skills you will need to cultivate if you’re going to have any success working with Arduino.

thebouljello:
I would like to try editing the text files to use the upload button.

That won’t help anything and would be a distraction from finding the solution to your problem.

pert: Which setting did you have selected in the Tools > Clock menu?

1MHz internal

pert: What do you mean by "It works fine"?

The led blinks as expected.

pert: "Upload Using Programmer" is going to have exactly the same result no matter which way you trigger it.

Then why does "upload using programmer" work but the upload button doesn't?

You're not being very helpful. I need to know how you have the wiring of the ATmega328P when "It works fine" and how you have the wiring of the ATmega328P when "the led does not blink". If I was forced to take a wild guess I'd say that either:

  • Your ATmega328P originally had its fuses set to use an external crystal (as it would if you took it out of an Uno), you never did a Tools > Burn Bootloader to change the fuses to use the internal clock, in the working state you have it plugged into an Uno, which has an external crystal, and your breadboard doesn't have an external crystal.
  • You have something wrong with your wiring on the breadboard

thebouljello: Then why does "upload using programmer" work but the upload button doesn't?

Sigh, we've been over this. You need to read more carefully. See my reply #7.

"Then why does "upload using programmer" work but the upload button doesn't?"

When programming the attiny, both upload using programmer and upload button work through the isp programmer.

When programming atmega328, upload using programmer uses the isp programmer which must be plugged in.

After burning bootloader using isp programmer, you cannot use upload button because it expects you to have serial communication with the chip and if you are working with a bare chip you would have to connect an usb-to-serial-connector like an ftdi232 to use the upload button.

The fact that you can upload sketches to an attiny using the upload button when your programmer is connected is confusing and doesn't work for any other chips that I am aware of.

With atmega chips you should have a usb-to-serial chip connected to your usb port in order to use the upload button.

It actually just depends on how you set up your boards.txt file. You could easily make it so that an ATmega board definition causes the upload button to do an Upload Using Programmer. Even better, you could add a custom Tools menu option to choose which upload method to use, which would also set the value of upload.maximum_size accordingly so that you can use the full capacity of the flash memory rather than reserving space for a non-existent bootloader when you do Upload Using Programmer.

I have solved the problem. Apparently the tiny avr programmer has a row of isp header pins for atmega chips, but I was previously using the dip socket for the attiny85. There was also a power distribution error on my part. Thanks to pert and kprims for helping solve this.