Presentasi sedang didownload. Silahkan tunggu

Presentasi sedang didownload. Silahkan tunggu

PART 4 TRAINING DELAY Dosen : Dwisnanto Putro, ST, M.Eng.

Presentasi serupa


Presentasi berjudul: "PART 4 TRAINING DELAY Dosen : Dwisnanto Putro, ST, M.Eng."— Transcript presentasi:

1 PART 4 TRAINING DELAY Dosen : Dwisnanto Putro, ST, M.Eng

2 • Untuk LED ANODA : Logika 0 = led menyala Logika 1 = led mati • Untuk LED KATODA :Logika 0 = led mati Logika 1 = led menyala LED (LIGHT EMITING DIODE) Published By Stefanikha69

3

4

5 • Delay = tunda • Penundaan terhadap kinerja mikrokontroler • DELAY Published By Stefanikha69

6 • Menghasilkan delay dalam program-C berada pada header delay.h yang harus dimasukan (include) sebelum digunakan. • Sebelum memanggil fungsi, interupsi harus dimatikan terlebih dahulu, apabila tidak maka delay akan lebih lama dari yang diharapkan. Juga sangat penting untuk menyebutkan frekuensi clock chip IC AVR yang digunakan pada menu Project – configure - C compiler - Code Generation. • DELAY Published By Stefanikha69

7 • Header delay #include • Perintah delay delay_ms(------); Waktu tunda dalam milidetik: Misalkan: delay_ms(1000); berarti ditunda selama 1 detik • DELAY Published By Stefanikha69

8 • Dengan system delay, menciptakan system sinyal pulsa • DELAY Published By Stefanikha69

9 • New Project • Run CodeVision Published By Stefanikha69

10

11 • Chip select Published By Stefanikha69

12 configuration chip select • Chip ATMEGA 8535 • Clock Mhz Published By Stefanikha69

13 • Untuk port gunakan PORTC untuk LED PORTC.0 – PORTC.7 = output (0) Published By Stefanikha69

14 • Save and Generate Published By Stefanikha69

15 • Save File – make folder and files Published By Stefanikha69

16 • Display Published By Stefanikha69

17 • Configuration ready compile Published By Stefanikha69

18

19 • CODE PROGRAM • Untuk menyalakan led bergantian misalkan pada posisi PORTC.0, PORTC.1 dan PORTC.2 dengan masing-masing waktu tunda selama 1 detik. (jadi waktu keseluruhan yang dibutuhkan sistem yaitu 3 detik) while(1){ PORTC=0b ; Delay_ms(1000); PORTC=0b ; Delay_ms(1000); PORTC=0b ; Delay_ms(1000); } Published By Stefanikha69

20 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 Stefanikha69

21 • Configuration PORT Programmer Published By Stefanikha69

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

23 • COMPILER AND BUILD ALL PROGRAM Or Shift F9 Published By Stefanikha69

24 • Connecting USB Downloader - PC/Laptop - Microcontroller, And.... Published By Stefanikha69

25 • Process Downloading Published By Stefanikha69

26 FINISH Published By Stefanikha69

27 • Error DOWNLOADING Solution : • Check COM PORT • Check Baud Rate • Check Connection Downloader • Check Prog/Serial TTL select Published By Stefanikha69

28 • CV AVR WITH PROTEUS OPEN PROGRAM ISIS PROTEUS PROFESSIONAL Published By Stefanikha69

29 • synchronization cv avr with proteus • Creat Project and Design • Double click pict microcntroller Published By Stefanikha69

30 • synchronization cv avr with proteus • Select clock frequency • Select program file, (HEX file type) Published By Stefanikha69

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

32 TASK • BUATLAH project dengan system led berjalan pada PORTC.7, PORTC.6 dan PORTC.5 dengan masing-masing delay 250 ms Published By Stefanikha69

33 TASK • BUATLAH project dengan system led berjalan pada PORTC.0, PORTC.2, PORTC.4 dan PORTC.6 dengan sistem led menyala secara berurutan bergantian. masing- masing delay 100 ms. Published By Stefanikha69

34 TASK • BUATLAH project dengan system led berjalan pada PORTC.0 s/d PORTC.3. masing-masing delay 150 ms. Misalkan: • Step 1: hanya PORTC.0 menyala • Step 2: hanya PORTC.1 menyala • Step 3: hanya PORTC.2 menyala • Step 4: hanya PORTC.3 menyala Published By Stefanikha69

35 TASK • BUATLAH project dengan system led berjalan pada PORTC.1 s/d PORTC.6. masing-masing delay 100 ms. Misalkan: • Step 1: hanya PORTC.1 mati • Step 2: hanya PORTC.2 mati • Step 3: hanya PORTC.3 mati • Step 4: hanya PORTC.4 mati • Step 5: hanya PORTC.5 mati • Step 6: hanya PORTC.6 mati (PORTC Yang lain menyala) Published By Stefanikha69

36 TASK • BUATLAH project dengan system led berjalan pada PORTC.0 s/d PORTC.7. masing-masing delay 100 ms. (Secara berurutan menyala dari PORTC.0 s/d PORTC.7) Published By Stefanikha69

37 TASK • BUATLAH project dengan system led berjalan pada PORTC.0 s/d PORTC.7. masing-masing delay 100 ms. (Secara berurutan menyala dari PORTC.7 s/d PORTC.0) Published By Stefanikha69

38 TASK • BUATLAH project dengan system led berjalan pada PORTC.0 s/d PORTC.7. masing-masing delay 100 ms. Misalkan: • Step 1: PORTC.0 dan PORTC.7 ON • Step 2: PORTC.1 dan PORTC.6 ON • Step 3: PORTC.2 dan PORTC.5 ON • Step 4: PORTC.3 dan PORTC.4 ON Published By Stefanikha69

39 TASK • BUATLAH project dengan system led berjalan pada PORTC.0 s/d PORTC.7. masing-masing delay 100 ms. Misalkan: • Step 1: PORTC.0 dan PORTC.7 ON • Step 2: PORTC.1 dan PORTC.6 ON • Step 3: PORTC.2 dan PORTC.5 ON • Step 4: PORTC.3 dan PORTC.4 ON • Step 5: PORTC.2 dan PORTC.5 ON • Step 6: PORTC.1 dan PORTC.6 ON • Step 7: PORTC.0 dan PORTC.7 ON Published By Stefanikha69


Download ppt "PART 4 TRAINING DELAY Dosen : Dwisnanto Putro, ST, M.Eng."

Presentasi serupa


Iklan oleh Google