33
PART 3 TRAINING OUTPUT LED Dosen : Dwisnanto Putro, ST, M.Eng

PART 3 TRAINING OUTPUT LED

  • Upload
    tarika

  • View
    23

  • Download
    1

Embed Size (px)

DESCRIPTION

PART 3 TRAINING OUTPUT LED. Dosen : Dwisnanto Putro , ST, M.Eng. LED (LIGHT EMITING DIODE). Untuk LED ANODA : Logika 0 = led menyala Logika 1 = led mati Untuk LED KATODA : Logika 0 = led mati Logika 1 = led menyala. New Project. Run CodeVision. Chip select. - PowerPoint PPT Presentation

Citation preview

Page 1: PART  3 TRAINING OUTPUT LED

PART 3TRAINING OUTPUT LEDDosen : Dwisnanto Putro, ST, M.Eng

Page 2: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• 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)

Page 3: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

Page 4: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

Page 5: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•New Project

• Run CodeVision

Page 6: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

Page 7: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• Chip select

Page 8: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

configuration chip select• Chip ATMEGA 8535• Clock 8.000000 Mhz

Page 9: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

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

Page 10: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• Save and Generate

Page 11: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• Save File – make folder and files

Page 12: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•Display

Page 13: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•Configuration ready compile

Page 14: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

Page 15: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•CODE PROGRAM• Untuk menyalakan sebuah led misalkan pada posisi PORTC.0• (PORTC memiliki 8 buah PIN. Pin 0-7), maka Dapat dituliskan pada akhir program yang

paling bawah;

while(1){

//Place your code here) PORTC.0=0;PORTC.1=1;PORTC.2=1;PORTC.3=1;PORTC.4=1;PORTC.5=1;PORTC.6=1;PORTC.7=1;

} }

Page 16: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

Penulisan code dengan Cara lain :PORTC= 0b1111110;

Atau

PORTC = 0x7E ; // 1111110

Page 17: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

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....)

Page 18: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•Configuration PORT Programmer

Page 19: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

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

Page 20: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•COMPILER AND BUILD ALL PROGRAM

Or Shift F9

Page 21: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• Connecting USB Downloader - PC/Laptop - Microcontroller, And....

Page 22: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• Process Downloading.........

Page 23: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

FINISH

Page 24: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• Error DOWNLOADING

Solution :• Check COM PORT• Check Baud Rate• Check Connection Downloader• Check Prog/Serial TTL select

Page 25: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

•CV AVR WITH PROTEUS

OPEN PROGRAM ISIS PROTEUS PROFESSIONAL

Page 26: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• synchronization cv avr with proteus• Creat Project and Design•Double click pict microcntroller

Page 27: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

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

Page 28: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

• synchronization cv avr with proteus

• Running ISIS Proteus

• FINISH...

Created by. Dwisnanto Putro, Manado, September 2012

Page 29: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

TASK•BUATLAH project dengan system menyalakan led hanya pada PORTC.1, PORTC.3, PORTC.5, dan PORTC.7 . PORT Yang lainnya MATI

Page 30: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

TASK•BUATLAH project dengan system menyalakan led hanya pada PORTC.0, PORTC.2, PORTC.4, DAN PORTC.6 . PORT Yang lainnya MATI

Page 31: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

TASK•BUATLAH project dengan system menyalakan led hanya pada PORTC.1, PORTC.4, PORTC.6, dan PORTC.7. PORT Yang lainnya MATI. Dengan menggunakan cara pengalamatan HEXA.

Page 32: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

TASK•BUATLAH project dengan system menyalakan led hanya pada PORTC.7, PORTC.6, PORTC.3, PORTC.1 dan PORTC.0. PORT Yang lainnya MATI.

Page 33: PART  3 TRAINING OUTPUT LED

Published By Stefanikha69

TASK•BUATLAH project dengan system menyalakan led hanya pada PORTC.2, PORTC.7, PORTC.6 dan PORTC.1. PORT Yang lainnya MATI.