1 / 32

Pengenalan Sistem Minimum, I/O ,LCD, Button

Pengenalan Sistem Minimum, I/O ,LCD, Button. Mikrokontroller ?. Sistem mikroprosesor yang lengkap dalam s ebuah chip Terdapat prosesor , memory ( sejumlah kecil RAM, memori program, atau keduanya ), dan programmable input/output peripherals

Download Presentation

Pengenalan Sistem Minimum, I/O ,LCD, Button

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PengenalanSistem Minimum, I/O ,LCD, Button

  2. Mikrokontroller? • Sistem mikroprosesor yang lengkap dalam sebuah chip • Terdapatprosesor, memory (sejumlahkecil RAM, memori program, ataukeduanya), dan programmable input/output peripherals • Aplikasi : automobile engine control systems, implantable medical devices, remote control, dan embedded system lainnya

  3. Kelebihan • Performa yang bagus • Efisiensi daya yang optimal • Desain sistem yang fleksibel • Basis pemrograman bahasa C dan Assembly

  4. Jenis-jenisMikrokontroler AVR • 32-bit AVR UC3 • AVR XMEGA • megaAVR • tinyAVR • Battery Management • Automotive AVR

  5. Atmega 16

  6. Sistem Minimum • KBBI: • Sistem: perangkatunsur yang secarateratursalingberkaitansehinggamembentuksuatutotalitas. • Minimum: yg paling kecil (sedikit, kurang); yg paling rendah • Sistem minimum: perangkatunsur paling kecil (sedikit, kurang) yang secarateratursalingberkaitanmembentuksuatutotalitas.

  7. Sistem Minimum

  8. ContohSkemaRangkaianSismin

  9. Sistem Minimum untuk Trainer • Dapatmengaksesseluruh pin I/O • Tersediakomponenuntukmengetesfitur-fitur yang terdapatdiMikrokontroler • Memilikitataletak yang mudahdigunakan

  10. Port Input/Output • Fitur untuk membaca, merekayasa, dan menulis secara umum • Untukcatudaya 5V, besartegangan minimum untuklogika 1 (HIGH) adalah 4.2 V, sedangkantegangan max untuklogika 0 (LOW) adalah 0.7 V.

  11. Port Input/Output • DDR = menentukan port itusebagai input atau output • PORTx = • Output : menentukannilaikeluarannya • Input: menentukan mode (pull up resistor dsb) • PINx = bacanilai

  12. Bagaimana Cara Memberi Program? • Gunakan downloader

  13. LCD Liquid Crystal Display

  14. LCD (Liquid Crystal Display) • What is LCD? Flat panel display, electronic visual display, video display that uses the light modulating properties of liquid crystals (LCs). LCD 16x2 LCD 20x4

  15. Setting LCD • Pasangdi port mana? -> biasanyadi port C krn port A ADC port D Ext Int tergantungkebutuhanajasich • LCD-nyabrpkarakter?

  16. WORKSHOP

  17. MembuatSimulasidengan ISIS PROTEUS • Buka ISIS Proteus • MembuatskematikSismindengan output LED dan LCD

  18. Skematik

  19. BLINKING LED

  20. Blinking LED • Buka CVAVR • File -> New -> Project • Setting Port

  21. File -> Generate, Save, Exit • MasukkanKodepada program

  22. DeklarasiVariabel #include <mega16.h> #include <delay.h> // Declare your global variables here #define LEDS PORTA void BlinkingLed (void) { LEDS = ~LEDS; }

  23. Main Program LEDS = 0b01010101; while (1) { // Place your code here BlinkingLed(); delay_ms(750); }

  24. INTERFACING LCD

  25. Interface LCD • Buka CVAVR • File -> New -> Project • Setting LCD

  26. Deklarasivariabel #include <mega16.h> #include <stdio.h> #include <stdlib.h> #include <delay.h> // Alphanumeric LCD Module functions #asm .equ __lcd_port=0x15 ;PORTC #endasm #include <lcd.h> // Declare your global variables here char tulislcd[16]; void main(void) {

  27. Main Program // LCD module initialization lcd_init(16); while (1) { lcd_clear(); lcd_gotoxy(0,0); sprintf(tulislcd,"Workshop HME"); lcd_gotoxy(0,0); lcd_puts(tulislcd); delay_ms(50) ; } }

  28. INPUT BUTTON

  29. ACSR=0x80; • SFIOR=0x00; • while (1) • { • // Place your code here • if (PINA.0 == 1) • { • PORTC.1 = 1; • } • }; • }

  30. TUGAS • Bikin SISMIN - bisajalan - ATMEGA16 - tiap port bisadiakses - input supply dr adaptor danbaterai - 8 bit LED - LCD 16x2 2. BikinImplementasiKontrol LED dengan Button - masing2 led dikontrol 1 button - 1 led nyalasaatdipencet, saat yang lain dipencettidakbolehnyala - bikin running led 3. Implementasi LCD - tampilinbinnerdariLED yang nyala - bikin menu -> running led, manual led

  31. DEADLINE SIMULASI, 24-11-2013 • DEADLINE SEMUA JADI, 08–12-2013

More Related