ATMEGA16/32 with Arduino/Processing

   
_____news
_____works 07-05
_____works 04-01
_____theory
_____workshops
_____bio
_____downloads
_____links
 
 
 
 
 
 
 
 
 
cc
 
cc (2001-2007)
 

THIS IS AN OLD PAGE WITH NO UPDATES ANYMORE!

I have uploaded it again because I saw much interest in this topic the last months.

 

ATMEGA16/32 with Arduino/Processing

this refers to a topic of the arduino fourm: "Ok, on to Atmega 32"

 

 

The idea is to use the Arduino/Processing Software with an ATMEGA16 or ATMEGA32 Chip. On this page I want to show what I have changed, what is working and what is not resolved so far. So this is not more than some sketches that could be used a a first step to develop a real working Interface some day.

 

  HARDWARE
 

I use a very basic ATMEGA16 circuit that costs around 5 Euros. Advantages are that it is very cheap and ready-to-use in about one hour. Disadvantage is that there is no USB Bootloader. I upload with a cheap ISP programmer instead. Here are some fotos and a sketch of the circuit.

My ISP programmer has 10 pins. If you use another ISP programmer you have to take a look at your 5V, Ground, Miso, Mosi, Reset and SCK ports.

In this example I use a 8 MHz crystal because I haven´t another at the moment. But a 16 Mhz should work as well.

Don´t forget to change the fusebits of the Atmega16. JTAG should be disabled and external crystal must be activated.

   
 

SOFTWARE:

This part is still very experimental . So please don´t take it as a finished and working code. This is not more than playing around at the moment. Try it at your own risk.

As far I have tested with Arduino on Linux (ubuntu): (20/10/2007)

OK: Digital inputs and outputs, 8 analog inputs (A0-A7), Serial conections (I tested it with another board that has a serial connection and with Hyperterminal), PWM (analog write)

Serial Monitor and upload with the Arduino GUI is not possible.

_________________________________________________________________________

To upload the files, i use the burn-o-mat. A great GUI for avrdude.

http://avr8-burn-o-mat.aaabbb.de/avr8_burn_o_mat_avrdude_gui_en.html

_________________________________________________________________________

Changing files:

Before you change the files, don´t forget to make a copy of the original files to be able to go back to the original version. The actual new files are only for Atmega16. Atmega8 is not supported then!

you have to change the files:

arduino009/lib/targets/arduino/pins_arduino.c and maybe the file ...../pins_atmega8.c

Download the files here

NEW:a better documentation of what I changed (as a pdf file)

in the .arduino/preferences.txt file, I changed

build.mcu=atmega16

build.f_cpu=8000000L

(because I use a 8MHz crystal)

COMPILE AND UPLOAD:

write your programme in Arduino, press the play bottom (compile), and upload (send to chip). Then you will get a error message but ignore it.

Start the burn-o-mat and check the settings. choose your programmer and the port

The next step is to choose the file to upload. It is a .hex file that was generated when you compiled your code with arduino. It is stored at the same place, where you saved your code inside the "applet" folder. Choose this file, select "write" and that´s it! Here is a screenshot of the arduino and the burn-o-mat window.

ATMEGA 32???

Although I haven´t an Atmega 32 here and I cannot test it, all this should also work for the Atmega32 as well. It has the same pin distribution

 

 

 

 

 

 

 

 


 

.

 

 

 

 

 

 

 

 

 

   
 
  <<<back