Selasa, 02 Agustus 2011

tutorial simulasi menggunakan proteus

A. CARA PENGOPERASIAN PROTEUS

1. Klik Start Menu è Program è Proteus 7 profesional èIsis 7 profesional.

2. Klik component mode untuk mencari komponen yang dibutuhkan dan kemudian klik button P di sebelah kiri.

3. Apabila langkah dua benar, maka muncul jendela Pick devices seperti dibawah ini :

clip_image004

4. Pilih komponen yang anda butuhkan misalnya resistor 0,6 Watt metal film 100K. maka caranya seperti gambar dibawah ini :

clip_image006

Keterangan :

Klik tulisan resistor pada bagian kiri atas è kemudian pilih “0,6 watt metal film” è dan pilih nilai 100K.

5. Pada bagian kiri atas akan muncul daftar komponen baru yang telah dipilih.


clip_image008

6. Klik pada Minres100k lalu place pada form yang tersedia :

clip_image010

7. Klik kiri untuk meletekkan komponen :

clip_image012

8. Pilih lagi komponen yang anda butuhkan dan rangkailah sesuai keinginan anda.

9. Apabila anda menggunakan komponen mikrokontroler atau komponen yang memerlukan software untuk menjalankannya maka cara mendownload softwarenya adalah sebagai berikut :

a. Doblle klik komponen mikrokontroller dan akan muncul jendela baru seperti dibawah ini :

clip_image014

b. Klik file search pada bagian program file dan kemudian muncul lagi jendela baru seperti dibawah ini :

clip_image016

Pilih file.exe yang diinginkan lalu klik open.

c. Komponen sudah selesai di download.

10. Apabila anda ingin membuat PCB dari skema yang ada maka klik toolbar pada bagian kanan atas yang bertuliskan ares.

clip_image018

11. Secara otomatis ares akan terbuka.

12. Letakkan komponen sesuai keinginan anda.

13. Klik autorouter untuk membuat jalur secara otomatis.

clip_image020

14. Dan muncul jendela baru :

clip_image022

15. Klik begin routing, dan hasil routing pertama adalah sebagai berikut :

clip_image024

16. Ulangi lagi sampai hasil routing sesuai dengan yang anda inginkan.

17. Selamat mencoba.

B. FITUR-FITUR DALAM PROTEUS 7 PROFESIONAL

1. Dapat digunakan di windows 2k,windows XP dan windows seven.

2. Routing jalur PCB otomatis dan dot placement / removal.

3. Powerful tool untuk memilih objek dan mengatur propertinya.

4. Total support untuk bus termasuk pin komponen, inter sheet terminal, modul port dan kabel.

5. Bill of Material dan pemeriksa laporan electrical ruler.

6. Netlist outputs yang sesuai dengan semua PCB layout tools.

7. Desain hirarkis dengan parameter yang support dengan nilai komponen pada sub circuit.

8. Desain · Global Anotasi memungkinkan beberapa contoh dari rangkaian sub-komponen untuk memiliki referensi yang berbeda.

9. Automatic Anotasi - kemampuan untuk penomoran komponen secara otomatis.

C. TUTORIAL AVR

1. Buka program AVR melalui start menuèall programècodeVisionAvrèCodeVisionAVR – C compiler evaluation.

clip_image026

2. Code vision AVR terbuka

clip_image028

3. Klik fileènew,maka akan muncul jendela baru seperti gambar berikut :

clip_image030

4. Centang pada project kemudian klik OK dan muncul lagi jendela baru :

clip_image032

5. Klik YES untuk kemudian tampil pilihan :

clip_image034

6. Klik OK. Settingan Port dapat anda atur pada jendela baru seperti gambar dibawah ini :

clip_image036

7. Apabila anda telah selesai dalam pengaturan PORT,LCD,dsb. Maka klik fileè Generate, save and exit.

clip_image038

8. Muncul jendela baru untuk menentukan penamaan dan dimana anda menyimpan file tersebut.

clip_image040

9. Setelah anda menyimpannya, maka tampil script program sesuai dengan yang anda atur pada langkah sebelumnya. Anda tinggal menambah program utama.

clip_image042

10. Apabila program utama telah selesai maka anda harus mem-build all untuk mengubahnya menjadi file.exe. caranya tekan ctrl+F9 atau klik projectèbuild all.

clip_image044

11. Tampil notifikasi pada jendela baru.

clip_image046

12. Apabila sudah tidak ada error maka anda bisa mendownload program melalui Kazama bila untuk rangkaian yang sebenarnya dan dengan doblle klik pada gambar mikrokontroller apabila anda memakai simulasi menggunakan proteus.

13. Rangkaian siap di uji coba.

D. MEMBUAT RANGKAIAN ADC DENGAN INPUT POTENSIOMETER DENGANAN OUTPUT LCD DAN LED

clip_image048

ADC menggunakan fitur pada mikrokontroller ATmega 8535.

Daftar komponen :

Mikrokontroller Atmega 8535 1x

LCD 16x2 1x

Resistor 1K 9x

Capacitor 20pf 2x

Condensator electrolit 100uf 1x

Potensiometer 1K 1x

Potensiometer 100K 1x

Crystal 2MHz 1x

LED 9X

Script program :

/*****************************************************

This program was produced by the

CodeWizardAVR V2.04.6 Evaluation

Automatic Program Generator

© Copyright 1998-2010 Pavel Haiduc, HP InfoTech s.r.l.

http://www.hpinfotech.com

Project :

Version :

Date : 18/06/2011

Author : Freeware, for evaluation and non-commercial use only

Company :

Comments:

Chip type : ATmega8535

Program type : Application

AVR Core Clock frequency: 4,000000 MHz

Memory model : Small

External RAM size : 0

Data Stack size : 128

*****************************************************/

#include <mega8535.h>

#include <delay.h>

// Alphanumeric LCD Module functions

#asm

.equ __lcd_port=0x18 ;PORTB

#endasm

#include <lcd.h>

#define ADC_VREF_TYPE 0x60

// Read the 8 most significant bits

// of the AD conversion result

unsigned char read_adc(unsigned char adc_input)

{

ADMUX=adc_input | (ADC_VREF_TYPE & 0xff);

// Delay needed for the stabilization of the ADC input voltage

delay_us(10);

// Start the AD conversion

ADCSRA|=0x40;

// Wait for the AD conversion to complete

while ((ADCSRA & 0x10)==0);

ADCSRA|=0x10;

return ADCH;

}

// Declare your global variables here

void main(void)

{

// Declare your local variables here

unsigned char adcdt;

// LCD module initialization

lcd_init(16);

// Input/Output Ports initialization

// Port A initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTA=0x00;

DDRA=0x00;

// Port B initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTB=0x00;

DDRB=0x00;

// Port C initialization

// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out

// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0

PORTC=0x00;

DDRC=0xFF;

// Port D initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTD=0x00;

DDRD=0x00;

// Timer/Counter 0 initialization

// Clock source: System Clock

// Clock value: Timer 0 Stopped

// Mode: Normal top=FFh

// OC0 output: Disconnected

TCCR0=0x00;

TCNT0=0x00;

OCR0=0x00;

// Timer/Counter 1 initialization

// Clock source: System Clock

// Clock value: Timer1 Stopped

// Mode: Normal top=FFFFh

// OC1A output: Discon.

// OC1B output: Discon.

// Noise Canceler: Off

// Input Capture on Falling Edge

// Timer1 Overflow Interrupt: Off

// Input Capture Interrupt: Off

// Compare A Match Interrupt: Off

// Compare B Match Interrupt: Off

TCCR1A=0x00;

TCCR1B=0x00;

TCNT1H=0x00;

TCNT1L=0x00;

ICR1H=0x00;

ICR1L=0x00;

OCR1AH=0x00;

OCR1AL=0x00;

OCR1BH=0x00;

OCR1BL=0x00;

// Timer/Counter 2 initialization

// Clock source: System Clock

// Clock value: Timer2 Stopped

// Mode: Normal top=FFh

// OC2 output: Disconnected

ASSR=0x00;

TCCR2=0x00;

TCNT2=0x00;

OCR2=0x00;

// External Interrupt(s) initialization

// INT0: Off

// INT1: Off

// INT2: Off

MCUCR=0x00;

MCUCSR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization

TIMSK=0x00;

// Analog Comparator initialization

// Analog Comparator: Off

// Analog Comparator Input Capture by Timer/Counter 1: Off

ACSR=0x80;

SFIOR=0x00;

// ADC initialization

// ADC Clock frequency: 31,250 kHz

// ADC Voltage Reference: AVCC pin

// ADC High Speed Mode: Off

// ADC Auto Trigger Source: Free Running

// Only the 8 most significant bits of

// the AD conversion result are used

ADMUX=ADC_VREF_TYPE & 0xff;

ADCSRA=0xA7;

SFIOR&=0x0F;

// LCD module initialization

lcd_init(16);

while (1)

{

// Place your code here

adcdt=read_adc(0); //mengambil hasil konversi

PORTC=adcdt; //ditampilkan ke LED

lcd_gotoxy(0,0); //menempatkan kursor di baris 0 kolom 0

lcd_putsf("ADC read"); //menampilkan string “ADC read”

lcd_gotoxy(0,1); //menempatkan kursor di baris 1 kolom 0

lcd_putsf("Voltage"); //menampilkan string “Voltage”

}

}

E. MEMBUAT RANGKAIAN LCD

clip_image050

Daftar komponen :

Mikrokontroller Atmega 8535 1x

LCD 16x2 1x

Resistor 1K 9x

Capacitor 20pf 2x

Condensator electrolit 100uf 1x

Potensiometer 100K 1x

Crystal 2MHz 1x

Script program :

/*****************************************************

This program was produced by the

CodeWizardAVR V2.04.6 Evaluation

Automatic Program Generator

© Copyright 1998-2010 Pavel Haiduc, HP InfoTech s.r.l.

http://www.hpinfotech.com

Project :

Version :

Date : 19/06/2011

Author : Freeware, for evaluation and non-commercial use only

Company :

Comments:

Chip type : ATmega8535

Program type : Application

AVR Core Clock frequency: 4,000000 MHz

Memory model : Small

External RAM size : 0

Data Stack size : 128

*****************************************************/

#include <mega8535.h>

// Alphanumeric LCD Module functions

#asm

.equ __lcd_port=0x18 ;PORTB

#endasm

#include <lcd.h>

// Declare your global variables here

void main(void)

{

// Declare your local variables here

// LCD module initialization

lcd_init(16);

// Input/Output Ports initialization

// Port A initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTA=0x00;

DDRA=0x00;

// Port B initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTB=0x00;

DDRB=0x00;

// Port C initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTC=0x00;

DDRC=0x00;

// Port D initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTD=0x00;

DDRD=0x00;

// Timer/Counter 0 initialization

// Clock source: System Clock

// Clock value: Timer 0 Stopped

// Mode: Normal top=FFh

// OC0 output: Disconnected

TCCR0=0x00;

TCNT0=0x00;

OCR0=0x00;

// Timer/Counter 1 initialization

// Clock source: System Clock

// Clock value: Timer1 Stopped

// Mode: Normal top=FFFFh

// OC1A output: Discon.

// OC1B output: Discon.

// Noise Canceler: Off

// Input Capture on Falling Edge

// Timer1 Overflow Interrupt: Off

// Input Capture Interrupt: Off

// Compare A Match Interrupt: Off

// Compare B Match Interrupt: Off

TCCR1A=0x00;

TCCR1B=0x00;

TCNT1H=0x00;

TCNT1L=0x00;

ICR1H=0x00;

ICR1L=0x00;

OCR1AH=0x00;

OCR1AL=0x00;

OCR1BH=0x00;

OCR1BL=0x00;

// Timer/Counter 2 initialization

// Clock source: System Clock

// Clock value: Timer2 Stopped

// Mode: Normal top=FFh

// OC2 output: Disconnected

ASSR=0x00;

TCCR2=0x00;

TCNT2=0x00;

OCR2=0x00;

// External Interrupt(s) initialization

// INT0: Off

// INT1: Off

// INT2: Off

MCUCR=0x00;

MCUCSR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization

TIMSK=0x00;

// Analog Comparator initialization

// Analog Comparator: Off

// Analog Comparator Input Capture by Timer/Counter 1: Off

ACSR=0x80;

SFIOR=0x00;

// LCD module initialization

lcd_init(16);

while (1)

{

// Place your code here

lcd_gotoxy(0,0); //menempatkan kursor di baris 0 kolom 0

lcd_putsf("Tugas LCD"); //menampilkan string “tugas LCD”

lcd_gotoxy(0,1); //menempatkan kursor di baris 1 kolom 0

lcd_putsf("Bahasa assembler"); //menampilkan string “Bahasa assembler”

}

}

F. MEMBUAT RANGKAIAN LED

clip_image052

Daftar komponen :

Mikrokontroller Atmega 8535 1x

Resistor 1K 9x

Capacitor 20pf 2x

Condensator electrolit 100uf 1x

Potensiometer 100K 1x

Crystal 2MHz 1x

Script program :

/*****************************************************

This program was produced by the

CodeWizardAVR V2.04.6 Evaluation

Automatic Program Generator

© Copyright 1998-2010 Pavel Haiduc, HP InfoTech s.r.l.

http://www.hpinfotech.com

Project :

Version :

Date : 17/06/2011

Author : Freeware, for evaluation and non-commercial use only

Company :

Comments:

Chip type : ATmega8535

Program type : Application

AVR Core Clock frequency: 4,000000 MHz

Memory model : Small

External RAM size : 0

Data Stack size : 128

*****************************************************/

#include <mega8535.h>

#include <delay.h>

// Declare your global variables here

void main(void)

{

// Declare your local variables here

// Input/Output Ports initialization

// Port A initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTA=0x00;

DDRA=0x00;

// Port B initialization

// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out

// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0

PORTB=0x00;

DDRB=0xFF;

// Port C initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTC=0x00;

DDRC=0x00;

// Port D initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTD=0x00;

DDRD=0x00;

// Timer/Counter 0 initialization

// Clock source: System Clock

// Clock value: Timer 0 Stopped

// Mode: Normal top=FFh

// OC0 output: Disconnected

TCCR0=0x00;

TCNT0=0x00;

OCR0=0x00;

// Timer/Counter 1 initialization

// Clock source: System Clock

// Clock value: Timer1 Stopped

// Mode: Normal top=FFFFh

// OC1A output: Discon.

// OC1B output: Discon.

// Noise Canceler: Off

// Input Capture on Falling Edge

// Timer1 Overflow Interrupt: Off

// Input Capture Interrupt: Off

// Compare A Match Interrupt: Off

// Compare B Match Interrupt: Off

TCCR1A=0x00;

TCCR1B=0x00;

TCNT1H=0x00;

TCNT1L=0x00;

ICR1H=0x00;

ICR1L=0x00;

OCR1AH=0x00;

OCR1AL=0x00;

OCR1BH=0x00;

OCR1BL=0x00;

// Timer/Counter 2 initialization

// Clock source: System Clock

// Clock value: Timer2 Stopped

// Mode: Normal top=FFh

// OC2 output: Disconnected

ASSR=0x00;

TCCR2=0x00;

TCNT2=0x00;

OCR2=0x00;

// External Interrupt(s) initialization

// INT0: Off

// INT1: Off

// INT2: Off

MCUCR=0x00;

MCUCSR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization

TIMSK=0x00;

// Analog Comparator initialization

// Analog Comparator: Off

// Analog Comparator Input Capture by Timer/Counter 1: Off

ACSR=0x80;

SFIOR=0x00;

while (1)

{

// Place your code here

PORTB=0x0f;

delay_ms(500);

PORTB=0xf0;

delay_ms(500);

PORTB=0b10000000;

delay_ms(500);

PORTB=0b01000000;

delay_ms(500);

PORTB=0b00100000;

delay_ms(500);

PORTB=0b00010000;

delay_ms(500);

PORTB=0b00001000;

delay_ms(500);

PORTB=0b00000100;

delay_ms(500);

PORTB=0b00000010;

delay_ms(500);

PORTB=0b00000001;

delay_ms(500);

PORTB=0b00000001;

delay_ms(500);

PORTB=0b00000010;

delay_ms(500);

PORTB=0b00000100;

delay_ms(500);

PORTB=0b00001000;

delay_ms(500);

PORTB=0b00010000;

delay_ms(500);

PORTB=0b00100000;

delay_ms(500);

PORTB=0b01000000;

delay_ms(500);

PORTB=0b10000000;

delay_ms(500);

}

}

G. MEMBUAT RANGKAIAN SEVEN SEGMENT


PopAds.net - The Best Popunder Adnetwork


clip_image054


PopAds.net - The Best Popunder Adnetwork


Daftar komponen :

Mikrokontroller Atmega 8535 1x

Resistor 1K 1x

Capacitor 20pf 2x

Condensator electrolit 100uf 1x

Potensiometer 100K 1x

Crystal 2MHz 1x

Seven segment common cathode 1x

Script program :

/*****************************************************

This program was produced by the

CodeWizardAVR V2.04.6 Evaluation

Automatic Program Generator

© Copyright 1998-2010 Pavel Haiduc, HP InfoTech s.r.l.

http://www.hpinfotech.com

Project :

Version :

Date : 04/07/2011

Author : Freeware, for evaluation and non-commercial use only

Company :

Comments:

Chip type : ATmega8535

Program type : Application

AVR Core Clock frequency: 4,000000 MHz

Memory model : Small

External RAM size : 0

Data Stack size : 128

*****************************************************/

#include <mega8535.h>

#include <delay.h>

// Declare your global variables here

void main(void)

{

// Declare your local variables here

// Input/Output Ports initialization

// Port A initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTA=0x00;

DDRA=0x00;

// Port B initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTB=0x00;

DDRB=0x00;

// Port C initialization

// Func7=Out Func6=Out Func5=Out Func4=Out Func3=Out Func2=Out Func1=Out Func0=Out

// State7=0 State6=0 State5=0 State4=0 State3=0 State2=0 State1=0 State0=0

PORTC=0x00;

DDRC=0xFF;

// Port D initialization

// Func7=In Func6=In Func5=In Func4=In Func3=In Func2=In Func1=In Func0=In

// State7=T State6=T State5=T State4=T State3=T State2=T State1=T State0=T

PORTD=0x00;

DDRD=0x00;

// Timer/Counter 0 initialization

// Clock source: System Clock

// Clock value: Timer 0 Stopped

// Mode: Normal top=FFh

// OC0 output: Disconnected

TCCR0=0x00;

TCNT0=0x00;

OCR0=0x00;

// Timer/Counter 1 initialization

// Clock source: System Clock

// Clock value: Timer1 Stopped

// Mode: Normal top=FFFFh

// OC1A output: Discon.

// OC1B output: Discon.

// Noise Canceler: Off

// Input Capture on Falling Edge

// Timer1 Overflow Interrupt: Off

// Input Capture Interrupt: Off

// Compare A Match Interrupt: Off

// Compare B Match Interrupt: Off

TCCR1A=0x00;

TCCR1B=0x00;

TCNT1H=0x00;

TCNT1L=0x00;

ICR1H=0x00;

ICR1L=0x00;

OCR1AH=0x00;

OCR1AL=0x00;

OCR1BH=0x00;

OCR1BL=0x00;

// Timer/Counter 2 initialization

// Clock source: System Clock

// Clock value: Timer2 Stopped

// Mode: Normal top=FFh

// OC2 output: Disconnected

ASSR=0x00;

TCCR2=0x00;

TCNT2=0x00;

OCR2=0x00;

// External Interrupt(s) initialization

// INT0: Off

// INT1: Off

// INT2: Off

MCUCR=0x00;

MCUCSR=0x00;

// Timer(s)/Counter(s) Interrupt(s) initialization

TIMSK=0x00;

// Analog Comparator initialization

// Analog Comparator: Off

// Analog Comparator Input Capture by Timer/Counter 1: Off

ACSR=0x80;

SFIOR=0x00;

while (1)

{

// Place your code here

PORTC=0x3F;

delay_ms(500);

PORTC=0x06;

delay_ms(500);

PORTC=0xDB;

delay_ms(500);

PORTC=0xCF;

delay_ms(500);

PORTC=0xE6;

delay_ms(500);

PORTC=0xED;

delay_ms(500);

PORTC=0xFD;

delay_ms(500);

PORTC=0x07;

delay_ms(500);

PORTC=0xFF;

delay_ms(500);

PORTC=0xEF;

delay_ms(500);

}

}



PopAds.net - The Best Popunder Adnetwork

Reaksi:

9 komentar:

Poskan Komentar

Enter your email address:

Delivered by FeedBurner