After I wrote several articles about using ATmega microcontrollers (DIP40) in Arduino environment (here and at Instructables), I had some feedback that I was asked how to be effectively put into operation this project.
As I came into the Arduino world from classical microcontrollers development world, I have not found necessary to elaborate a method or hardware project for this. Meanwhile I realized that in Arduino world as there are many users who not have a background in digital electronics / microcontrollers development. This is the great advantage of Arduino, it is so easy to use that even if someone have no knowledge or experience with electronics or programming, can get a simple project running in hours (or minutes).
Personally, I use the Arduino as a platform for experimentation. Even if most of the times I bypass hardware “abstraction layer” (and working directly with microcontroller hardware) I continue to use the Arduino IDE because is so simple(and fast) to start experimenting with different algorithms or techniques to control various peripherals. I must admit that sometimes I use Arduino IDE as a replacement for AVR Studio, as long as USBASP is well supported.
So I think that this project will not be useless, although there are many similar projects each with advantages and disadvantages.
- Can be used with DIP40 ATmega Microcontrollers: ATmega16, ATmega32, ATmega644, ATmega1284, ATmega1284P
- Thru-hole components / easy to solder
- Can be used with Arduino IDE (or other IDE / programmer / compiler )
- Include filtering of AVCC for better analog input.
- Include 10pin ISP connector / easy to use with USBASP (or another compatible programmer)
- More freedom in the choice of connections with external modules
- … I almost forgot … price…
- No bootloader (limitation or advantage, depends on how you look at). However a bootloader can be easily added (…some hardware is required)
- No standard Arduino footprint. (We can not plug directly standard shields, but can still use them in more traditional way, with jumper wires)
Here is a comparison between various common microcontrollers (DIP40 package) from ATmega family:
Please note that ATmega328P and ATmega2560 are not DIP40. I put them here for comparison (ATmega328P ~ Aruino Uno / ATmega2560 ~ Arduino Mega 2560).
|Microcontroller||ATmega 16||ATmega 328P||ATmega 32||ATmega 644||ATmega 1284/1284P||ATmega 2560P|
*PWM pins comparison is not very acurate ( 8bit / 16bit, Timer0… )
I not tried to imitate exactly Arduino behavior(bootloader, form factor…). I thought that the most important is that we can use Ardino environment and its libraries (official or not).
At first I make schematic to illustrate minimum requirements to start an ATmega microcontroller at full speed.
Download schematic as pdf: ATmega DIP40 Schematic.pdf.
After schematic was done…
Download gEDA Project from here: atmega40pin gEDA Project.zip
Also I made a stripboard version of this project, for testing purposes… and fun.
An article about this and some detailed comments on schematic can be found here:
If you want to use this project with Arduino IDE, you can read the following articles: