Secara default ATmega 8535/16/32 tidak didukung oleh arduino IDE, tapi kita bisa menambah beberapa setingan agar atmega tersebut bisa berjalan degan Arduino IDE
TS sudah mencobanya menggunakan USBasp dan AVRISP MKII dan berhasil
Dapat menggunakan Arduino IDE versi 1.6.x
Langsung aja
1. Download atmega 8535/16/32 from here atau disini (klik tanda panas kebawah untuk download)
Buka ...\Arduino\hardware\arduino\avr\variant\
Open ...\Arduino\hardware\arduino\avr\variant\
Buat folder dengan nama Atmega16
Make a folder with name Atmega16
Copy pins_arduino.h ke ...\Arduino\hardware\arduino\avr\variant\Atmega16
Copy pins_arduino.h to ...\Arduino\hardware\arduino\avr\variant\Atmega16
Buka ...\Arduino\hardware\arduino\avr\boards.txt
Open ...\Arduino\hardware\arduino\avr\boards.txt
dan paste kode dibawah ke boards.txt (bebas meletakannya mau atau ataupun bawah)
and paste this code to board.txt (free,top or bottom)
##############################################################
mega16.name=ATmega16-External 12mhz without usb to ttl
#mega16.upload.tool=arduino
#mega16.upload.protocol=arduino
#mega16.upload.maximum_size=14336
#mega16.upload.speed=19200
mega16.bootloader.low_fuses=0xFF
mega16.bootloader.high_fuses=0xDF
mega16.bootloader.tool=avrdude
mega16.build.mcu=atmega16
mega16.build.f_cpu=12000000L
mega16.build.core=arduino:arduino
mega16.build.variant=Atmega16
#mega32-16.bootloader.extended_fuses=0xFD
##############################################################
ATmega16-16.name=ATmega16-External 16Mhz without usb to ttl
ATmega16-16.upload.tool=avrdude
ATmega16-16.build.mcu=atmega16
ATmega16-16.build.f_cpu=16000000L
ATmega16-16.build.core=arduino:arduino
ATmega16-16.build.variant=ATmega16
ATmega16-16.upload.maximum_size=16000
##############################################################
mega32-16.name=ATmega32-External 16mhz without usb to ttl
mega32-16.build.mcu=atmega32
mega32-16.build.f_cpu=16000000L
mega32-16.build.core=arduino:arduino
mega32-16.build.variant=Atmega16
mega32-16.upload.maximum_size=32000
#mega32-16.bootloader.low_fuses=0xEF
#mega32-16.bootloader.high_fuses=0x89
#mega32-16.bootloader.extended_fuses=0xFD
##############################################################
mega8535.name=ATmega8535-External 16mhz without usb to ttl
mega8535.build.mcu=atmega8535
mega8535.build.f_cpu=16000000L
mega8535.build.core=arduino:arduino
mega8535.build.variant=Atmega16
mega8535.upload.maximum_size=32000
mega8535.bootloader.low_fuses=0xCF
mega8535.bootloader.high_fuses=0xD9
#mega32-16.bootloader.extended_fuses=0xFD
##############################################################
UPDATE:
Untuk komunikasi serial ,bukan dan edit file …\arduino-1.5.8\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp
For communication serial,open and edit file …\arduino-1.5.8\hardware\arduino\avr\cores\arduino\HardwareSerial.cpp
cari kode
Find Code
#if defined(__AVR_ATmega8__)dan ubah ke
config |= 0x80; // select UCSRC register (shared with UBRRH)
#endif
and replace to
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega32__) || defined(__AVR_ATmega16__)2. Hubungkan Programmer (misal usbasp) dengan system minimum atmega 8535/16/32
config |= 0x80; // select UCSRC register (shared with UBRRH)
#endif
Connect your programmer(such usbasp) to your system minimum atmega 8535/16/32
3. Setting fuse bit, bisa menggunakan avrdudess (gui for avrdude) disini
ATmega 8535 : Low = 0xCF
High = 0xD9
ATmega 16 : Low = 0xFF
High = 0xDF
ATmega 32 : Low = 0xEF
High = 0x89
4. Contoh program blink buka File -> Example -> 01. Basic -> blink
open example program blink, File -> Example -> 01. Basic -> blink
5. Pilih Tools -> Board -> ATmega32-External 16mhz without usb to ttl (contoh)
Click Tools -> Board -> ATmega32-External 16mhz without usb to ttl (example)
6. Pilih programmer yg anda pakai, TS memakai USBasp
Choose your programmes,in this case i use usbasp
7. Pilih File -> Upload using programmer
Click File -> Upload using programmer
Pinout Diagram
Sekian tutotrialnya, jika ada pertanyaan silahkan bertanya di kolom komentar
وَعَلَيْكُمْ السَّلاَمُ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ