PART 5 TRAINING INPUT Input Input 1 Mikrokontroler

  • Slides: 39
Download presentation
PART 5 TRAINING INPUT

PART 5 TRAINING INPUT

Input • Input 1 = Mikrokontroler menerima Input berupa tegangan (+) • Input 0

Input • Input 1 = Mikrokontroler menerima Input berupa tegangan (+) • Input 0 = Mikrokontroler menerima Input berupa tegangan (–) ataupun Ground Published by. imeldaflorensia 91

 • Cara kerja Push Button Published by. imeldaflorensia 91

• Cara kerja Push Button Published by. imeldaflorensia 91

 • System Push Button Published by. imeldaflorensia 91

• System Push Button Published by. imeldaflorensia 91

 • Jenis-Jenis Push Button Published by. imeldaflorensia 91

• Jenis-Jenis Push Button Published by. imeldaflorensia 91

 • Rangkaian Push Button • Mikrokontroler menerima sinyal Ground Published by. imeldaflorensia 91

• Rangkaian Push Button • Mikrokontroler menerima sinyal Ground Published by. imeldaflorensia 91

 • Rangkaian Push Button Pada Uc Published by. imeldaflorensia 91

• Rangkaian Push Button Pada Uc Published by. imeldaflorensia 91

 • Struktur program kode INPUT if (syarat ==) {statement/proses; } Published by. imeldaflorensia

• Struktur program kode INPUT if (syarat ==) {statement/proses; } Published by. imeldaflorensia 91

 • Struktur program kode INPUT else if (syarat ==) {statement/proses; } else {statement/proses;

• Struktur program kode INPUT else if (syarat ==) {statement/proses; } else {statement/proses; } Published by. imeldaflorensia 91

 • New Project • Run Code. Vision Published by. imeldaflorensia 91

• New Project • Run Code. Vision Published by. imeldaflorensia 91

Published by. imeldaflorensia 91

Published by. imeldaflorensia 91

 • Chip select Published by. imeldaflorensia 91

• Chip select Published by. imeldaflorensia 91

configuration chip select • Chip ATMEGA 8535 • Clock 8. 000000 Mhz Published by.

configuration chip select • Chip ATMEGA 8535 • Clock 8. 000000 Mhz Published by. imeldaflorensia 91

 • Untuk port gunakan PORTC untuk LED PORTC. 0 – PORTC. 7 =

• Untuk port gunakan PORTC untuk LED PORTC. 0 – PORTC. 7 = output (0) Published by. imeldaflorensia 91

 • Gunakan PORTD. 2 dan PORTD. 3 sebagai Input pullup (P) Published by.

• Gunakan PORTD. 2 dan PORTD. 3 sebagai Input pullup (P) Published by. imeldaflorensia 91

 • Save and Generate Published by. imeldaflorensia 91

• Save and Generate Published by. imeldaflorensia 91

 • Save File – make folder and files Published by. imeldaflorensia 91

• Save File – make folder and files Published by. imeldaflorensia 91

 • Display Published by. imeldaflorensia 91

• Display Published by. imeldaflorensia 91

 • Configuration ready compile Published by. imeldaflorensia 91

• Configuration ready compile Published by. imeldaflorensia 91

Published by. imeldaflorensia 91

Published by. imeldaflorensia 91

 • CODE PROGRAM • Untuk menyalakan led pada posisi PORTC. 0 dengan syarat

• CODE PROGRAM • Untuk menyalakan led pada posisi PORTC. 0 dengan syarat harus menekan pushbutton PORTD. 2; while(1){ if (PIND. 2==0) {PORTC=0 b 11111110; } }} // jika PIND. 2 ditekan // led nyala PORTC. 0 Published by. imeldaflorensia 91

SETTING USB – DOWNLOADER : • • INSTALL DEVICE USB DOWNLOADER CONNECT USB DOWNLOADER

SETTING USB – DOWNLOADER : • • INSTALL DEVICE USB DOWNLOADER CONNECT USB DOWNLOADER TO PC/LAPTOP SETTING COM PORT: • • COMPUTER -> MANAGE -> DEVICE MANAGER PORT (COM &LPT) -> PROLIFIC USB TO SERIAL COMM PORT (COM. . ) Published by. imeldaflorensia 91

 • Configuration PORT Programmer Published by. imeldaflorensia 91

• Configuration PORT Programmer Published by. imeldaflorensia 91

Choice : • AVR Chip programmer type • COM PORT • BAUD RATE Published

Choice : • AVR Chip programmer type • COM PORT • BAUD RATE Published by. imeldaflorensia 91

 • COMPILER AND BUILD ALL PROGRAM Or Shift F 9 Published by. imeldaflorensia

• COMPILER AND BUILD ALL PROGRAM Or Shift F 9 Published by. imeldaflorensia 91

 • Connecting USB Downloader - PC/Laptop Microcontroller, And. . Published by. imeldaflorensia 91

• Connecting USB Downloader - PC/Laptop Microcontroller, And. . Published by. imeldaflorensia 91

 • Process Downloading. . Published by. imeldaflorensia 91

• Process Downloading. . Published by. imeldaflorensia 91

FINISH Published by. imeldaflorensia 91

FINISH Published by. imeldaflorensia 91

 • Error DOWNLOADING Solution : • Check COM PORT • Check Baud Rate

• Error DOWNLOADING Solution : • Check COM PORT • Check Baud Rate • Check Connection Downloader • Check Prog/Serial TTL select Published by. imeldaflorensia 91

 • CV AVR WITH PROTEUS OPEN PROGRAM ISIS PROTEUS PROFESSIONAL Published by. imeldaflorensia

• CV AVR WITH PROTEUS OPEN PROGRAM ISIS PROTEUS PROFESSIONAL Published by. imeldaflorensia 91

 • synchronization cv avr with proteus • Creat Project and Design • Double

• synchronization cv avr with proteus • Creat Project and Design • Double click pict microcntroller Published by. imeldaflorensia 91

 • synchronization cv avr with proteus • Select clock frequency • Select program

• synchronization cv avr with proteus • Select clock frequency • Select program file, (HEX file type) Published by. imeldaflorensia 91

 • synchronization cv avr with proteus • Running ISIS Proteus • FINISH. .

• synchronization cv avr with proteus • Running ISIS Proteus • FINISH. . . Created by. Dwisnanto Putro, Manado, September 2012 Published by. imeldaflorensia 91

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA LED pada PORTC. 2 MENYALA • JIKA TIDAK DITEKAN PUSHBUTTON PADA PORTD. 2 MAKA LED PADA PORTC. 2 MATI Published by. imeldaflorensia 91

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA LED pada PORTC. 2 MENYALA • JIKA PUSH BUTTON PADA PORTD. 3 DITEKAN MAKA LED pada PORTC. 3 MENYALA Published by. imeldaflorensia 91

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA LED pada PORTC. 2 MENYALA • JIKA PUSH BUTTON PADA PORTD. 3 DITEKAN MAKA LED pada PORTC. 3 MENYALA • JIKA TIDAK DITEKAN PUSHBUTTON PADA PORTD. 2 dan PORTD. 3 MAKA LED PADA PORTC. 2 DAN PORTC. 3 MATI Published by. imeldaflorensia 91

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA LED pada PORTC. 2 MENYALA BERKEDIP SEBANYAK 2 KALI • JIKA PUSH BUTTON PADA PORTD. 3 DITEKAN MAKA LED pada PORTC. 3 MENYALA BERKEDIP SEBANYAK 3 KALI • DENGAN DELAY = 300 ms Published by. imeldaflorensia 91

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA LED pada PORTC. 2 MENYALA • JIKA PUSH BUTTON PADA PORTD. 3 DITEKAN MAKA LED pada PORTC. 3 MENYALA • JIKA PUSH BUTTON PADA PORTD. 2 DAN PORTD. 3 DITEKAN BERSAMAAN MAKA LED SEMUA MATI Published by. imeldaflorensia 91

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA

TASK BUATLAH project dengan system: • JIKA PUSH BUTTON PADA PORTD. 2 DITEKAN MAKA terjadi proses LED berjalan pada PORTC. 0 s/d PORTC. 7 • JIKA PUSH BUTTON PADA PORTD. 3 DITEKAN MAKA terjadi proses LED berjalan pada PORTC. 7 s/d PORTC. 0 Published by. imeldaflorensia 91