ATmega DIP40 in Arduino IDE 1.6.4

32,643

35

39

Posted

Introduction: ATmega DIP40 in Arduino IDE 1.6.4

Quick solution for use some ATmega microcontrollers in newer Arduino IDE ver. 1.6.4

As we know, recent changes in the Arduino world have boosted development of Arduino IDE, now reached version 1.6.4.

I do not want to talk at all of the war Arduino LLC vs Arduino SRL (not now, not here). In fact I think my opinion on this topic is not important.

So, I downloaded and try versions 1.6.2/1.6.4 from Arduino.cc and 1.7.2 from Arduino.org (1.7.3 not tested yet).

And I decided to go ahead with 1.6.4 from Arduino.cc / Arduino LLC http://www.arduino.cc/en/Main/Software.

I took the opportunity and did some cleaning in the files pins_arduino.h for ATmega1284, ATmega32 and ATmega16. I remove defines for A0-A7. We can access all 32 digital pins with digitalRead(0 ... 31) / digitalWrite (0 ... 31,[...]) and ADC pins with analogRead(0..7).

Let's start!

Step 1: Select Preferences

Select Preferences from File menu.

Step 2:

Edit Additional Boards Manager URLs field and put this link:

http://openhardware.ro/boards/package_openhardwarero_index.json

Step 3: Open Board Manager

And wait a little...

Step 4: Install Boards

Yes it is easier now.

Step 5: Done

Now it's done. Almost :)

For ATmega1284 any change is no longer necessary.

For ATmega32 and ATmega16 we need to edit

...\arduino-1.6.4\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp

we will replace:

#if defined(__AVR_ATmega8__)
	config |= 0x80; // select UCSRC register (shared with UBRRH) 
#endif

with:

#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega32__) || defined(__AVR_ATmega16__)
	config |= 0x80; // select UCSRC register (shared with UBRRH) 
#endif

Step 6: Finally

Please note: This is a project in progress. It may have some errors. I tested compiling and uploading some examples for ATmega1284/32/16.

At this moment are defined six "boards"(usually I work with these microcontrollers.):

  • ATmega16-8MHz
  • ATmega16-16MHz
  • ATmega32-8MHz
  • ATmega32-16MHz
  • ATmega1284-16MHz
  • ATmega1284-20MHz

I intend to include ATmega644 and ATmega1284P, but it will take some time (I have no one handy). I plan to buy two of every and and put them on these small boards like above.

You can also read: https://www.instructables.com/id/ATmega-DIP40-Mini...

Have fun!

Share

  • Ok. This is my setup...-Silvius

    Silvius made it!

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

33 Comments

avrdude: Yikes! Invalid device signature.

Double check connections and try again, or use -F to override

this check.

An error occurred while uploading the sketch

help me to recover this error

What microcontroller do you use? And what programmer?

It looks like AVRDUDE does not correctly identify the microcontroller. There may be other components connected to the SPI or RESET pins (used for ISP programming) which may interfere with the programming process. It seems more like a hardware problem than software.

i have done all the above steps u get , but am getting upload error in arduino ide .....{

avrdude: Yikes! Invalid device signature.

use -F to override

this check.

An error occurred while uploading the sketch

}

Everything work for me fine. My own board blink very nice. Thank You very much.

You're welcome!

I'm glad to hear that. Good luck!

i get this error when i am trying to install the package.

0.PNG

trying to download the link

1.PNG

Problem solved. Still I do not know why the file has disappeared.

You can try again now.

thank you it works

You are right. I do not know why the file has disappeared.

I'll see what it's about in a matter of hours.