السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
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)
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
and replace to
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)
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
وَعَلَيْكُمْ السَّلاَمُ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ
gak bbisa download buat setingan atmega 8535/16/32
ReplyDeletebisa gan,ane udah coba soalnya
DeleteTrus itukan arduino sama avr pinnya beda. Untuk inisialisasi pin avr di arduino IDE gmana gan?
ReplyDeletedisini gan https://cdn.instructables.com/FF8/LHYT/I9FGVCEB/FF8LHYTI9FGVCEB.MEDIUM.jpg
Deleteerrornya gimana gan? salah pin mungkin usbasp ke atmeganya,punya ane bisa gan,pake atau ga pake usb to ttl
Gak bisa download programnya
ReplyDeleteError "upload.tools" gtu tulisan errornya gan. Buat yg atmega 8535
ReplyDeletentar ane buat video tutorialnya gan
Deleteudah setting fuse bit?
Error "upload.tools" gtu tulisan errornya gan. Buat yg atmega 8535
ReplyDeleteUdah disetting fuse bitnya gan. Oh iya btw program servo di arduino gak bisa untuk avr ya gan?
ReplyDeleteuntuk yg ini,diluar support arduino gabisa,karena pwm ada hubungannya sama clock,tapi bisa diakalin
DeleteUdah disetting fuse bitnya gan. Oh iya btw program servo di arduino gak bisa untuk avr ya gan?
ReplyDeleteoh iya gan,harus pake arduino v 1.05 baru bisa,ane pake usbasp baru bisa
Deleteudah tak update gan,bisa pakai arduino v 1.6.x
Deleteerror gan,
ReplyDeletepadahal udah ikutin semua langkahnya
ane pake nya AVRISP MKII,
====== error message =======
Property line '?# See: http://code.google.com/p/arduino/wiki/Platforms' in file C:\Program Files (x86)\Arduino\hardware\arduino\avr\boards.txt is invalid
Error compiling for board ATmega8535-External 16mhz without usb to ttl.
coba pastein board.txt ke pastebin gan,nanti kirim linknya kesini
Deletepakai arduino 1.8.2 bisa gan?
DeleteGak perlu burn bootloader ya?
ReplyDeletega perlu gan
Deletehardware untuk atmega8535 dengan imternal clock gmn gan?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteGan mau konsultasi untuk pemakaian arduino di atmega8535, boleh minta kontak email atau [email protected]
ReplyDeletegan mau nanya, kalau pin interruptnya berada di pin berapakah?
ReplyDeleteGan, buat copy atmega8535 gimana ya?
ReplyDelete