Printfriendly

Update : Arduino IDE for atmega 8535/16/32 without USB to TTL

السَّلاَمُ عَلَيْكُمْ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ

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__)
  config |= 0x80; // select UCSRC register (shared with UBRRH)
   #endif
   dan ubah ke
   and replace to
#if defined(__AVR_ATmega8__) || defined(__AVR_ATmega32__) || defined(__AVR_ATmega16__)
  config |= 0x80; // select UCSRC register (shared with UBRRH)
#endif
2. Hubungkan Programmer (misal usbasp) dengan system minimum atmega 8535/16/32
   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
وَعَلَيْكُمْ السَّلاَمُ وَرَحْمَةُ اللهِ وَبَرَكَاتُهُ


23komentar :

  1. gak bbisa download buat setingan atmega 8535/16/32

    ReplyDelete
  2. Trus itukan arduino sama avr pinnya beda. Untuk inisialisasi pin avr di arduino IDE gmana gan?

    ReplyDelete
    Replies
    1. disini gan https://cdn.instructables.com/FF8/LHYT/I9FGVCEB/FF8LHYTI9FGVCEB.MEDIUM.jpg

      errornya gimana gan? salah pin mungkin usbasp ke atmeganya,punya ane bisa gan,pake atau ga pake usb to ttl

      Delete
  3. Error "upload.tools" gtu tulisan errornya gan. Buat yg atmega 8535

    ReplyDelete
    Replies
    1. ntar ane buat video tutorialnya gan
      udah setting fuse bit?

      Delete
  4. Error "upload.tools" gtu tulisan errornya gan. Buat yg atmega 8535

    ReplyDelete
  5. Udah disetting fuse bitnya gan. Oh iya btw program servo di arduino gak bisa untuk avr ya gan?

    ReplyDelete
    Replies
    1. untuk yg ini,diluar support arduino gabisa,karena pwm ada hubungannya sama clock,tapi bisa diakalin

      Delete
  6. Udah disetting fuse bitnya gan. Oh iya btw program servo di arduino gak bisa untuk avr ya gan?

    ReplyDelete
    Replies
    1. oh iya gan,harus pake arduino v 1.05 baru bisa,ane pake usbasp baru bisa

      Delete
    2. udah tak update gan,bisa pakai arduino v 1.6.x

      Delete
  7. error gan,
    padahal 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.

    ReplyDelete
    Replies
    1. coba pastein board.txt ke pastebin gan,nanti kirim linknya kesini

      Delete
  8. Gak perlu burn bootloader ya?

    ReplyDelete
  9. hardware untuk atmega8535 dengan imternal clock gmn gan?

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. Gan mau konsultasi untuk pemakaian arduino di atmega8535, boleh minta kontak email atau [email protected]

    ReplyDelete
  12. gan mau nanya, kalau pin interruptnya berada di pin berapakah?

    ReplyDelete
  13. Gan, buat copy atmega8535 gimana ya?

    ReplyDelete

Jika artikel ini bermanfaat bisa dishare gan, tapi ingat selalu cantumkan sumber jika ingin copas artikel ini