132
TUGAS AKHIR PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK MENGGUNAKAN CPLD/FPGA Diajukan Untuk Memenuhi Salah Satu Syarat Memperoleh Gelar Sarjana Teknik Program Studi Teknik Elektro Disusun oleh: NENDAR WIBARASTA NIM : 035114037 PROGRAM STUDI TEKNIK ELEKTRO FAKULTAS SAINS DAN TEKNOLOGI UNIVERSITAS SANATA DHARMA YOGYAKARTA 2010 i

PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

TUGAS AKHIR

PEMBANGKIT GELOMBANG SINUS, SEGITIGA

DAN KOTAK MENGGUNAKAN CPLD/FPGA

Diajukan Untuk Memenuhi Salah Satu Syarat Memperoleh Gelar Sarjana Teknik

Program Studi Teknik Elektro

Disusun oleh:

NENDAR WIBARASTA

NIM : 035114037

PROGRAM STUDI TEKNIK ELEKTRO FAKULTAS SAINS DAN TEKNOLOGI

UNIVERSITAS SANATA DHARMA YOGYAKARTA

2010

i

Page 2: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

FINAL ASSIGNMENT

WAVEFORM GENERATOR OF SINE, TRIANGLE

AND SQUARE WAVE USING CPLD/FPGA

Presented as Partial Fulfillment of the Requirements

To Obtain the Sarjana Teknik Degree In Electrical Engineering Study Program

NENDAR WIBARASTA

NIM : 035114037

ELECTRICAL ENGINEERING STUDY PROGRAM SCIENCE AND TECHNOLOGY FACULTY

SANATA DHARMA UNIVERSITY YOGYAKARTA

2010

ii

Page 3: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …
Page 4: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …
Page 5: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …
Page 6: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

MOTTO DAN PERSEMBAHAN

“ If we knew what we were doing, it wouldn't be called research, would

it? "

(Albert Einstein)

"Security is mostly a superstition... Life is either a daring adventure, or

nothing."

(Hellen Keller)

“Try to keep everything simple, since we don’t need to exaggerate

anything”

Kupersembahkan Tugas Akhir ini untuk :

Allah Bapa di Surga atas kasih dan karunia-Nya.

Bapak, ibu dan adikku tercinta.

Almamaterku Teknik Elektro USD

vi

Page 7: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …
Page 8: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK MENGGUNAKAN CPLD/FPGA

Nendar Wibarasta 035114037

INTISARI

Kemampuan untuk membangkitkan bentuk gelombang seperti gelombang sinus, gelombang segitiga dan gelombang kotak sudah menjadi hal yang sangat penting dalam dunia medis, telekomunikasi, dan industri. Namun sinyal analog memiliki resiko sangat rentan terhadap derau, sehingga pembangkitan gelombang secara digital yang tahan derau menjadi sangat penting.

Pembangkitan sinyal atau gelombang secara digital pada penelitian ini dirancang menggunakan teknik Direct Digital Synthesis atau DDS. Sederetan bilangan biner 8 bit digunakan sebagai tuning word. Tuning word ini yang akan menentukan frekuensi keluaran gelombang keluaran. Pengubahan nilai tuning word akan merubah nilai frekuensi keluaran pada semua jenis gelombang yang dibangkitkan. Pengubahan nilai amplitudo dilakukan secara analog pada bagian Digital to Analog Converter. Penelitian ini belum selesai dan hanya berhasil sampai pada tahap simulasi. Simulasi dari aplikasi pembentuk gelombang ini membuktikan bahwa frekuensi keluaran dapat diubah-ubah secara digital. Pengujian amplitudo gelombang tidak dapat dilakukan dikarenakan blok DAC belum dibuat. Kata kunci : Direct Digital Synthesis, gelombang , frekuensi.

viii

Page 9: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

WAVEFORM GENERATOR OF SINE, TRIANGLE

AND SQUARE WAVE USING CPLD/FPGA

Nendar Wibarasta 035114037

ABSTRACT

The ability to generate the waveforms such as sinewave, triangle wave and square wave has become an important subject in the field of medication, telecommunication and industry. But the analog signal is fragile of noise, so it is important to generate digital waveforms which are persistent of noise.

The waveform generator in this research is designed using Direct Digital Synthesis method, which is usually abbreviated to DDS. The 8 bits of binary numbers are used as tuning word. This tuning word will determine the frequency of the output waveforms. The changing value of tuning word will change the value of the output frequency of the waveform, while the the changing the waveform’s amplitude is operated in Digital to Analog Converter (DAC).

This research is not completed yet, and only proceeds until the simulation session. It is proved from the simulation that the waveform’s frequency can be changed digitally. The test of amplitude of the analog waveform could not be completed due to the DAC part that has not been built yet. Key words: Direct Digital Synthesis, waveform, frequency.

ix

Page 10: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …
Page 11: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAFTAR ISI

Halaman

HALAMAN JUDUL DALAM BAHASA INDONESIA…………………..…........ i

HALAMAN JUDUL DALAM BAHASA INGGRIS............................................... ii

LEMBAR PENGESAHAN OLEH PEMBIMBING ………………………............ iii

LEMBAR PENGESAHAN OLEH PENGUJI ………………………………......... iv

LEMBAR PERNYATAAN KEASLIAN KARYA …………………….……........ v

MOTTO DAN PERSEMBAHAN …………………………………….….……...... vi

LEMBAR PERNYATAAN PERSETUJUAN PUBLIKASI KARYA ILMIAH

UNTUK KEPENTINGAN AKADEMIS.................................................................. vii

INTISARI ……………………………………………………………………......... viii

ABSTRACT ……………………………………………………………………..... ix

KATA PENGANTAR ………………………………………………………… ..... x

DAFTAR ISI …………………………………………………………………........ xi

DAFTAR GAMBAR ………………………………………….………………....... xiv

BAB I PENDAHULUAN …………………………..………………………... 1

1.1. Latar Belakang Masalah …………………..…………………….. 1

1.2. Tujuan dan Manfaat Penelitian……………………..……………. 2

1.3. Batasan Masalah ……………………………………………….... 2

1.4. Metodologi Penelitian....... ……………………..…………........... 2

1.5. Sistematika Penulisan ………………………………………….... 2

BAB II DASAR TEORI ………………………………………….…………... 3

2.1. Metode Direct Digital Synthesis……………………..………….. 3

2.1.1. Akumulator............. ……………………………….......... 4

2.1.2. ROM Look Up Table............ ………………..…….......... 4

2.1.3 Register Parallel In Parallel Out................ ...................... 5

xi

Page 12: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

2.1.4 Penambah/Pengurang Komplemen 2................................. 5

2.1.5 Mekanisme Pengubahan Frekuensi .................................... 6

2.1.6 Digital to Analog Converter............................................... 7

2.2. Konsep Perancangan Sistem Digital dengan Menggunakan Perangkat

Lunak Altera Max+Plus II ……..................................................... 8

2.3. Complex Programmable Logic Device 9

BAB III PERANCANGAN PEMBANGKIT BENTUK GELOMBANG........ 10

3.1. Perancangan Arsitektur Pembangkit Gelombang............................ 11

3.1.1. Perancangan Register Input ................................................ 11

3.1.2. Perancangan Blok Akumulator Fasa................................... 11

3.1.3. Perancangan Blok ROM Gelombang Sinus....................... 12

3.1.4. Perancangan Pengontrol Gelombang Segitiga.................... 13

3.1.5. Perancangan Pengontrol Gelombang Segi Empat.............. 14

3.1.6. Perancangan Pengontrol Output......................................... 14

3.1.7. Perancangan Register Output.............................................. 14

3.1.8 Perancangan Blok Digital to Analog Converter.................. 14

3.2. Metode Pembentukan Gelombang Sinus........................................ 15

3.3. Metode Pembentukan Gelombang Segitiga ..................................... 17

3.4. Metode Pembentukan Gelombang Kotak......................................... 19

3.5. Pin Pengontrol, Pin Masukan, dan Pin Keluaran Pada UP1 Board 20

3.6. Penggunaan Flex Switch Pada Papan UP1 Board........................... .. 21

3.7. Perancangan Pembagi Frekuensi....................................................... 21

3.8. Perancangan Saklar Pengontrol Gelombang Segitiga dan Kotak...... 21

3.9. Pengimplementasian Perancangan..................................................... 22

BAB IV HASIL DAN PEMBAHASAN …………………………........................ 23

4.1. Pengujian Blok-Blok Penyusun Konfigurasi Pembentuk Gelombang 23

4.1.1. Pengujian Blok Register Input ….…...................................... 24

4.1.2. Pengujian Blok Akumulator……........................................... 25

4.1.3. Pengujian Blok Register Adder/Register Fasa…...………..... 26

4.1.4. Pengujian Blok ROM…………………………….……......... 27

4.1.5 Pengujian Blok Pengontrol Gelombang Segitiga.................... 30

xii

Page 13: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

4.1.6. Pengujian Blok Pengontrol Gelombang Kotak....................... 31

4.1.7. Pengujian Blok Pengontrol Output........................................... 33

4.1.8 Pengujian Blok Register Output............................................... 34

4.2. Pengujian Gelombang Sinus................................................................ 34

4.2.1. Pengujian Gelombang Sinus dengan Tuning Word 000000102 38

4.2.2. Pengaruh Nilai Tuning Word Pada Bentuk Gelombang Sinus 40

4.2.3. Karakteristik Gelombang Sinus Pada Rentang Frekuensi Audio 42

4.3. Pengujian Gelombang Segitiga............................................................ 44

4.3.1. Kesalahan Pada Simulasi Gelombang Segitiga.................. 45

4.3.2. Analisa Kesalahan Pada Port Sub....................................... 48

4.4. Pengujian Gelombang Kotak/Segi Empat........................................... 50

4.5. Pengujian Blok DAC dan Pengubahan Amplitudo Gelombang.......... 52

BAB V KESIMPULAN DAN SARAN ……………………………….……......... 55

5.1. Kesimpulan ………………………………………..……..……......... 53

5.2. Saran ………………………………………..……….…………......... 53

DAFTAR PUSTAKA ……………………………………..…………………….......... 55

LAMPIRAN KONFIGURASI PEMBANGKIT GELOMBANG

LAMPIRAN HASIL SIMULASI PEMBANGKIT GELOMBANG PADA SIMULATOR ALTERA MAX+PLUS II

LAMPIRAN GRAFIK GELOMBANG PADA BEBERAPA NILAI TUNING WORD

LAMPIRAN CONTOH TABEL UNTUK PEMBANGKITAN GELOMBANG SINUS PADA TUNING WORD 000000012

LAMPIRAN LIST PROGRAM PER MODUL/SUB PROYEK

LAMPIRAN DATASHEET DAC0832

LAMPIRAN DATASHEET LF351

xiii

Page 14: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAFTAR GAMBAR

Halaman

Gambar 2.1. Diagram blok dari arsitektur DDS...................................................... 3

Gambar 2.2. Contoh blok rangkaian register PIPO…………………………..…... 5

Gambar 2.3. Rangkaian penambah/pengurang komplemen 2………..………..… 5

Gambar 2.4. Teknik pengubahan laju frekuensi ……………………..….............. 7

Gambar 2.5. Rangkaian DAC model R-2R Ladder ................................................ 7

Gambar 3.1. Diagram detail rancangan arsitektur pembangkit gelombang….…... 10

Gambar 3.2. Sintaks pada MATLAB untuk mendapatkan nilai fungsi sinus …… 12

Gambar 3.3. Nilai heksadesimal bagi nilai amplitudo gelombang sinus ..………. 13

Gambar 3.4. Skema rangkaian DAC ……………………………………….......... 15

Gambar 3.5. Diagram alir utama pembentukan gelombang sinus …...………….. 16

Gambar 3.6. Diagram alir dari proses looping ……….……………..………….... 17

Gambar 3.7. Diagram alir pengontrolan dalam pembentukan gelombang segitiga 18

Gambar 3.8. Diagram alir dari pembentukan gelombang kotak ………….…….... 19

Gambar 3.9. Blok diagram dari UP1 Board …………………………….……...... 20

Gambar 3.10. Skema dari pin keluaran dan pin kontrol............................................. 20

Gambar 3.11. Bagian Flex-Switch yang akan digunakan sebagai input tuning word 21

Gambar 3.12. Rangkaian saklar pengontrol............................................................... 22

Gambar 4.1. Blok Register Input ………………………..…................................. 24

Gambar 4.2. Hasil simulasi dari blok register input................................................ 24

Gambar 4.3. Rangkaian blok akumulator …………………………………….…. 25

Gambar 4.4. Hasil simulasi dari proses penambahan ……………………..……... 25

Gambar 4.5. Hasil simulasi dari proses pengurangan ………………….………... . 26

Gambar 4.6. Blok register adder/register fasa………………………….……........ 27

Gambar 4.7. Hasil simulasi dari cara kerja register adder ………..…………….... 27

Gambar 4.8. Blok ROM ………………………...…………….............................. 28

Gambar 4.9. Hasil simulasi dari blok ROM dengan alamat desimal 110….…….... 28

Gambar 4.10. Hasil simulasi blok ROM dengan nilai alamat desimal 17310............. 29

xiv

Page 15: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Gambar 4.11. Gambar blok pengontrol gelombang segitiga …...…..…………….... 30

Gambar 4.12. Hasil simulasi blok pengontrol segitiga dengan nilai nol pada port control 30

Gambar 4.13. Hasil simulasi blok pengontrol segitiga dengan nilai satu pada port control 31

Gambar 4.14. Blok pengontrol gelombang segiempat ……….….……………......... 31

Gambar 4.15. Hasil simulasi pengontrol segiempat dengan nilai nol pada port control 32

Gambar 4.16. Hasil simulasi pengontrol segiempat dengan nilai satu pada port control 32

Gambar 4.17. Blok pengontrol output ………………………………........................ 33

Gambar 4.18. Hasil simulasi pengontrol output dengan nilai nol pada port control 33

Gambar 4.19. Hasil simulasi pengontrol output dengan nilai satu pada port control 33

Gambar 4.20. Gambar blok register output ………………………………….…...... 34

Gambar 4.21. Hasil simulasi dari blok register output…………………………....... 34

Gambar 4.22. Hasil simulasi pembangkitan gelombang sinus ………………….… 35

Gambar 4.23. Hasil simulasi pembangkitan gelombang sinus pada rentang frekuensi 0 µS

250 µS dengan nilai tuning word 000000012 ……………………… 36

Gambar 4.24. Representasi grafis dari bentuk gelombang sinus dengan tuning word sebesar

000000012.…………………………………….................................. 37

Gambar 4.25. Hasil simulasi pembangkitan gelombang sinus dengan kenaikan frekuensi

sebesar nilai biner 10 atau setara dengan desimal dua........................ 38

Gambar 4.26. Representasi grafis dari bentuk gelombang sinus dengan tuning word sebesar

000000102........................................................................................... 39

Gambar 4.27. Representasi grafis bentuk gelombang sinus pada tuning word 000100002 40

Gambar 4.28. Representasi grafis bentuk gelombang sinus pada tuning word 001000002 41

Gambar 4.29. Representasi grafis bentuk gelombang sinus pada tuning word 100000002 41

Gambar 4.30. Rangkaian pencacah biner 8 bit.......................................................... 42

Gambar 4.31. Titik awal dalam satu periode clock keluaran dari pembagi frekuensi 42

Gambar 4.32. Titik akhir dalam satu periode clock keluaran dari pembagi frekuensi 43

Gambar 4.33. Titik awal pada satu periode gelombang sinus dengan nilai tuning word

000000012............................................................................................ 43

Gambar 4.34. Titik akhir dalam satu periode gelombang sinus dengan nilai tuning word

000000012.......................................................................................................................................... 43

Gambar 4.35. Hasil simulasi pembangkitan gelombang segitiga............................... 45

xv

Page 16: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Gambar 4.36. Detail dari hasil simulasi gelombang segitiga....................................... 45

Gambar 4.37. Hasil simulasi gelombang segitiga dengan nilai output dalam nilai

heksadesimal....................................................................................... 46

Gambar 4.38. Hasil simulasi gelombang segitiga saat proses penambahan................ 46

Gambar 4.39. Hasil simulasi gelombang segitiga saat proses pengurangan……….. 47

Gambar 4.40. Kesalahan pada nilai sub saat proses pembentukan gelombang segitiga..... 48

Gambar 4.41. Perbesaran gambar dari hasil simulasi pada gambar 4.40…………… 48

Gambar 4.42. Representasi grafis gelombang segitiga dengan tuning word 000000102..... 49

Gambar 4.43. Hasil simulasi pembentukan gelombang kotak…………………….... 50

Gambar 4.44 Hasil simulasi pembentukan gelombang kotak dengan tuning word sebesar

000000102…………………………………………………………… 51

Gambar 4.5 Hasil simulasi ulang terhadap pembentukan gelombang kotak…….. 51

xvi

Page 17: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

1

BAB I

PENDAHULUAN

1.1 Latar Belakang Masalah Kemampuan untuk membangkitkan dan mengendalikan bentuk gelombang dalam

berbagai nilai frekuensi sudah menjadi kebutuhan yang sangat penting dalam berbagai

bidang dan aplikasi, seperti bidang medis, telekomunikasi maupun industri.

Pembentukan sinyal secara analog memiliki banyak kekurangan, diantaranya

adalah sifatnya yang sangat rentan terhadap derau. Masalah ini dapat ditangani dengan

pembentukan sinyal secara digital. Pembentukan sinyal secara digital memiliki beberapa

keunggulan, diantaranya adalah ketahanan sinyal output terhadap derau, dan proses

switching frekuensi output yang cepat [4].

Salah satu metode pembentukan sinyal secara digital yang cukup banyak

diaplikasikan adalah metode Direct Digital Synthesis (DDS). Ini dikarenakan metode DDS

dapat dikembangkan pada sebuah IC (Integrated Circuit) tunggal yang dapat menghasilkan

gelombang output analog terpogram dengan sederhana dan dengan tingkat ketepatan dan

resolusi yang tinggi [4].

Dengan metode DDS, dapat dibangkitkan fungsi gelombang keluaran yang

bermacam-macam selain sinus, sehingga DDS dapat dimanfaatkan dalam suatu generator

fungsi yang membangkitkan bermacam-macam fungsi [7].

1.2 Tujuan dan Manfaat Penelitian Tujuan yang akan dicapai, yaitu merancang pembangkit gelombang sinus, segitiga

dan kotak secara digital menggunakan metode Direct Digital Synthesis, dengan berbasis

CPLD.

Manfaat yang dapat dicapai, yaitu:

a. pengembangan pengetahuan mengenai metode pembangkitan sinyal secara

digital

b. sebagai bahan untuk pengembangan dan aplikasi pembangkitan sinyal dalam

perkuliahan perancangan sistem digital

Page 18: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

2

1.3 Batasan Masalah Dalam perancangan dan simulasi ini memiliki batasan sebagai berikut:

a. Bentuk gelombang yang dibangkitkan adalah gelombang sinus, kotak dan

segitiga

b. Nilai frekuensi gelombang dapat diubah secara digital dan amplitudo

gelombang dapat diubah secara analog.

c. Perancangan dan simulasi menggunakan perangkat lunak Altera Max+plus

II 10.2.

1.4 Metodologi Penelitian a. Metodologi yang digunakan penulis dalam penelitian adalah sebagai

berikut:

b. Mengumpulkan referensi dan literatur dari buku-buku perpustakaan dan

sumber dari internet.

c. Menyusun referensi dari literatur yang ada.

d. Perancangan dan pembuatan simulasi menggunakan perangkat lunak.

e. Pengujian simulasi bentuk gelombang

f. Penyusunan laporan

1.5 Sistematika Penulisan Penulis menggunakan sistematika penulisan sebagai berikut:

BAB I Berisi latar belakang masalah, tujuan dan manfaat dari penelitian,

batasan masalah, metodologi penelitian, dan sistematika penulisan.

BAB II Berisi dasar teori tentang blok dasar dari arsitektur Direct Digital

Synthesis, mekanisme pengubahan frekuensi pada DDS, dan konsep

perancangan sistem digital menggunakan Altera Max+Plus II.

BAB III Berisi rancangan simulasi yang dibuat, meliputi blok diagram, bagan alir

program (flow chart), dan penjelasan singkat tentang cara kerjanya.

BAB IV Bab ini berisi data hasil perancangan dan simulasi dan pengamatan

terhadap hasil rancangan.

BAB V Berisi kesimpulan dan saran.

Page 19: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

3

BAB II

DASAR TEORI

2.1 Metode Direct Digital Synthesis Direct Digital Synthesis adalah metode pembentukan gelombang secara digital [5].

Dinamakan Direct Digital Synthesis atau disingkat dengan nama DDS, karena metode ini

membangkitkan sinyal digital secara langsung, tanpa memerlukan proses sampling dan

kuantisasi dari masukan sinyal analog [5].

Metode DDS dapat membangkitkan bentuk gelombang yang nilai frekuensi

maupun amplitudonya dapat diubah-ubah, dengan menerapkan sinyal clock yang

berfrekuensi tetap. Blok diagram dari arsitektur Direct Digital Synthesis tampak seperti di

bawah ini.

Gambar 2.1 Diagram blok dari arsitektur DDS

∑ register input

sine look up table

register output

Clock

Tuning Word M Output/

DAC

Rangkaian penambah

Komponen pokok dari arsitektur DDS terdiri dari sebuah akumulator fasa atau

rangkaian penjumlah, sebuah konverter amplitudo (look up table untuk pembangkitan

gelombang sinus), clock, tuning word, dan sejumlah register [4] seperti yang tampak pada

gambar 2.1.

Dalam hal pembangkitan gelombang sinus, DDS menghasilkan gelombang sinus

pada frekuensi yang ditetapkan. Nilai frekuensi ini tergantung pada dua variabel, yaitu

frekuensi clock referensi dan bilangan biner yang diprogram ke dalam register pengatur

frekuensi (tuning word M).

Bilangan biner pada register frekuensi memberikan masukan ke akumulator fasa

atau rangkaian penjumlah. Bila sebuah look-up table digunakan, akumulator menghitung

Page 20: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

4

sebuah alamat bagi look-up table, yang mana akan menghasilkan nilai digital dari

amplitudo gelombang keluaran.

Untuk menghasilkan gelombang sinus pada frekuensi tertentu, sebuah nilai konstan

(kenaikan nilai fasa pada register masukan) ditambahkan ke akumulator pada setiap siklus

clock [4]. Bila kenaikan nilainya besar, akumulator akan melakukan step yang sangat cepat

melalui look-up table gelombang sinus, dan kemudian menghasilkan gelombang sinus

berfrekuensi tinggi. Sebaliknya, bila kenaikan bilangannya kecil, maka akumulator akan

melakukan step yang lebih banyak, sehingga akan menghasilkan gelombang sinus dengan

besar frekuensi yang lebih lambat [4].

2.1.1 Akumulator Akumulator di sini sebenarnya merupakan sebuah rangkaian penambah/pengurang

komplemen 2 yang menaikkan/menurunkan nilai yang disimpannya setiap saat ia

menerima masukan. Besarnya nilai kenaikan ditentukan oleh nilai sebuah word digital M

yang berada pada register masukan yang dijumlahkan dengan output dari pencacah itu

sendiri. Word digital pada register masukan membentuk ukuran langkah pada setiap clock-

nya. Sebagai contoh, untuk akumulator dengan lebar data N=32 bit, sebuah nilai M

0000....00001 (ekivalen dengan nilai satu) akan menghasilkan akumulator yang mengalami

overflow setelah 232 siklus clock referensi (kenaikan). Bila nilai M diubah menjadi

0111....1111, akumulator akan mengalami overflow setelah hanya 21 siklus clock, atau dua

siklus clock referensi. Pengontrolan dari ukuran langkah ini membentuk sebuah pengaturan

frekuensi dari arsitektur DDS.

Hubungan dari akumulator dengan register masukan membentuk persamaan dasar

dari pengaturan frekuensi pada DDS:

FOUT=(M(CLKreferensi))2N (2.1)

Dengan: FOUT = frekuensi keluaran dari DDS

M = word biner pengatur frekuensi

CLK referensi = frekuensi clock internal (system clock)

N = panjang bit dari akumulator

2.1.2 ROM Look Up Table ROM Look Up Table merupakan ROM (Read Only Memory) yang menyimpan

nilai-nilai digital yang merepresentasikan nilai-nilai amplitudo dari gelombang sinus yang

Page 21: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

5

akan dibangkitkan [4]. Besar kecilnya langkah fungsi sinus yang diprogram pada ROM

Look Up Table ini akan memiliki pengaruh besarnya frekuensi gelombang keluaran.

2.1.3 Register Parallel In Parallel Out Register Parallel In Parallel Out atau disingkat dengan nama PIPO adalah register

yang memasukkan data biner pada setiap pin input-nya secara bersamaan pada satu clock

[3]. Dan mengeluarkan data biner pada pin output-nya secara bersamaan pula pada satu

clock. Contoh skema register PIPO empat bit ditunjukkan pada gambar 2.2.

FF1

FF2 FF3 FF4

clock

input 1 input 2 input 3 input 4

output1 output2 output 3 output 4

Gambar 2.2 Contoh blok rangkaian register PIPO

2.1.4 Penambah/Pengurang Komplemen 2 Rangkaian dari penambah/pengurang yang didasarkan pada komplemen 2

ditunjukkan pada gambar 2.3.

FA FA FA FA

INV INV INV INV SUB

A1 A2 A3 A4

B1 B2 B3 B4

C

S1 S2 S3 S4

Gambar 2.3 Rangkaian penambah/pengurang komplemen 2

Page 22: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

6

Pada gambar2.3, terdapat beberapa blok. Blok A1-A4 merupakan bilangan biner

yang akan ditambahkan. Blok B1-B4 adalah bilangan penambah. Blok FA merupakan blok

Full Adder atau penambah penuh. Blok S1-S4 adalah blok bilangan biner output. Blok

INV adalah blok inverter atau pembalik. blok INV ini dapat diaplikasikan menggunakan

sebuah gerbang XOR dua masukan [3].

Bila nilai Sub berlogika rendah, maka bit-bit B lewat melalui inverter terkendali ke

penambah penuh. Nilai Sub di sini merupakan pengendalinya. Oleh karenanya, penambah

penuh menghasilkan jumlah A dan B. Sebagai contoh, jika A=1001 (nilai desimal = 9), dan

B=0011 (nilai desimal = 3), jumlah desimal dan binernya adalah 1100 (nilai desimal = 12).

Sebaliknya, bila Sub berlogika tinggi, maka bit-bit B akan dibalik sebelum

mencapai penambah penuh. Di samping itu, Sub yang bernilai tinggi menambahkan 1

kepada penambah pertama. Penambahan 1 ini membentuk komplemen 2 bagi B. Dengan

kata lain, inverter terkendali menghasilkan komplemen 1, dan menambahkan nilai satu

pada full adder LSB sehingga menghasilkan komplemen 2. Dengan demikian, keluaran

penambah penuh merupakan selisih antara A dan B. Sebagai contoh, dengan A dan B yang

sama seperti yang digunakan pada contoh sebelumnya, dengan menggunakan penjumlahan

komponen 2, akan dilakukan penambahan. Namun sebelumnya B=0011 diubah ke

komplemen 2-nya menjadi 1101. Hasil penambahan A (1001) dan komplemen 2 dari B

(1101) adalah 0110, yang setara dengan nilai desimal 6. Hasil penambahan komplemen 2

tersebut ekivalen dengan proses pengurangan antara A dengan B.

2.1.5 Mekanisme Pengubahan Frekuensi Frekuensi keluaran DDS tergantung pada tiga hal yaitu: frekuensi clock acuan,

besarnya langkah sinus yang diprogram pada LUT, dan nilai pengubah frekuensi (tuning

word). Frekuensi keluaran dapat diubh dengan metode pengubahan laju sampling yang

dilakukan dengan cara mengubah-ubah nilai tuning word [4].

Pada teknik pengubahan laju sampling, sebagian atau seluruh isi LUT dialamati

dengan frekuensi clock acuan yang konstan dengan langkah pengalamatan yang berubah.

Gambar 2.4 menunjukkan laju sampling. Langkah pengalamatan LUT tergantung pada

nilai dari data pengatur frekuensi tuning word. Frekuensi keluaran memiliki hubungan

yang linear terhadap data pengatur.

Bagian dari skema pengubahan frekuensi dengan metode pengubahan laju sampling

ditunjukkan pada gambar 2.4.

Page 23: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

7

Akumulator Fasa Look Up Table

Clock Acuan

Tuning Word (M)

Gambar 2.4 Teknik pengubahan laju frekuensi

2.1.6 Digital To Analog Converter Pengubahan nilai digital ke nilai ekivalen analognya dilakukan menggunakan

Digital to Analog Converter. Salah satu model DAC yang banyak digunakan adalah model

R-2R Ladder, seperti yang ditunjukkan pada gambar 2.2.

Masukan b(1) sampai b(n) adalah bit digital dengan b(1) sebagai Least Significant

Bit (LSB) dan b(n) sebagai Most Significant Bit (MSB). Masukan data digital diubah

menjadi nilai tegangan sebagai keluaran. Rangkaian ini hanya membutuhkan dua nilai

resistor dimana salah satunya adalah dua kali nilai resistor lainnya.

Gambar 2.5 Rangkaian DAC model R-2R Ladder

Page 24: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

8

Pengubahan nilai digital ke analog pada metode R-2R Ladder direpresentasikan

dengan persamaan (2.2)

∑=

⎟⎠⎞

⎜⎝⎛ ++

−+

−=

+−=

n

i nbnbnbVr

ninbVrVout

1 2)1(...

8)2(

4)1(

2)1( (2.2)

Dengan Vr = nilai tegangan referensi

n = jumlah bit nilai digital

Vout= nilai tegangan keluaran

2.2 Konsep Perancangan Sistem Digital dengan Menggunakan Altera

Max+PlusII Dalam suatu konsep perancangan sistem digital terdapat dua konsep perancangan,

yaitu konsep top-down dan bottom-up [2].

Konsep perancangan top-down dimulai dengan deskripsi fungsi rangkaian secara

keseluruhan. Kemudian rangkaian secara keseluruhan ini dibagi-bagi menjadi rangkaian

yang lebih kecil.

Konsep perancangan bottom-up dimulai dari pendefinisian fungsi rangkaian secara

global, tapi dalam mempartisi rangkaian, perancang berpedoman pada komponen yang

tersedia, sehingga kebebasan perancangan menjadi terbatas.

Pada perancangan menggunakan dengan menggunakan HDL (Hardware

Description Language), pada tahap pembuatan program agar memenuhi deskripsi

spesifikasi yang ditentukan, sistem yang akan dibuat dibagi-bagi menjadi modul-modul

yang lebih kecil. Pada tahapan ini, perancangan yang dilakukan menggunakan pendekatan

top-down. Pada saat implementas ukuran PLD membatasa kebebasan pemilihan komponen

yang digunakan. Pada tahap ini, perancangan yang dilakukan harus disesuaikan dengan

komponen yang tersedia, sehingga sesuai dengan uraian sebelumnya, pendekatan yang

digunakan pada tahap ini adalah bottom-up.

Altera Max+Plus II dipakai untuk perancangan logika dengan divais target yang

dapat diprogram dari Altera, meliputi keluarga divais Classic, MAX 5000, MAX 7000,

MAX 9000, FLEX 6000, FLEX 8000, dan FlEX 10K. Max+Plus II menyediakan

kemampuan perancangan logika: metoda design entry yang bermacam-macam untuk

perancangan yang hirarkis, sintesis logika yang powerful, kompilasi timing-driven, partisi,

Page 25: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

9

simulasi fungsional dan pewaktuan, simulasi untuk multi divais, analisis pewaktuan, lokasi

kesalahan otomatis, dan pemrograman dan verifikasi.

Max+Plus II bisa membaca dan menulis berkas AHDL dan berkas netlist EDIF

standar, berkas HDL Verilog, VHDL, dan berkas skematik ORCAD.

Tahap-tahap perancangan dengan Max+Plus II adalah: design entry, compilation,

simulation, timing analysis, dan device programming.

2.3 Complex Programmable Logic Device CPLD atau Complex Programmable Logic Device adalah salah satu kelas dari

Programming Logic Device (PLD). PLD sendiri terdiri dari beberapa kelas, yaitu FPGA

(Field Programmable Gate Arrays), PLA (Programmable Array Logic), PROM

(Programmable Read Only Memories), PAL (Programmable Logic Array), GAL (Generic

Array Logic) dan yang terakhir adalah CPLD.

PLD adalah devais yang memiliki arsitektur yang sudah di pre-definisi secara

umum dimana pengguna dapat memprogram sebuah desain ke dalamnya menggunakan

seperangkat tool. Arsitektur umumnya dapat bermacam-macam namun terdiri dari satu

atau lebih term AND dan OR untuk mengimplementasikan fungsi logika. Banyak devais

yang juga memiliki kombinasi dari flip-flop dan latch (pengunci) yang dapat digunakan

sebagai elemen penyimpan untuk input dan output bagi devais tersebut. Devais yang lebih

kompleks terdiri dari macrocell. Macrocell memungkinkan pengguna untuk

mengkonfigurasi tipe input dan output yang dibutuhkan desain.

CPLD dikategorikan sebagai PAL yang sangat besar yang memiliki karakteristik

dari PLA. Arsitektur dasarnya bnyak memilikia kemiripan dengan PAL. CPLD memiliki

tingkat kompleksitas di antara PAL dan FPGA, namun secara arsitektural, CPLD memiliki

kesamaan dengan PAL maupun FPGA.

Page 26: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

10

BAB III

PERANCANGAN PEMBANGKIT BENTUK

GELOMBANG 3.1 Perancangan Arsitektur Pembangkit Gelombang.

Pembangkit bentuk gelombang yang akan dirancang adalah rangkaian elektronika

yang dapat menghasilkan bentuk gelombang keluaran yang memiliki frekuensi dan

amplitudo yang dapat diatur. Pengaturan frekuensi dilakukan secara digital melalui

pengubahan tuning word pada bagian masukan awal dari konfigurasi pembangkit

gelombang..

DDS digunakan sebagai metoda untuk membangkitkan gelombang keluaran.

Diagram blok dasar dari metoda DDS sudah ditunjukkan pada gambar 2.1

Diagram blok yang lebih detail dari arsitektur pembangkit bentuk gelombang

dengan metoda Direct Digital Synthesis ditunjukkan pada gambar 3.1

Gambar 3.1 Diagram detail rancangan arsitektur pembangkit gelombang

Page 27: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

11

Register input pada gambar 3.1 merupakan bagian masukan utama. Register input

ini berfungsi sebagai penyimpan tuning word yang nantinya akan difungsikan sebagai

pengatur frekuensi gelombang keluaran. Keluaran dari register input akan dimasukkan ke

rangkaian akumulator.

Bagian akumulator dan register fasa bisa dianggap sebagai satu blok, karena dua

bagian ini sangat berperan penting dalam proses pembentukan gelombang. Bila

akumulator tidak memiliki register fasa, akan terjadi kekeliruan perhitungan karena tidak

ada media penyimpan yang bekerja berdasarkan siklus clock sumber.

Keluaran akumulator kemudian akan diteruskan ke pengontrol gelombang segitiga

terlebih dahulu. Pada pengontrol inilah ditentukan kemana sinyal akan dilewatkan. Bila

diteruskan ke ROM, maka proses selanjutnya adalah pembangkitan gelombang sinus. Bila

diteruskan ke pengontrol gelombang segi empat, maka ada dua kemungkinan yang akan

terjadi. Bila pengontrol gelombang segi empat dalam keadaan tidak aktif, maka sinyal akan

diteruskan ke pengontrol output. Bila pengontrol segi gelombang empat aktif, maka

sebagian sinyal akan ditahan, dan MSB dari keluaran akumulator akan diambil untuk

membangkitkan bentuk gelombang segi empat.

Pengontrol output berfungsi untuk memilih sinyal yang akan diteruskan ke register

output. Bila pengontrol gelombang segitiga aktif, pengontrol output pun ikut aktif,

sehingga isi alamat ROM tidak akan diteruskan ke register output. Sebaliknya bila

pengontrol segitiga aktif, maka pengontrol output pun tidak akan aktif, sehingga proses

pembentukan gelombang sinus dapat dikerjakan.

3.1.1 Perancangan Register Input Perancangan Register Input dilakukan dengan menggunakan VHDL. Bentuk

deskripsi yang akan digunakan pada perancangan register input adalah deksripsi

behavioral, bukan deskripsi struktural. Masukan dari register input adalah DIP switch yang

terdapat pada papan UP1 Board. Jumlah DIP switch yang tersedia adalah sebanyak 8 buah.

Jumlah itu sudah sesuai dengan perancangan tuning word yang juga sebanyak 8 bit.

3.1.2 Perancangan Blok Akumulator Fasa

Bagian akumulator fasa terdiri dari adder/penambah dan register fasa. Adder di sini

merupakan rangkaian penambah/pengurang komplemen 2, sehingga tidak diperlukan

Page 28: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

12

rangkaian penambah lagi untuk membangkitkan bentuk gelombang segitiga dan kotak.

Bagian adder dan register fasa juga memiliki lebar data sebesar 8 bit. Penentuan lebar data

yang juga sebesar 8 bit ini berkaitan dengan proses untuk menentukan frekuensi

gelombang keluaran.

Penentuan frekuensi gelombang keluaran yang diinginkan ditentukan dengan

perumusan seperti yang sudah ditunjukkan pada persamaan (2.1)

Pada penelitian ini, word biner pada persamaan (2.1) pengatur frekuensi M

memiliki panjang bit yang sama dengan panjang bit dari akumulator fasa, di mana

keduanya memiliki panjang sebesar 8 bit.

3.1.3 Perancangan Blok ROM Sinus Bagian ROM sinus memiliki lebar data sebesar 8 bit. Hal ini berarti bahwa jumlah

data yang akan dikonversikan untuk membentuk gelombang sinus dengan frekuensi

terkecil adalah sebanyak 256 buah.

Untuk memperoleh nilai desimal dari fungsi sinus dengan jumlah data sebanyak

256 buah ini, dapat dilakukan perhitungan dengan menggunakan rumus:

⎟⎠⎞

⎜⎝⎛+⎟

⎠⎞

⎜⎝⎛ Π

⎟⎠⎞

⎜⎝⎛=

2*

256*2sin*

2_ referencestepreferecedataDEC (3.1)

Nilai desimal yang dihasilkan oleh persamaan (3.2) di atas kemudian dikonversikan ke

nilai heksadesimalnya dengan bantuan software MATLAB. Sintaks dalam MATLAB

untuk mengkonversikan nilai desimal ke-256 data tadi ke nilai heksadesimalnya

ditunjukkan pada gambar 3.3.

Gambar 3.2 Sintaks pada MATLAB untuk mendapatkan nilai fungsi sinus

Page 29: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

13

Sintaks pada gambar 3.2 tersebut menghasilkan nilai heksadesimal yang ekivalen dengan

nilai desimalnya. Nilai-nilai heksadesimal hasil dari konversi tersebut ditunjukkan pada

gambar 3.3

Gambar 3.3 Nilai heksadesimal bagi nilai amplitudo gelombang sinus

Nilai-nilai heksadesimal yang disimpan pada ROM merupakan nilai ekivalen dari

amplitudo analog gelombang sinus yang akan dibangkitkan. Nilai-nilai ini diakses sesuai

dengan keluaran dari akumulator fasa.

3.1.4 Perancangan Pengontrol Gelombang Segitiga Blok ini merupakan persimpangan sinyal sebelum sinyal mengalami proses lebih

lanjut. Keadaan nol pada port control pada pengontrol segitiga akan mengakibatkan

pengontrol melewatkan sinyal menuju ROM. Sebaliknya, bila nilai port control adalah

satu, maka pengontrol segitiga akan memproses sinyal masukan untuk membentuk sinyal

segitiga. Sama halnya dengan bagian register input, bagian inipun akan dirancang dengan

menggunakan deskripsi behavioral pada VHDL.

Page 30: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

14

3.1.5 Perancangan Pengontrol Gelombang Segi Empat Bagian ini menentukan cara pembentukan gelombang segi empat atau kotak. Bila

keadaan port pengontrol dalam taraf nilai nol, maka pengontrol akan melewatkan bit-bit

sinyal dari pengontrol segitiga menuju pengontrol output. Sebaliknya bila keadaan port

pengontrol dalam taraf nilai satu, maka MSB dari keluaran pengontrol segitiga saja yang

akan dilewatkan, sehingga bit-bit lainnya selain bit MSB tak akan dilewatkan. Bagian

pengontrol gelombang segi empat inipun akan dirancang secara behavioral.

3.1.6 Perancangan Pengontrol Output Bagian ini akan menentukan apakah keluaran dari ROM sinus ataukah keluaran

dari pengontrol segiempat yang akan dilewatkan. Dengan demikian, bagian pengontrol

output ini akan memiliki 16 port masukan, yang terdiri dari 8 port masukan dari ROM, dan

8 port lainnya dari pengontrol gelombang segitiga.

Bila pengontrol output dalam keadaan aktif, maka sinyal yang akan dilewatkan

adalah sinyal dari pengontrol segitiga. Sedangkan bila pengontrol dalam keadaan tidak

aktif, maka nilai-nilai yang ada di alamat-alamat di dalam ROM lah yang akan diberi akses

ke register output. Bagian pengontrol output inipun akan dirancang menggunakan deskripsi

behavioral.

3.1.7 Perancangan Register Output Perancangan bagian register output ini sama persis dengan perancangan register

input maupun register fasa. Perbedaan hanyalah ada di port-port yang akan dipasang, yang

berfungsi sebagai ujung keluaran proses pembangkitan gelombang.

3.1.8 Perancangan Blok Digital to Analog Converter

Devais DAC yang digunakan pada perancangan ini adalah DAC0823. Pengaturan

amplitudo dari gelombang keluaran dilakukan pada bagian DAC ini dengan cara

mengubah-ubah V referensi pada DAC tersebut. DAC0832 adalah DAC 8 bit. Rentang

nilai Vref DAC0832 adalah ±10V. Pengubahan nilai amplitudo gelombang keluaran

dilakukan dengan melakukan pengubahan nilai Vref dalam rentang nilai tersebut.

Pengubahan nilai amplitudo dengan cara mengubah-ubah nilai Vref ini seseuai dengan

teori pengubahan nilai digital ke analog dengan menggunakan metode R-2R Ladder yang

ditentukan dengan persamaan (2.2)

Page 31: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

15

Pengubahan nilai amplitudo dengan cara mengubah-ubah Vref pada metode R-2R

Ladder ini didasarkan pada fakta bahwa rangkaian DAC internal pada chip DAC0832

merupakan rangkaian DAC R-2R Ladder.

Gambar 3.4 Skema rangkaian DAC

Keluaran dari DAC0832 masih berupa besaran arus, maka perlu ditambahkan op-

amp pada keluarannya. Gambar rangkaian DAC tampak seperti di gambar 3.4.

Penggambaran blok DAC pada gambar 3.4 disesuaikan dengan petunjuk yang

tertera pada datasheet-nya. Pada gambar ini hanya ditambahkan sebuah potensiometer

sebagai pembagi tegangan, yang akan difungsikan sebagai pengatur amplitudo bentuk

gelombang keluaran.

Data masukan DAC0832 merupakan keluaran dari register output, yang berjumlah

8 bit. Potensiometer yang digunakan sebagai pembagi tegangan adalah potensiometer

10KΩ. Dan opamp yang digunakan adalah dari seri LF351. Penggunaan op-amp seri

LF351 juga disesuaikan dengan datasheet DAC0832.

RFB pada gambar blok DAC0832 merupakan resistor on-chip. Resistor RFB

tersebut sudah tersedia secara internal pada keping DAC0832, dan bukan merupakan

resistor eksternal. RFB ini merupakan resistor feedback yang digunakan untuk aplikasi op-

amp eksternal mengeluarkan tegangan keluaran dari DAC.

3.2 Metode Pembentukan Gelombang Sinus Langkah pertama dalam pembentukan gelombang sinus adalah pemberian dan

penyimpanan nilai tuning word pada register input. Nilai tuning word tersebut kemudian

Page 32: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

16

menjadi masukan bagi adder/penambah dan register fasa yang merupakan bagian

pembentuk akumulator fasa. Loop terjadi di dalam akumulator fasa ini. Aktifitas yang

terjadi pada loop ini adalah penambahan bilangan biner yang akan mengalamati ROM

Look Up Table. Alamat-alamat yang dituju pada ROM tersebut memberikan nilai

ekuivalen bagi amplitudo bentuk gelombang yang akan dibangkitkan. Diagram alir utama

dari metode pembentukan gelombang sinus tampak pada gambar 3.6

Gambar 3.5 Diagram alir utama pembentukan gelombang sinus

Penjelasan dari proses keseluruhan yang terjadi dalam diagram alir tersebut sudah

dijelaskan sebelumnya.

Dari diagram alir yang menggambarkan proses secara umum pada gambar 3.5,

terdapat suatu proses looping. Looping ini adalah proses yang terjadi di dalam blok

akumulator fasa. Langkah awal dari proses looping ini adalah pengambilan data dari

register input. Data biner dari register input tadi dimasukkan ke dalam adder/penambah.

Keluaran dari penambah tersebut kemudian diberikan kepada register fasa. Seperti yang

tampak pada gambar 3.1, bahwa keluaran dari register fasa ini dikirimkan ke tiga tujuan,

Page 33: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

17

yaitu blok adder/penambah, ROM Look Up Table, dan register output. Dalam

hubungannya dengan proses looping ini pada pembentukan gelombang sinus, ini, tujuan

dari keluaran fasa adalah ROM Look Up Table dan blok adder. Nilai keluaran dari register

fasa ditambahkan dengan nilai keluaran dari register input. Hasil penambahan dikrimkan

ke ROM dan sekaligus juga dimasukkan kembali menjadi input dari adder. Proses ini terus

berulang sampai proses penambahan mengalami overflow. Saat terjadi overflow, satu siklus

gelombang sinus telah terbentuk. Saat overflow, akumulator sudah mencapai nilai data

maksimum yang dapat dihasilkan. Langkah selanjutnya adalah akumulator kembali

melakukan proses penambahan dengan memulai dari nilai data terkecil pada register fasa.

Dan register fasa kembali mengalamati ROM dari nilai biner terkecil untuk membangkit

siklus selanjutnya.

Diagram alir dari proses looping yang terjadi pada blok akumulator fasa

ditunjukkan pada gambar 3.6

Gambar 3.6 Diagram alir dari proses looping

3.3 Metode Pembentukan Gelombang Segitiga Untuk membangkitkan gelombang segitiga, tidak diperlukan ROM khusus. Proses

pembentukan gelombang segitiga ini memanfaatkan keluaran akumulator fasa. Namun

sebelumnya, akumulator fasa perlu dimodifikasi supaya bisa membangkitkan gelombang

segitiga.

Page 34: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

18

Yang perlu dilakukan adalah penambahan kontrol supaya akumulator fasa dapat

melakukan proses pengurangan. Jadi setiap saat proses penambahan mencapai kondisi

overflow, akumulator fasa tidak langsung kembali melaukan penambahan dari nilai biner

terkecil, namun ia melakukan proses pengurangan sampai nilai data biner pada keluaran

akumulator fasa kembali ke nilai terkecilnya.

Seperti yang sudah dijelaskan, rangkaian adder yang digunakan pada arsitektur ini

adalah rangkaian penambah/pengurang komplemen2. Sehingga tidak memerlukan

rangkaian pengurang lagi. Diagram alir dari pengontrolan akumulator fasa ditunjukkan

pada gambar 3.7.

Gambar 3.7 Diagram alir pengontrolan dalam pembentukan gelombang segitiga

Seperti yang tampak pada gambar, siklus dalam proses penambahan dan

pengurangan dalam pembentukan sinyal segitiga terus berulang.

Keluaran dari akumulator fasa pada proses ini tidak diarahkan ke ROM, melainkan

nantinya akan langsung ditujukan ke register output sebelum terlebih dahulu dilewatkan

melalui pengontrol segitiga dan pengontrol segi empat. Hal ini dikarenakan hasil

penambahan dan pengurangan pada akumulator fasa akan berbentuk garis naik linier saat

penambahan, dan berbentuk garis turun linier saat proses pengurangan.

Page 35: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

19

Penentuan frekuensi pada proses pembentukan gelombang segitiga ini tetap

mengandalkan nilai tuning word yang dimasukkan pada awal konfigurasi aristektur

pembentuk gelombang.

3.4 Metoda Pembentukan Gelombang Kotak Untuk membangkitkan gelombang kotak, prosesnya sama saja dengan cara

pembentukan gelombang segitiga. Hanya saja, pada proses ini ditambahkan pengontrol lagi

supaya nilai biner dari keluaran akumulator fasa tidak semuanya dikirimkan ke register

output. Yang perlu diambil dari keluaran akumulator fasa hanyalah bagian MSB dari

bilangan biner yang dihasilkan. Diagram alir dari pembentukan sinyal kotak ditunjukkan

pada gambar 3.8.

Gambar 3.8 Diagram alir dari pembentukan gelombang kotak

Pada pembentukan gelombang kotak ini, nilai MSB dari bilangan biner yang

dihasilkan oleh akumulator fasa otomatis sudah membentuk nilai ekuivalen bagi

gelombang kotak yang akan dibentuk.

Page 36: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

20

3.5 Pin Pengontrol, Pin Masukan dan Pin Keluaran pada UP1 Board Flex_Expan_B yang memiliki jumlah total 60 pin akan dimanfaatkan sebagai

keluaran register output, dan sebagai port masukan dari pengontrol gelombang segitiga dan

gelombang kotak. Gambar dari UP1 Board ditunjukkan pada gambar 3.9

Gambar 3.9 Blok diagram dari UP1 Board

Tidak semua port dari Flex_Expan_B akan digunakan. Keluaran dari register

output berjumlah 8 bit, maka untuk keperluan ini hanya akan digunakan 8 pin dari

Flex_Expan_B. Dan untuk keperluan pengontrol bentuk gelombang kotak dan segitia,

diperlukan 2 pin lagi sebagai masukan dari sakral pengontrol. Gambar 3.10 memberikan

detail skema pin keluaran dan pin pengontrol.

Gambar 3.10 Skema dari pin keluaran dan pin control

Page 37: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

21

Pin-pin yang akan digunakan adalah pada bagian FLEX_EXPAN_B. Pin dengan nomor

15, 17, 19, 21, 23, 25, 27, 29 digunakan sebagai pin keluaran, yang terhubung pada kaki

input dari IC DAC0832. Sementara pin dengan nomor 31, dan 33 akan digunakan sebagai

pin masukan yang terhubung dengan saklar pengatur gelombang segitiga.

3.6 Penggunaan Flex_Switch Pada Papan UP1 Board Untuk memasukkan nilai tuning word pada blok DDS, maka digunakan flex switch

yang sudah terdapat pada papan UP1 Board. Gamar dari flex switch yang akan digunakan

ditunjukkan pada gambar 3.11

.

Gambar 3.11 Bagian Flex-Switch yang akan digunakan sebagai input tuning word

3.7 Perancangan Pembagi Frekuensi. Untuk mendapatkan frekuensi dasar pada kisaran frekuensi audio, maka akan

dibangun pembagi frekuensi menggunakan serangkaian JK-Flip-Flop. Frekuensi clock

dasar simulator adalah 5MHz. Dan frekuensi on-board pada UP1 Board bernilai 25,175

MHz.

Besarnya clock tersebut masih harus diperkecil. Nilai clock referensi yang

diinginkan bagi blok sistem adalah pada frekuensi maksimal audio, yaitu 20KHz.

Perancangan modul pembagi frekuensi ini nantinya akan dideskripsikan menggunakan

VHDL, sama halnya dengan perancangan pada blok utama DDS.

3.8 Perancangan Saklar Pengontrol Gelombang Segitiga dan Kotak Untuk membentuk gelombang segitiga dan kotak, diperlukan kontrol pada blok

DDS. Untuk itu ditambahkan 2 buah saklar pengontrol. Logika tinggi pada masing-masing

Page 38: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

22

saklar akan mengaktifkan kontrol, dan logika rendah akan mematikan kontrol. Gambar

3.12 menunjukkan skematik rangkaiannya.

Gambar 3.12 Rangkaian saklar pengontrol

3.9 Pengimplementasian Perancangan. Perancangan darn simulasi akan dilakukan menggunakan VHDL. Hasil dari

perancangan menggunakan VHDL ini akan di-download ke devais CP:D dari keluarga

FLEX 10K70. Devais CPLD ini sudah tertanan secara on-board pada UP1 Board.

Page 39: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

23

BAB IV

HASIL DAN PEMBAHASAN

Dari hasil perancangan menggunakan perangkat lunak, telah dihasilkan suatu

pembentuk gelombang. Seperti yang telah dipaparkan dalam batasan masalah, yaitu bahwa

gelombang yang akan dibuat dalam penelitian ini adalah gelombang dalam bentuk sinus,

kotak, dan segitiga.

Pengujian simulasi dilakukan menggunakan simulator yang terdapat pada Altera

Max+Plus II yang digunakan untuk membuat pembangkit gelombang. Hampir semua hasil

perancangan berjalan dengan baik, karena masih ditemukan beberapa hal yang tampak

tidak sesuai dengan perancangan.

Hasil dari gelombang keluaran bisa diuji, baik dari bentuk gelombang itu sendiri,

maupun efek perubahan nilai frekuensinya. Hal ini bisa dilakukan bila aplikasi pembangkit

gelombang yang dibuat menggunakan VHDL ini, diunduh terlebih dahulu ke dalam divais

CPLD, yang kemudian bentuk gelombangnya dideteksi pada osiloskop.

Cara lain dalam upaya pengujian bentuk gelombang berikut nilai frekuensinya

adalah dengan meng-copy tabel hubungan antara waktu dengan nilai-nilai biner pembentuk

gelombang ke sebuah aplikasi pengolah data. Dari tabel tersebut, maka kemudian dapat

dibangkitkan sebuah grafik yang merepresentasikan korespondensi antara nilai-nilai

pembentuk amplitudo gelombang dalam hubungannya dengan waktu.

Namun pengunduhan aplikasi pembangkit gelombang ke dalam divais CPLD

belum dapat dilakukan, sehingga dalam pembahasan ini, akan dibahas hasil-hasil pengujian

pada simulator dari masing-masing bentuk gelombang.

4.1 Pengujian Blok-blok Penyusun Konfigurasi Pembentuk

Gelombang Sebelum membahas hasil simulasi dari masing-masing bentuk gelombang, terlebih

dahulu akan dibahas kinerja dari setiap blok penyusun konfigurasi pembangkit

gelombang.

Page 40: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

24

4.1.1 Pengujian Register Input Gambar 4.1 merupakan gambar dari blok register input. Di dalam blok register

input ini terdapat deskripsi register input dalam bentuk deskripsi behavioral.

Gambar 4.1 Blok Register Input

Blok register input ini berfungsi sebagai penyimpan nilai-nilai input, yang

kemudian akan mengeluarkan output yang bersesuaian dengan input yang dimasukkan

pada setiap terjadi siklus clock. Port IN1 merupakan bagian LSB (Least Significant Bit),

sementara port IN8 merupakan bagian MSB (Most Significant Bit). Model penamaan port

ini juga berlaku pada blok lainnya. Port input/output dengan label ‘8’ merupakan MSB,

dan port input/output dengan label ‘1’ merupakan LSB. Perkecualian ada pada blok ROM,

yang akan dijelaskan pada sub bab berikutnya.

Blok register input ini sudah bekerja dengan baik sesuai dengan perancangan.

Gambar 4.2 menunjukkan hasil simulasi dari blok register input.

Gambar 4.2 Hasil simulasi dari blok register input

Dalam gambar 4.2, ditunjukkan nilai input heksadesimal bernilai E016. Saat siklus

clock terjadi dan clock bernilai satu, port output mengeluarkan nilai yang sesuai dengan

masukannya, yaitu E016. Dengan demikian, blok register input sudah bekerja sesuai

perancangan.

Page 41: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

25

4.1.2 Pengujian Blok Akumulator

Seperti yang telah dipaparkan dalam BAB III, yaitu bahwa blok akumulator dalam

konfigurasi pembentuk gelombang ini terdiri dari rangkaian penambah/pengurang

komplemen 2. Gambar 4.3 menunjukkan rangkaian dari blok akumulator.

Gambar 4.3 Rangkaian blok akumulator

Dalam gambar 4.3, ditunjukkan bahwa masukan b8 sampai b1 disalurkan terlebih

dahulu ke blok gerbang XOR, yang kemudian akan di-XOR-kan dengan Sub. Sementara

masukan a8 sampai a1 langsung dimasukkan ke blok full-adder. Port b8 dan a8 masing-

masing merupakan bagian MSB, dan bagian b1 dan a1 masing-masing merupakan bagian

LSB. Konfigurasi yang ditampilkan dalam gambar 4.3 sudah sesuai dengan dasar teori dan

perancangan. Hasil simulasi dari cara kerja blok akumulator ditampilkan dalam gambar 4.4

dan 4.5

Gambar 4.4 Hasil simulasi dari proses penambahan

Page 42: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

26

Gambar 4.4 menunjukkan hasil simulasi dari proses penambahan. Nilai Sub

ditetapkan pada nilai 0 supaya blok akumulator melakukan penambahan. Nilai input

a[8..1] ditetapkan pada nilai heksadesimal 0516. Nilai input b[8..1] yang bernilai 0116

berlaku sebagai bagian penambah. Dengan demikian, nilai input a[8..1] ditambah oleh

nilai input b[8..1], dimana nilai 0516 ditambah dengan nilai 0116, sehingga menghasilkan

nilai output out[8..1] sebesar 0616, dengan nilai keluaran bawaan (carry) sebesar 0. Gambar

4.4 menunjukkan bahwa cara kerja proses penambahan pada blok akumulator sudah

bekerja sesuai dengan perancangan.

Untuk melakukan proses pengurangan, nilai Sub ditetapkan pada nilai 1, seperti

yang telah dibahas pada ulasan perancangan pada BAB III. Gambar 4.5 menunjukkan hasil

simulasi untuk proses pengurangan.

Gambar 4.5 Hasil simulasi dari proses pengurangan

Gambar 4.5 menunjukkan bahwa proses pengurangan pada blok akumulator sudah

bekerja sesuai perancangan. Nilai port a[8..1] dengan besar bilangan heksadesimal 0516

dikurangi dengan nilai port b[8..1] dengan besar bilangan heksadesimal 0116, yang

menghasilkan nilai output out[8..1] dengan besar bilangan heksadesimal 0416, dan nilai

biner keluaran bawaan (carry) sebesar 12. Proses ini sudah sesuai dengan perancangan.

Dengan demikian, blok akumulator sudah bekerja sesuai perancangan baik pada proses

penambahan maupun pada proses pengurangan.

4.1.3 Pengujian Blok Register Adder/Register Fasa Register fasa berfungsi sebagai penyimpan dan penyalur nilai-nilai biner yang

dihasilkan dari tiap-tiap port keluaran blok full-adder. Prinsip kerjanya sama persis dengan

prinsip kerja register input, yaitu menyimpan setiap nilai biner masukan, dan menghasilkan

keluaran yang bersesuaian dengan nilai masukkannya pada setiap terjadi siklus clock .

Gambar 4.6 menunjukkan gambar dari blok register fasa.

Page 43: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

27

Gambar 4.6 Blok register adder/register fasa

Register fasa/register adder pada gambar 4.6 berfungsi sebagai penyimpan nilai-

nilai biner yang dikirim dari blok akumulator, yang kemudian akan disalurkan ke blok

ROM dan blok pengontrol gelombang segitiga. Gambar 4.7 menunjukkan hasil simulasi

dari cara kerja register adder.

Gambar 4.7 Hasil simulasi dari cara kerja register adder

Pada gambar 4.7, ditunjukkan bahwa nilai input heksadesimal in[8..1] adalah

sebesar 5516. Saat clock terjadi dan clock bernilai satu, port keluaran ot[8..1] menghasilkan

nilai output sebesar 5516. Ini berarti bahwa proses kerja register adder sudah bekerja sesuai

dengan perancangan.

4.1.4 Pengujian Blok ROM ROM pada konfigurasi pembentuk gelombang ini berfungsi sebagai penyimpan

nilai-nilai data yang akan membentuk gelombang sinus. Gambar 4.8 menunjukkan gambar

dari blok ROM penyimpan nilai data pembentuk gelombang sinus.

Page 44: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

28

Gambar 4.8 Blok ROM

Pada gambar 4.8, ditunjukkan bahwa blok ROM bernama SINELUT. Hal ini

dimaksudkan bahwa ROM di sini (Read Only Memory) sama dengan LUT (Look Up

Table). Dinamakan demikian karena ROM ini adalah tempat dimana terjadi proses

pencarian nilai-nilai biner pembentuk gelombang sinus yang bersesuaian dengan nilai biner

alamat yang dikirimkan pada port input blok ROM. Gambar 4.9 dan 4.10 menunjukkan

hasil simulasi dari cara kerja ROM ini.

Gambar 4.9 Hasil simulasi dari blok ROM dengan alamat desimal 110

Terdapat kesalahan penempatan letak port MSB dan LSB pada blok ROM. Port

si8 dan so8 merupakan port LSB, sedangkan port si1 dan s1 merupakan port MSB.

Keterbalikan penempatan ini tidak menjadi masalah, karena bisa diatasi dengan

pengubahan hubungan jalur-jalur masukan dan keluaran pada blok ROM ini. MSB dari

blok di luar blok ROM dihubungkan dengan so1 dan si1, dan LSB dari blok luar

Page 45: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

29

dihubungkan dengan si8 dan so8. Urutan bit di antara MSB dan LSB juga disesuaikan.

Dengan pengubahan hubungan jalur-jalur masukan dan keluaran pada blok ROM ini, maka

blok ROM ini tetap bekerja sebagaimana mestinya seperti yang diharapkan pada

perancangan.

Hasil simulasi ditunjukkan pada gambar 4.9. Ditunjukkan bahwa nilai input (port

si1-si8 dengan MSB si1) adalah sebesar 000000012 atau setara dengan nilai heksadesimal

0116. Nilai tersebut merupakan alamat yang dituju pada ROM. ROM kemudian

menampilkan data keluaran yang bersesuaian dengan alamat yang dikirim. Kelompok port

output menunjukkan nilai 100000112 atau setara dengan nilai heksadesimal 8316. Ini adalah

nilai data yang bersesuaian dengan nilai alamat yang dituju pada ROM.

Penampilan hasil simulasi pada blok ROM ini tidak dapat direpresentasikan dengan

grouping output seperti yang ditunjukkan pada gambar 4.7. Hal ini dikarenakan simulator

akan membaca urutan MSB ke LSB secara default dari so8 ke so1. Dengan demikian

pembacaan urutan MSB ke LSB pada hasil simulasi pada gambar 4.9 dan 4.10 dibalik

urutannya dari si1 ke si8. Contoh lebih lanjut ditunjukkan pada gambar 4.10.

Gambar 4.10 Hasil simulasi blok ROM dengan nilai alamat desimal 17310.

Gambar 4.10 menunjukkan hasil simulasi ROM dengan nilai alamat yang dituju

sebesar 17310 (101011012). Hal ini berarti bahwa dicari nilai data pada alamat ke-173. Nilai

port keluaran menunjukkan nilai biner sebesar 000011012 (0D16). Proses ini sudah

bersesuaian dengan perancangan ROM yang terdapat pada gambar 3.3.

Dengan dua contoh yang ditampilkan pada gambar 4.9 dan gambar 4.10, maka

dapat dinyatakan bahwa blok ROM sudah bekerja sebagaimana mestinya, sesuai dengan

perancangan.

Page 46: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

30

4.1.5 Pengujian Blok Pengontrol Gelombang Segitiga Prinsip kerja blok pengontrol gelombang segitiga telah dipaparkan di bagian

perancangan pada BAB III. Sub bab ini membahas hasil simulasi blok pengontrol

gelombang segitiga. Gambar 4.11 menunjukkan gambar blok pengontrol gelombang

segitiga, sedangkan gambar 4.12 dan gambar 4.13 menunjukkan hasil simulasi dari cara

kerja blok pengontrol gelombang segitiga.

Gambar 4.11 Gambar blok pengontrol gelombang segitiga

Gambar blok pengontrol gelombang segitiga tersebut terdiri dari 8 port input, dan

dua kelompok port output, yaitu kelompok port c8-c1, dan kelompok port b8-b1. Dengan

tambahan port control untuk mengendalikan keadaan aktif/non-aktif, dan juga port clk

untuk clock. Gambar 4.12 menunjukkan hasil simulasi untuk port control bernilai nol (non-

aktif).

Gambar 4.12 Hasil simulasi blok pengontrol segitiga dengan nilai nol pada port control

Ditunjukkan pada gambar 4.12, bahwa dengan port control bernilai nol, maka saat

terjadi siklus clock, input akan disalurkan ke kelompok port output b8-b1. Ditunjukkan

Page 47: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

31

pada gambar 4.12, bahwa nilai port output b[8..1] bernilai sama dengan nilai input i[8..1],

yaitu 5516. Sementara kelompok port output c8-c1 tidak menyalurkan nilai keluaran selain

nilai 0016. Gambar 4.13 menunjukkan hasil simulasi dengan nilai satu pada port control .

Gambar 4.13 Hasil simulasi blok pengontrol segitiga dengan nilai satu pada port control

Gambar 4.13 menunjukkan hasil simulasi untuk port control bernilai satu.

Ditunjukkan pada gambar tersebut bahwa dengan nilai satu pada port control, kelompok

port output c8-c1 akan menyalurkan nilai input, sementara kelompok port output b8-b1

tidak mengeluarkan output selain nilai 0016.

Dengan dua contoh hasil simulasi seperti yang ditunjukkan pada gambar 4.12 dan

gambar 4.13, di mana blok pengontrol segitiga akan memilih jalur keluaran yang

bergantung pada port control apakah bernilai nol atau satu, maka blok pengontrol

gelombang segitiga telah bekerja sesuai perancangan.

4.1.6 Pengujian Blok Pengontrol Gelombang Kotak

Gambar blok pengontrol gelombang kotak ditunjukkan pada gambar 4.14,

sementara hasil simulasi blok pengontrol segiempat ditunjukkan pada gambar 4.15 dan

gambar 4.16.

Gambar 4.14 Blok pengontrol gelombang segiempat

Page 48: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

32

Prinsip kerja blok pengontrol gelombang segiempat telah dipaparkan pada bab

perancangan, maka penulis akan langsung membahas hasil simulasinya.

Gambar 4.15 Hasil simulasi blok pengontrol segiempat dengan nilai nol pada port control

Gambar 4.15 menunjukkan bahwa dengan nilai nol pada port control, maka input

bernilai 101110112 (BB16) akan disalurkan seluruhnya ke kelompok port output b8-b1 .

Sementara Gambar 4.16 akan menunjukkan efek dari pengubahan nilai port control

menjadi satu, yaitu bahwa blok pengontrol segiempat hanya akan melewatkan MSB input

ke port keluaran. Port MSB pada blok ini adalah i8 dan b8.

Gambar 4.16 Hasil simulasi blok pengontrol segiempat dengan nilai satu pada port

control

Gambar 4.15 dan gambar 4.16 menunjukkan bahwa proses kerja blok pengontrol

gelombang segiempat telah bekerja sesuai perancangan.

Page 49: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

33

4.1.7 Pengujian Blok Pengontrol Output Prinsip kerja blok pengontrol output telah dijelaskan pada bab perancangan. Maka

penulis akan langsung membahas hasil simulasi cara kerja blok pengontrol output. Gambar

4.17 menunjukkan gambar blok pengontrol output. Pada gambar 4.17, blok pengontrol

output dinamakan kontrol_reg_output. Hal ini dikarenakan blok tersebut akan mengatur

data mana saja yang nantinya akan dikirimkan oleh register output ke DAC.

Gambar 4.17 Blok pengontrol output

Gambar 4.18 menunjukkan hasil simulasi dengan nilai nol pada port control,

sementara gambar 4.19 menunjukkan hasil simulasi dengan nilai satu pada port control.

Gambar 4.18 Hasil simulasi pengontrol output dengan nilai nol pada port control

Gambar 4.19 Hasil simulasi pengontrol output dengan nilai satu pada port control

Page 50: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

34

Pada gambar 4.18, ditunjukkan bahwa dengan nilai nol pada port control, maka

port-port output o[8..1] akan melewatkan input dari kelompok input i8-i1 yang bernilai

CB16. Sementara bila port control bernilai satu, maka kelompok port output o[8..1] akan

melewatkan input dari kelompok input l8-l1 yang bernilai FA16. Dua contoh yang

ditampilkan pada gambar 4.18 dan 4.19 memperlihatkan bahwa proses kerja blok

pengontrol output sudah bekerja sesuai perancangan.

4.1.8 Pengujian Blok Register Output Prinsip kerja blok register output ini sama persis dengan prinsip kerja register input

maupun register fasa/register adder. Gambar 4.20 menunjukkan simbol blok register

output, dan gambar 4.21 menunjukkan hasil simulasi dari cara kerja blok register output.

Gambar 4.20 Gambar blok register output

Gambar 4.21 Hasil simulasi dari blok register output

Gambar 4.21 menunjukkan bahwa register output menyalurkan apa yang

dimasukkan ke port input saat terjadi siklus clock. Dengan demikian penulis menyatakan

bahwa cara kerja blok register output sudah sesuai seperti perancangan.

4.2. Pengujian Gelombang Sinus.

Karena bagian DAC belum dibuat, maka tampilan analog gelombang sinus dan

karakteristiknya terhadap perubahan frekuensi dan amplitudo tidak bisa diamati, sehingga

Page 51: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

35

sub bab ini hanya akan membahas kesesuaian antara perancangan nilai ROM sinus dengan

hasil yang ditampilkan pada simulasi.

Pada gambar 3.3 di bab perancangan, telah ditampilkan nilai-nilai data pembentuk

amplitudo gelombang sinus, yang didapat dari hasil perhitungan menggunakan MATLAB.

Berikut ini adalah gambar dari hasil simulasi gelombang sinus dengan nilai tuning

word 000000012 atau setara dengan bilangan desimal satu.

Gambar 4.22. Hasil simulasi pembangkitan gelombang sinus dengan nilai tuning word 000000012

Pada gambar 4.22 (atas), ditunjukkan keluaran dari kelompok port output out_1

sampai out_8, yaitu nilai-nilai biner yang merepresentasikan nilai pembentuk amplitudo

gelombang sinus pada setiap siklus clock yang terjadi. Gambar 4.22 (bawah) menunjukkan

nilai output ekivalen pada nilai desimalnya. Gambar tersebut menunjukkan simulasi

pembangkitan gelombang sinus dengan nilai kenaikan bilangan biner yang setara dengan

desimal satu.

Dengan demikian, setiap siklus clock terjadi, blok akumulator melakukan

penambahan. Output blok akumulator kemudian dikirimkan ke ROM. ROM membaca

output akumulator yang terkirim sebagai nilai alamat yang harus dituju. Akhirnya, ROM

akan mencari nilai data pembentuk gelombang sinus yang bersesuaian dengan nilai alamat

yang dikirim dari blok akumulator tersebut.

Pada siklus pertama, simulasi menunjukkan nilai biner keluaran 100000002 atau

setara dengan nilai heksadesimal 8016 yang setara dengan desimal 12810, sesuai dengan

perancangan, yaitu nilai heksadesimal 8016 pada alamat heksadesimal 0016. Saat clock

berikutnya terjadi, nilai alamat bertambah satu dari 002 menjadi 012. Dengan demikian data

Page 52: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

36

berikutnya yang harus dicari ROM adalah data pada alamat hex 0116. Simulasi

menunjukkan nilai data 8316 (13110). Di sini juga simulasi menunjukkan kesesuaian.

Begitu pula setelah dilakukan pengambilan alamat secara random, yaitu pada

alamat biner 111111102 dengan isi alamat bernilai hex 7916 (25410). Dengan demikian

simulasi pembentukan gelombang sinus sudah sesuai dengan perancangan. Semua nilai

amplitudo digital gelombang sinus yang dirancang pada ROM sinus, bersesuaian dengan

hasil simulasi. Hasil simulasi dalam rentang waktu yang lebih lama ditunjukkan pada

gambar 4.23.

Gambar tersebut merupakan hasil simulasi dengan rentang waktu antara 0 µS – 250

µS dengan menggunakan clock bawaan pada simulator. Blok pembagi frekuensi belum

digunakan pada sesi simulasi ini semata-mata demi mempersingkat waktu simulasi, karena

bila menggunakan rentang waktu dengan rangkaian siklus clock yang berdasar pada

frekuensi audio, simulasi akan berjalan cukup lama.

Gambar 4.23. Hasil simulasi pembangkitan gelombang sinus pada rentang frekuensi 0 µS – 250 µS dengan nilai tuning word 000000012

Nilai perioda gelombang yang dapat dari hasil simulasi pada gambar 4.23 adalah

50µS. Dengan demikian, dari nilai perioda tersebut didapat nilai frekuensi gelombang

sinus sebesar 20KHz. Ini adalah nilai frekuensi gelombang pada saat gelombang

dibangkitkan dengan kenaikan langkah sebesar satu biner atau setara dengan desimal satu.

Page 53: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

37

Dengan demikian, pada kenaikan langkah sebesar satu biner ini, sudah didapat suatu

gelombang dengan nilai maksimum frekuensi audio, yaitu 20KHz.

Karena blok DAC yang berfungsi untuk melihat keluaran analog dari bentuk

gelombang tidak berhasil dibuat, maka bentuk analog dari gelombang sinus yang

semestinya dapat ditampilkan di osiloskop tidak dapat ditampilkan pada pembahasan ini.

Meskipun bentuk analog gelombang dari osiloskop tidak dapat ditampilkan pada

pembahasan ini, masih ada cara lain untuk dapat merepresentasikan bentuk grafis

gelombang sinus yang dihasilkan, yaitu dengan menampilkan grafik yang dihasilkan oleh

aplikasi pengolah data Microsoft Excell. Grafik ini pada dasarnya merupakan hubungan

korespondensi antara urutan siklus clock dengan nilai-nilai pembentuk gelombang sinus.

Gambar 4.24 menunjukkan representasi grafis dari gelombang sinus dengan nilai tuning

word sebesar 000000012.

0

50

100

150

200

250

300

1 22 43 64 85 106 127 148 169 190 211 232 253

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Gambar 4.24 Representasi grafis dari bentuk gelombang sinus dengan tuning word

sebesar 000000012.

Pada gambar 4.24, sumbu x diberi nama “siklus clock”, karena pengambilan data

untuk pembentukan grafik gelombang sinus didasarkan pada siklus clock, dan bukan

berdasarkan pada rentang waktu, dengan pertimbangan bahwa pengamatan perubahan nilai

per siklus clock adalah esensi dari penelitian terhadap konfigurasi sistem pembentuk

gelombang digital ini. Pengamatan berdasarkan rentang waktu membutuhkan pengambilan

data dalam jumlah banyak, karena akan terjadi pengambilan nilai data yang sama persis

dalam rentang waktu satu siklus clock.

Penulis mengambil data dari pengamatan terhadap perubahan nilai data per siklus

clock pada hasil simulasi seperti yang tampak pada gambar 4.22. Selanjutnya, karena

Page 54: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

38

besar tuning word adalah 000000012, maka jumlah siklus clock yang terjadi dalam satu

periode gelombang adalah 256 kali. Dengan demikian, maka penulis mengambil jumlah

data sebanyak 256 buah, yang berarti sebanyak 256 alamat, dimulai dari clock pertama

sampai clock ke-256.

Sumbu y mewakili nilai data desimal yang merupakan konversi dari bilangan

heksadesimal pembentuk gelombang sinus yang terdapat pada ROM.

Contoh tabel data yang digunakan sebagai dasar pembentukan grafik gelombang

sinus dapat dilihat pada LAMPIRAN 1: CONTOH TABEL UNTUK PEMBENTUKAN

GELOMBANG SINUS PADA TUNING WORD 000000012

4.2.1 Pengujian Gelombang Sinus Dengan Tuning Word 000000102

Untuk melihat pengaruh penaikan nilai tuning word M pada register masukan

terhadap perubahan nilai frekuensi gelombang, dapat dilihat hasilnya pada gambar 4.25.

Pada gambar tersebut, nilai biner diubah dari 000000012 menjadi 000000102. Nilai biner

yang baru ini setara dengan nilai desimal dua.

Gambar 4.25 Hasil simulasi pembangkitan gelombang sinus dengan tuning word sebesar nilai biner 10 atau setara dengan desimal dua.

Gambar 4.25 menunjukkan suatu hasil simulasi saat nilai tuning word pada register

masukan dinaikkan nilai langkahnya, dengan nilai biner 102, atau setara dengan desimal

dua. Hasil simulasi menunjukkan bahwa dengan nilai step (tuning word) sebesar 10 biner,

maka didapat frekuensi dua kali lipat dari hasil simulasi pada gambar 4.23. Gambar 4.25

menunjukkan frekuensi gelombang sebesar 40KHz. Ini berarti bahwa frekuensi output

pada tuning word 000000102 bernilai dua kali lebih besar dari frekuensi output dengan

tuning word 000000012. Dan simulasi ini juga diambil pada rentang waktu antara 0 µS –

Page 55: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

39

250 µS, sama dengan nilai rentang waktu pada hasil simulasi pada gambar 4.23. Hal ini

membuktikan bahwa kenaikan nilai tuning word akan menaikkan frekuensi output.

Pengambilan dua contoh hasil simulasi seperti pada gambar 4.23 dan gambar 4.25

di atas, dilakukan pada siklus clock dengan nilai perioda clock sebesar 200ns. Yang

ekuivalen dengan nilai frekuensi sebesar 5MHz. Penggunaan clock dalam pengambilan

contoh hasil simulasi ini, yang tidak sesuai perancangan, yaitu seharusnya di rentang

frekuensi audio, semata-mata hanyalah untuk mempersingkat waktu pelaksanaan simulasi,

karena sifat dari pembentukan gelombangnya tetaplah sama; yaitu pengaksesan memori di

ROM sinus yang kemudian memberikan nilai biner yang merepresentasikan nilai

amplitudo gelombang, yang berkorespondensi dengan alamat di ROM sinus tersebut.

Sementara pembahasan mengenai karakteristik gelombang pada rentang frekuensi audio,

akan penulis bahas pada sub bab berikutnya.

Representasi grafis dari bentuk gelombang sinus dengan besar tuning word

00000010 ditunjukkan pada gambar 4.26.

0

50

100

150

200

250

300

1 12 23 34 45 56 67 78 89 100 111 122 133

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Gambar 4.26 Representasi grafis dari bentuk gelombang sinus dengan tuning word

sebesar 000000102.

Pada gambar 4.26, ditunjukkan bahwa gelombang sinus terbentuk dengan baik pada

tuning word 000000102. Tentu saja hal ini dikarenakan nilai tuning word tersebut masih

memberikan resolusi gelombang yang cukup tinggi.

Penulis menemukan bahwa semakin besar nilai tuning word, maka semakin kecil

resolusi gelombang, yang akan berakibat pada kualitas bentuk gelombang yang semakin

buruk. Hal ini akan penulis bahas pada sub bab selanjutnya.

Page 56: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

40

4.2.2 Pengaruh Nilai Tuning Word Pada Bentuk Gelombang Sinus Perubahan nilai tuning word berpengaruh terhadap besarnya nilai frekuensi

gelombang keluaran, sekaligus juga berpengaruh terhadap kualitas bentuk gelombang

keluaran. Semakin besar nilai tuning word, maka resolusi gelombang keluaran juga

semakin kecil, dan kualitas bentuk gelombang semakin menjauh dari bentuk gelombang

sinus yang sempurna. Bentuk gelombang sudah mulai menunjukkan kerusakan pada nilai

tuning word 000100002, sehingga disimpulkan bahwa frekuensi tertinggi untuk

membentuk gelombang sinus yang baik berada pada nilai tuning word ini. Gambar 4.27

menunjukkan representasi grafis dari bentuk gelombang sinus pada tuning word

000100002.

0

50

100

150

200

250

300

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Gambar 4.27 Representasi grafis bentuk gelombang sinus pada tuning word 000100002

Tampak pada gambar 4.27, bahwa bentuk gelombang pada nilai tuning word

000100002 sudah tidak sempurna. Ketidaksempurnaan bentuk ini tampak pada puncak atas

dan puncak bawah gelombang. Terlihat pada gambar tersebut bahwa kelengkungan

gelombang sinus tidak sempurna dengan munculnya beberapa sudut garis yang signifikan.

Meskipun bila dilihat secara sepintas, bentuk gelombang pada gambar 4.27 masih

tampak berupa gelombang sinus, namun munculnya beberapa sudut garis siginifikan pada

kelengkungan gelombang sudah menyebabkan gelombang tidak memenuhi syarat untuk

dinamakan gelombang sinus yang sempurna. Gambar 4.28 dan gambar 4.29 akan

membuktikan lebih jauh mengenai efek dari penaikan nilai tuning word terhadap bentuk

gelombang keluaran.

Page 57: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

41

0

50

100

150

200

250

300

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Gambar 4.28 Representasi grafis bentuk gelombang sinus pada tuning word 001000002

0

50

100

150

200

250

300

1 2 3 4 5 6 7 8

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Gambar 4.29 Representasi grafis bentuk gelombang sinus pada tuning word 100000002

Gambar 4.28 menunjukkan representasi grafis dari bentuk gelombang dengan nilai

tuning word 001000002 atau setara dengan bilangan desimal 3210. Sementara gambar 4.29

menunjukkan representasi grafis dari bentuk gelombang dengan nilai tuning word

100000002 atau setara dengan nilai desimal 12810. Dua contoh bentuk gelombang pada

gambar 4.28 dan gambar 4.29 membuktikan bahwa nilai tuning word yang terus

Page 58: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

42

ditingkatkan akan mengubah bentuk gelombang sinus. Nilai 12810 bukanlah nilai

maksimum yang dapat dicapai oleh deretan tuning word, namun pada nilai tersebut bentuk

gelombang sudah menjadi gelombang segitiga.

Dengan demikian dapat disimpulkan bahwa dengan tuning word n bit, gelombang

sinus memiliki batas kesempurnaan yang tidak terletak pada nilai maksimum tuning word.

Pada penelitian ini, dengan tuning word 8 bit, batas kesempurnaan bentuk gelombang ada

pada nilai tuning word 000100002 atau setara dengan nilai desimal 16.

4.2.3 Karakteristik Gelombang Sinus Pada Frekuensi Audio Penelitian ini mensyaratkan frekuensi gelombang keluaran pada kisaran rentang

frekuensi audio, yaitu antar 20 Hz sampai 20.000 Hz. Perubahan nilai tuning word akan

mengakibatkan perubahan frekuensi dalam rentang frekuensi tersebut.

Karena pengunduhan aplikasi pembentuk gelombang ke devias CPLD yang

memiliki frekuensi clock standar sebesar 25 MHz belum dilakukan, maka sub bab ini akan

membahas hasil simulasi saja.

Simulator yang digunakan dalam simulasi memiliki frekuensi clock standar sebesar

5 MHz. Untuk menghasilkan frekuensi clock pada rentang frekuensi audio, maka penulis

merancang suatu pembagi frekuensi dalam bentuk rangkaian pencacah biner 8 bit.

Pencacah biner 8 bit ini akan membagi frekuensi 5 MHz menjadi 19.531,25 MHz. Nilai

tersebut sudah mendekati titik maksimum frekuensi audio (20 KHz). Gambar 4.30

menunjukkan rangkaian pencacah biner 8 bit.

Gambar 4.30 Rangkaian pencacah biner 8 bit.

Hasil simulasi dari rangkaian pembagi frekuensi pada gambar 4.30 ditunjukkan

pada gambar 4.31 dan 4.32.

Gambar 4.31 Titik awal dalam satu periode clock keluaran dari pembagi frekuensi

Page 59: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

43

Gambar 4.32 Titik akhir dalam satu periode clock keluaran dari pembagi frekuensi

Dari gambar 4.30 dan gambar 4.31, didapat nilai periode satu siklus clock sebesar

51,3 µs, yang berarti setara dengan nilai frekuensi 19.493 Hz.

Dengan nilai frekuensi clock sebesar 19.493 Hz, maka dengan nilai tuning word

sebesar 000000012 akan dihasilkan gelombang keluaran dengan nilai frekuensi sebesar

76,144 Hz (19.493Hz dibagi dengan 256 kali pengambilan data dalam satu periode

gelombang)Hz. Gambar 4. 32 dan gambar 4.33 akan menunjukkan hasil simulasinya.

Gambar 4.33 Titik awal pada satu periode gelombang sinus dengan nilai tuning word

000000012

Gambar 4.34 Titik akhir dalam satu periode gelombang sinus dengan nilai tuning word

000000012

Page 60: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

44

Dari gambar 4.32 dan gambar 4.33, didapat nilai satu periode gelombang sinus

sebesar 13ms yang setara dengan 76,324 Hz. Nilai ini adalah nilai frekuensi terkecil dari

gelombang sinus keluaran. Nilai frekuensi keluaran gelombang tersebut menunjukkan

bahwa teori perancangan dan hasil simulasi menunjukkan nilai yang sama. Memang

tampak adanya sedikit perbedaan nilai antara hasil perhitungan dan hasil simulasi. Nilai

frekuensi hasil perhitungan adalah sebesar 76,144Hz, sementara hasil simulasi adalah

76,324 Hz. Hal ini semata-mata hanya disebabkan oleh faktor penempatan kursor yang

tidak terlalu presisi saat pencarian batas awal dan batas akhir pada satu periode gelombang

keluaran, bukan karena faktor teknis perancangan.

Karena nilai tuning word 000100002 merupakan batas maksimum untuk

mendapatkan gelombang sinus yang baik, maka nilai frekuensi gelombang yang dihasilkan

pada tuning word inilah yang menjadi batas maksimum gelombang sinus. Nilai tuning

word 000100002 setara dengan nilai desimal 1610. Pada nilai tuning word ini, terjadi

pengambilan data dalam satu periode gelombang sebanyak 16 kali. Pembuktian hal ini

dapat dilihat pada gambar 4.27. Pada gambar tersebut ditunjukkan bahwa dalam satu

periode gelombang sinus, terjadi pengambilan data sebanyak 16 kali. Dengan demikian,

frekuensi gelombang yang akan dihasilkan adalah sebesar 1.218,312 Hz atau sekitar 1,2

KHz. Nilai ini didapat dari hasil pembagian nilai frekuensi clock dengan nilai tuning word

(19.493 Hz : 16).

Representasi grafis dari bentuk gelombang dari berbagai nilai tuning word pada

rentang frekuensi audio ini, bentuknya sama persis dengan yang ditunjukkan pada gambar

4.27 sampai gambar 4.29.

Dengan demikian, pengujian gelombang keluaran sinus pada rentang frekuensi

audio tidak mengubah bentuk gelombang dan resolusi gelombang itu sendiri. Faktor yang

terpengaruh hanyalah rentang frekuensi keluaran.

4.3. Pengujian Gelombang Segitiga Sama halnya seperti pembahasan pada pengujian gelombang sinus, pembahasan

gelombang segitiga ini lebih difokuskan pada karakter perubahan frekuensi dan proses

aritmatika biner yang membentuk gelombang segitiga.

Gambar 4.35 menunjukkan contoh hasil simulasi gelombang kotak. Supaya proses

pembandingan dengan contoh hasil sebelumnya menjadi mudah, maka rentang waktu yang

diambil pada gambar 4.35 bernilai sama, yaitu pada rentang waktu 0 µS – 250 µS, dengan

Page 61: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

45

pertimbangan bahwa bentuk gelombang segitiga dan resolusi gelombang tidak akan

berubah bila simulasi dijalankan pada rentang frekuensi audio, seperti yang telah diulas

pada sub bab pembahasan mengenai pengujian gelombang sinus.

Gambar 4.35. Hasil simulasi pembangkitan gelombang segitiga

Hasil simulasi pembangkitan gelombang segitiga ditunjukkan pada gambar 4.35.

Hasil simulasi pada gambar 4.35 tersebut tidak sesuai dengan perancangan, karena gambar

4.35 tidak menunjukkan hasil dari proses penambahan dan pengurangan yang semestinya

terjadi pada saat pembentukan gelombang segitiga. Kesalahan-kesalahan yang terjadi saat

proses pembentukan gelombang segitiga ini akan dijelaskan pada sub-bab selanjutnya.

4.3.1 Kesalahan Pada Simulasi Gelombang Segitiga Gambar 4.36 dan gambar 4.37 akan menjelaskan proses penambahan saat

pembentukan amplitude naik gelombang segitiga.

Gambar 4.36. Detail dari hasil simulasi gelombang segitiga

Page 62: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

46

Gambar 4.37 Hasil simulasi gelombang segitiga dengan nilai output dalam

heksadesimal

Gambar 4.36 dan gambar 4.37 menampilkan hasil simulasi segitiga saat konfigurasi

pembangkit gelombang belum dihubungkan dengan pembagi frekuensi, jadi clock pada

dua gambar tersebut merupakan clock bawaan simulator yang memiliki frekuensi 5MHz.

Gambar 4.36 menunjukkan hasil simulasi dari pembangkitan gelombang segitiga dengan

nilai tuning word 0000000012 atau 0116. Gambar 4.37 menunjukkan hasil simulasi yang

sama dengan gambar 4.36, namun nilai keluaran ditampilkan dalam ekivalen

heksadesimalnya.

Pada gambar 4.36 , ditampilkan port-port output yang terdiri dari out_1 (LSB)

sampai out_8(MSB) menunjukkan suatu kenaikan nilai setiap terjadi siklus clock.. Seperti

yang ditunjukkan pada gambar, nilai output berada pada nilai awal 000000002. Nilai

keluaran tersebut naik terus dengan besar langkah kenaikan sebesar 000000012. Proses

kenaikan nilai output ini sesuai dengan perancangan, yaitu saat pengontrol pembentuk

gelombang segitiga (port input segitiga) diaktifkan (bernilai satu), maka rangkaian

akumulator yang awalnya hanya mengalami proses penambahan saat pembentukan

gelombang sinus, diubah sifatnya menjadi sebuah rangkaian penambah/pengurang, seperti

yang sudah dijelaskan di bab perancangan. Namun proses penambahan ini tidak sempurna.

Gambar 4.38 akan menunjukkan masalahnya.

Gambar 4.38 Hasil simulasi gelombang segitiga saat proses penambahan

Page 63: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

47

Ditunjukkan pada gambar 4.38, bahwa sesaat sebelum memasuki waktu 26µs,

proses penambahan digital pada akumulator berjalan dengan benar. Namun, saat

akumulator sudah mencapai nilai 100000002, keluaran selanjutanya adalah bernilai

111111112. Hal ini salah. Karena semestinya proses penambahan belum selesai. Tidak ada

nilai biner 100000012 sampai 111111102 yang terjadi.

Saat nilai keluaran akumulator sudah maksimum, maka nilai sub yang tadinya

bernilai nol akan berubah otomatis menjadi bernilai satu, dan akumulator seharusnya akan

melakukan pengurangan secara otomatis, supaya terjadi proses pembentukan nilai

amplitude turun pada gelombang segitiga yang dibangkitkan. 4.39 menunjukkan proses

pengurangan yang terjadi.

Gambar 4.39 Hasil simulasi gelombang segitiga saat proses pengurangan

Pada gambar 4.39, proses yang terjadi saat sebelum titik waktu 104µs adalah proses

pengurangan dengan tuning word 000000012. Sesaat sebelum titik waktu tersebut nilai

keluaran akumulator adalah 100000002. Di titik waktu 104µs, nilai keluaran adalah

011111112. Pada saat siklus clock selanjutnya, nilai keluaran turun drastis menjadi

000000002, dan proses penambahan pun berulang.

Proses pengurangan tersebut juga salah. Karena semestinya setelah nilai

011111112, nilai keluaran berikutnya adalah 011111102. Yang terjadi justru perubahan

nilai keluaran langsung ke nilai minimumnya, 000000002, dan kembali mengulang proses

penambahan, padahal proses pengurangan belum selesai. Hal ini menyebabkan penentuan

periode dan frekuensi gelombang sulit ditentukan, karena hasil simulasi pada gambar 4.38

Page 64: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

48

dan gambar 4.39 menunjukkan bahwa satu periode gelombang segitiga belum terpenuhi

untuk nilai tuning worde 000000012.

4.3.2 Analisa Kesalahan Pada Port Sub Karena proses penambahan dan pengurangan akumulator bergantung pada

perubahan nilai pada bagian Sub, maka sub bab ini akan membahas proses perubahan nilai

pada sub tersebut.

Sesuai dengan perancangan, nilai bawaan terakhir (carry) dari rangkaian

penambah/pengurang komplemen 2 dimanfaatkan sebagai masukan Sub (dapat dilihat pada

lampiran KONFIGURASI PEMBANGKIT GELOMBANG). Seharusnya, selama

akumulator melakukan proses penambahan, nilai port sub tidak berubah dari nilai nol,

karena akumulator belum menghasilkan nilai bawaan terakhir (carry) yang akan merubah

sub dari nol menjadi satu.

Gambar 4.40 Kesalahan pada nilai sub saat proses pembentukan gelombang segitiga

Gambar 4.40 menunjukkan kesalahan yang terjadi pada port keluaran sub saat

proses pembentukan gelombang segitiga. Port keluaran out_[8..1] masih menunjukkan

proses penambahan dari 7B16 ke 7C16. Seharusnya saat masih melakukan proses

penambahan dan nilai keluaran belum maksimum menjadi FF16, port sub belum berubah

nilai dari nol menjadi satu. Namun gambar 4.40 menunjukkan bahwa nilai sub sudah

berubah-ubah nilainya saat akumulator masih melakukan penambahan.

Gambar 4.41 Perbesaran gambar dari hasil simulasi pada gambar 4.40

Page 65: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

49

Gambar 4.41 menunjukkan perbesaran gambar dari gambar 4.40. Ditunjukkan pada

gambar 4.41, bahwa nilai sub sudah berubah-ubah saat nilai keluaran mencapai nilai 7C16,

dan akumulator masih melakukan proses penambahan. Hal ini dapat dilihat dari nilai

keluaran out_[8..1] yang terus bertambah dari 7C16 menjadi 7D16 dan seterusnya. Namun

proses penambahannya tidak sempurna. Karena saat keluaran mencapai nilai 8016, keluaran

kembali menjadi 7F16, padahal seharusnya nilai keluaran setelah 8016 adalah 8116, dan terus

bertambah sampai FF16. Barulah setelah keluaran mencapai nilai FF16, akumulator

melakukan proses pengurangan. Hasil simulasi pada gambar 4.41 menunjukkan bahwa

perlu ada pengontrolan pada bagian sub.

Perlu dicatat, bahwa gambar 4.40 merupakan hasil simulasi dari konfigurasi yang

sama dengan gambar 4.41. Hanya saja, pada gambar 4.40, port keluaran

pembagi_frekuensi belum dihubungkan pada konfigurasi.

0

20

40

60

80

100

120

140

1 22 43 64 85 106 127 148 169 190 211 232 253

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Gambar 4.40 akan memberikan representasi grafis dari gelombang segitiga yang

terbentuk.

Gambar 4.42 Representasi grafis gelombang segitiga dengan tuning word 000000102

Gambar 4.42 merupakan representasi grafis dari gelombang segitiga yang terbentuk

pada tuning word 000000012. Pada gambar 4.42 tidak terjadi proses penurunan nilai

amplitudo yang bertahap, sebaliknya justru terjadi penurunan drastis saat amplitudo

gelombang sudah mencapai nilai desimal 12810. Nilai 12810 setara dengan nilai 10000002.

Tentunya hal ini akan mempengaruhi bentuk gelombang kotak yang akan penulis jelaskan

kemudian.

Perlu dicatat, bahwa gambar 4.40 sampai gambar 4.42 merupakan hasil simulasi

ulang, dan konfigurasi pembangkit gelombang tidak diubah sedikitpun.

Page 66: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

50

4.4 Pengujian Gelombang Kotak/Segi Empat Pada dasarnya, untuk mendapatkan keluaran berupa gelombang kotak, digunakan

satu tambahan pengontrol yang hanya menyalurkan MSB dari keluaran gelombang

segitiga, seperti yang telah dipaparkan pada bab perancangan. Dengan demikian saat MSB

mencapai nilai biner 12 dalam proses penambahan akumulator, pengontrol mengambil nilai

MSB tersebut. Dan saat proses pengurangan, titik di mana nilai MSB berubah lagi menjadi

nilai biner 02, maka satu periode gelombang kotak pun tercapai. Gambar 4.43

menunjukkan hasil simulasi dari proses pembentukan gelombang kotak.

Gambar 4.43 Hasil simulasi pembentukan gelombang kotak

Gambar 4.43 menunjukkan hasil dari simulasi pembentukan gelombang kotak.

Rentang waktu yang diambil adalah sama besarnya dengan rentang waktu yang diambil

pada hasil simulasi pembentukan gelombang sinus pada gambar 4.23, yaitu dari 0s sampai

250µs.

Dalam gambar 4.43 ditunjukkan bahwa nilai satu perioda gelombang kotak adalah

sebesar 50µs, yang ekuivalen dengan nilai frekuensi sebesar 20 KHz. Nilai tersebut adalah

nilai frekuensi gelombang yang sama besarnya dengan nilai frekuensi gelombang sinus

pada gambar 4.23 untuk besar langkah kenaikan dari tuning word yang sama. Dan gambar

4.44 menunjukkan hasil simulasi pembentukan gelombang kotak/segi empat untuk besar

nilai tuning word sebesar 000000102.

Page 67: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

51

Gambar 4.44 Hasil simulasi pembentukan gelombang kotak dengan tuning word sebesar

000000102.

Dari gambar 4.42, diperoleh nilai perioda satu gelombang kotak dengan besar

tuning word 000000102, dengan nilai 26µs. Nilai tersebut ekuivalen dengan nilai frekuensi

sebesar 38,46KHz. Terdapat selisih nilai frekuensi sebesar 1,5KHz dengan frekuensi

gelombang sinus pada nilai tuning word yang sama pada gambar 4.25. Tampak seperti

nilai selisih yang cukup kecil, namun sebenarnya perbedaan nilai dalam kisaran satuan

Kilo Hertz bukanlah sesuatu yang bisa diabaikan. Karena pengambilan gelombang kotak

ini berasal dari proses pembentukan gelombang segitiga yang sudah diulas sebelumnya, di

mana terjadi banyak kesalahan proses, maka penyebab kekeliruan pada pembentukan

gelombang kotak ini berada pada proses pembentukan gelombang segitiga itu sendiri.

Gambar 4.45 akan menampilkan pengaruh yang ditimbulkan dari pengulangan

simulasi terhadap pengujian gelombang kotak.

Gambar 4.45 Hasil simulasi ulang terhadap pembentukan gelombang kotak.

Page 68: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

52

Gambar 4.45 adalah hasil simulasi ulang terhadap gelombang kotak. Simulasi ulang

ini rupanya tidak menghasilkan keluaran seperti yang ditunjukkan pada gambar 4.44

maupun gambar 4.43. Ditunjukkan pada gambar 4.43 bahwa bagian MSB hanya bernilai

satu untuk selang waktu yang sangat kecil, sementara nilai nol pada keluaran MSB berada

pada selang waktu yang besar. Perbandingan ini tidak sama dengan seperti yang

ditunjukkan pada gambar 4.41 atau 4.42.

Gambar 4.45 sangat berhubungan dengan gambar grafik segitiga pada gambar 4.42,

dimana pada gambar 4.40 tersebut ditunjukkan bahwa nilai sesaat setelah MSB mencapai

nilai 10000002 atau setara dengan desimal 12810, seluruh nilai keluaran turun drastis dan

sistem pembangkit gelombang kembali melakukan proses penambahan. Hal ini berarti

bahwa gelombang kotak tidak terbentuk dengan baik karena MSB keluaran hanya berada

pada nilai satu untuk waktu yang sangat sempit.

4.5 Pengujian Blok DAC dan Pengubahan Amplitudo Gelombang. Blok DAC merupakan ujung blok terakhir dari rangkaian pembangkit gelombang,

yang berfungsi menampilkan bentuk analog dari gelombang yang ditampilkan. Pada blok

ini pulalah semestinya proses pengubahan amplitudo secara analog dilakukan. Namun blok

DAC tidak berhasil dibuat sehingga penampilan bentuk analog dari gelombang yang

dibangkitkan, berikut data perubahan amplitudo dari gelombang tidak dapat diulas .

Page 69: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

53

BAB V

KESIMPULAN DAN SARAN

Setelah melakukan perancangan dan pengujian terhadap aplikasi pembangkin

gelombang, maka dapat diambil beberapa kesimpulan yang diambil, dan berikut beberapa

saran yang dapat dipertimbangkan untuk dapat menyempurnakan perancangan lebih baik

5.1 Kesimpulan 1. Penelitian hanya berjalan sampai pada tahap simulasi. Penampilan gelombang

analog tidak dapat dilakukan karena blok DAC belum dibuat.

2. Simulasi dari teknik DDS untuk pembangkitan gelombang sinus berhasil dilakukan

dengan baik, dan sudah sesuai perancangan

3. Simulasi dari teknik DDS untuk pembangkitan gelombang segitiga tidak berhasil,

dan tidak sesuai perancangan.

4. Pembangkitan gelombang kotak juga tidak berhasil, karena untuk membangkitkan

gelombang kotak yang baik, diperlukan pembangkitan gelombang segitiga yang

baik pula.

5. Langkah pengubahan frekuensi pada gelombang sinus telah berhasil dan berjalan

sesuai perancangan. Sedangkan pada simulasi gelombang segitiga dan kotak, nilai

biner output pembentuk gelombang sudah menunjukkan kesalahan bahkan saat

frekuensi tuning word belum diubah, sehingga langkah perubahan frekuensi pada

pembentukan gelombang segitiga dan kotak tidak dapat dilakukan dan diamati.

6. Langkah pengubahan amplitudo secara analog tidak dapat dilakukan karena blok

DAC pada konfigurasi pembangkit gelombang belum dibuat.

7. Pengembangan pengetahuan mengenai pembangkitan sinyal secara digital seperti

yang dipaparkan dalam tujuan dan manfaat penelitian ini, belum dapat dicapai

sepenuhnya, karena pembangkitan gelombang segitiga dan kotak mengalami

kegagalan.

5.2 Saran 1. Langkah perancangan pembangkitan bentuk gelombang segitiga perlu ditinjau

ulang dan diperbaiki.

Page 70: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

54

2. Untuk menghasilkan operasi pembangkitan gelombang segitiga yang baik, perlu

adanya suatu rangkaian aritmatika yang sedikit lebih baik dari rangkaian sederhana

penambah/pengurang komplemen 2, atau suatu tambahan pengontrol untuk

menangani nilai sub pada rangkaian penambah/pengurang komplemen 2.

3. Untuk memberikan rentang perubahan frekuensi yang lebih besar dan resolusi yang

lebih baik pada gelombang, maka lebar data perlu diperbesar lagi menjadi lebih

dari 8 bit.

4. Blok DAC harus dibangun supaya keluaran analog dari gelombang yang

dibangkitkan dapat diamati karakteristiknya. Baik karakteristik yang berhubungan

dengan pengubahan frekuensi, maupun karakteristik yang berhubungan dengan

pengubahan amplitudo gelombang.

Page 71: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

55

DAFTAR PUSTAKA

[1] Daniels, Jerry., Digital Design from Zero to One. John Wiley & Sons : United States

of America. 1996

[2] Hamblem, James O,. Michael D. Furman, Rapid Prototyping of Digital Systems: A

Tutorial Approach. Kluwer Academic Publisher : United States of America. 2001

[3] Albert Paul Malvino, Ph. D, Prinsip-prinsip dan Penerapan Digital. Erlangga 1994

[4] Analog Devices. Inc. A Technical Tutorial on Digital Signal Synthesis, Analog

Devices, Inc, 1999

[5] Osicom Technologies. Inc, Direct Digital Frequency Synthesis,

http://www.osicom.com.

[6] http://www.edaboard.com

[7] http://en.wikipedia.org/wiki/Direct_digital_synthesis.htm

[8] http://mobiledevdesign.com/standards_regulations/radio_direct_digital_synthesis/

[9] http://digilib.itb.ac.id/gdl.php?mod=browse&op=read&id=itb-proc-ee-1999-Iwan-

direc

[10] Datasheet DAC0832

[11] Datasheet LF351

Page 72: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L1

LAMPIRAN KONFIGURASI PEMBANGKIT GELOMBANG

DA

C

Page 73: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L2

LAMPIRAN HASIL SIMULASI PEMBANGKIT GELOMBANG PADA

SIMULATOR ALTERA MAX+PLUS II

1. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz. step: 0000 00012 2. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0000 00102

Page 74: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L2

3. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0000 01002 4. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0001 00002

Page 75: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L2

5. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0001 00002 6. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0010 00002

Page 76: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L2

7. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0111 11112 8. Bentuk gelombang sinus. Frekeuensi clock dasar= 19,531 KHz step = 0000 11112

Page 77: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L2

9. Bentuk gelombang segitiga, proses naik. Frekuensi clock dasar = 19,531 KHz step = 0000 00012 10. Bentuk gelombang segitiga, proses turun. Frekuensi clock dasar = 19,531KHz step = 0000 00012

Page 78: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L3

LAMPIRAN GRAFIK GELOMBANG PADA BEBERAPA NILAI TUNING

WORD

1. Grafik gelombang sinus yang terbentuk pada tuning word 000000012

0

50

100

150

200

250

300

1 22 43 64 85 106 127 148 169 190 211 232 253

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

2. Grafik gelombang sinus yang terbentuk pada tuning word 000000102

0

50

100

150

200

250

300

1 12 23 34 45 56 67 78 89 100 111 122 133

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Page 79: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L3

3. Grafik gelombang sinus yang terbentuk pada tuning word 000010002

0

50

100

150

200

250

300

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

4. Grafik gelombang sinus yang terbentuk pada tuning word 000100002

0

50

100

150

200

250

300

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Page 80: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L3

5. Grafik gelombang sinus yang terbentuk pada tuning word 001000002

0

50

100

150

200

250

300

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

6. Grafik gelombang sinus yang terbentuk pada tuning word 100000002

0

50

100

150

200

250

300

1 2 3 4 5 6 7 8

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Page 81: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L3

7. Grafik gelombang segitiga yang terbentuk pada tuning word 000000012

0

20

40

60

80

100

120

140

1 22 43 64 85 106 127 148 169 190 211 232 253

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

8. Grafik gelombang segitiga yang terbentuk pada tuning word 000010002.

0

20

40

60

80

100

120

140

1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Page 82: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L3

9. Grafik gelombang segitiga pada tuning word 000100002.

0

20

40

60

80

100

120

140

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

10. Grafik gelombang segitiga pada tuning word 001000002

0

20

40

60

80

100

120

140

160

1 2 3 4 5 6 7 8 9 10

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Page 83: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L3

11. Grafik gelombang segitiga pada tuning word 100000002.

0

20

40

60

80

100

120

140

160

180

1 2 3 4 5 6 7 8 9

siklus clock

ampl

itudo

des

imal

gel

omba

ng

Series1

Page 84: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L4

LAMPIRAN CONTOH TABEL UNTUK PEMBANGKITAN

GELOMBANG SINUS PADA TUNING WORD 000000012

CLOCK OUTPUT(desimal) CLOCK OUTPUT(desimal) 1 128 35 218 2 128 36 220 3 128 37 222 4 131 38 224 5 134 39 226 6 137 40 228 7 140 41 230 8 143 42 232 9 146 43 234 10 149 44 236 11 152 45 237 12 156 46 239 13 159 47 240 14 162 48 242 15 165 49 243 16 168 50 245 17 171 51 246 18 174 52 247 19 176 53 248 20 179 54 249 21 182 55 250 22 185 56 251 23 188 57 252 24 191 58 252 25 193 59 253 26 196 60 254 27 199 61 254 28 201 62 255 29 204 63 255 30 206 64 255 31 209 65 255 32 211 66 255 33 213 67 255 34 216 68 255 CATATAN: Data diambil dari pengamatan pada simulator terhadap perubahan nilai keluaran pembangkit gelombang per siklus clock. Untuk contoh tabel pembentukan gelombang sinus pada tuning word 000000012 ini, data diambil sampai siklus clock ke -256 (untuk satu periode gelombang), untuk kemudian diolah menjadi grafik.

Page 85: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

LAMPIRAN LIST PROGRAM PER MODUL/SUB PROYEK

================================= Register Input ================================= library IEEE; use IEEE.STD_LOGIC_1164.all; entity register_input is port(in1,in2,in3,in4,in5,in6,in7,in8,rst,clk : in std_logic; --mendeklarasikan port-port ot1,ot2,ot3,ot4,ot5,ot6,ot7,ot8 : out std_logic); input-output end register_input; architecture jalan of register_input is begin process (in1,in2,in3,in4,in5,in6,in7,in8,rst,clk) begin wait until clk'event and clk='1'; if rst = '1' then ot1 <= '0'; ot2 <= '0'; ot3 <= '0'; ot4 <= '0'; ot5 <= '0'; ot6 <= '0'; ot7 <= '0'; ot8 <= '0'; elsif rst = '0' then ot1 <= in1; ot2 <= in2; ot3 <= in3; ot4 <= in4; ot5 <= in5; ot6 <= in6; ot7 <= in7; ot8 <= in8; end if; end process; end jalan; =========================== Full – Addder =========================== library ieee; use ieee.std_logic_1164.all; entity full_adder is port ( a, b, c: in std_logic; d, e: out std_logic); end full_adder; architecture jalan of full_adder is

Page 86: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

begin d <= (a and b) or ((a xor b) and c); e <= c xor (a xor b); end jalan; ========================= Register Adder ========================= library IEEE; use IEEE.STD_LOGIC_1164.all; entity register_adder is port(in1,in2,in3,in4,in5,in6,in7,in8,rst,clk : in std_logic; ot1,ot2,ot3,ot4,ot5,ot6,ot7,ot8 : out std_logic); end register_adder; architecture jalan of register_adder is begin process (in1,in2,in3,in4,in5,in6,in7,in8,rst,clk) begin wait until clk'event and clk='1'; if rst = '1' then ot1 <= '0'; ot2 <= '0'; ot3 <= '0'; ot4 <= '0'; ot5 <= '0'; ot6 <= '0'; ot7 <= '0'; ot8 <= '0'; elsif rst = '0' then ot1 <= in1; ot2 <= in2; ot3 <= in3; ot4 <= in4; ot5 <= in5; ot6 <= in6; ot7 <= in7; ot8 <= in8; end if; end process; end jalan; ================== Pengontrol Segitiga ================== library ieee; use ieee.std_logic_1164.all; entity pengontrol_segitiga is port (control, clk, i1, i2, i3, i4, i5, i6, i7, i8: in std_logic; b1, b2, b3, b4, b5, b6, b7, b8, c1, c2, c3, c4, c5, c6, c7, c8: out std_logic); end pengontrol_segitiga;

Page 87: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

architecture jalan of pengontrol_segitiga is begin process (clk, i1, i2, i3, i4, i5, i6, i7, i8, control) begin wait until clk'event and clk='1'; if (control='0') then b1 <= i1; b2 <= i2; b3 <= i3; b4 <= i4; b5 <= i5; b6 <= i6; b7 <= i7; b8 <= i8; c1 <='0'; c2 <='0'; c3 <='0'; c4 <='0'; c5 <='0'; c6 <='0'; c7 <='0'; c8 <='0'; elsif (control='1') then b1 <='0'; b2 <='0'; b3 <='0'; b4 <='0'; b5 <='0'; b6 <='0'; b7 <='0'; b8 <='0'; c1 <=i1; c2 <=i2; c3 <=i3; c4 <=i4; c5 <=i5; c6 <=i6; c7 <=i7; c8 <=i8; end if; end process; end jalan; ====================== Pengontrol Gelombang Segi Empat ===================== library ieee; use ieee.std_logic_1164.all; entity pengontrol_segiempat is port (control, clk, i1, i2, i3, i4, i5, i6, i7, i8: in std_logic; b1, b2, b3, b4, b5, b6, b7, b8: out std_logic); end pengontrol_segiempat;

Page 88: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

architecture jalan of pengontrol_segiempat is begin process (clk, i1, i2, i3, i4, i5, i6, i7, i8, control) begin wait until clk'event and clk='1'; if (control='0') then b1 <= i1; b2 <= i2; b3 <= i3; b4 <= i4; b5 <= i5; b6 <= i6; b7 <= i7; b8 <= i8; elsif (control='1') then b1 <='0'; b2 <='0'; b3 <='0'; b4 <='0'; b5 <='0'; b6 <='0'; b7 <='0'; b8 <=i8; end if; end process; end jalan; ================= pengontrol output ================= library ieee; use ieee.std_logic_1164.all; entity kontrol_reg_output is port (control, clk, i1, i2, i3, i4, i5, i6, i7, i8, l1, l2, l3, l4, l5, l6, l7, l8: in std_logic; o1, o2, o3, o4, o5, o6, o7, o8: out std_logic); end kontrol_reg_output; architecture jalan of kontrol_reg_output is begin process begin wait until clk'event and clk='1'; if control='0' then o1 <= i1; o2 <= i2; o3 <= i3; o4 <= i4; o5 <= i5; o6 <= i6; o7 <= i7; o8 <= i8;

Page 89: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

elsif control='1' then o1 <= l1; o2 <= l2; o3 <= l3; o4 <= l4; o5 <= l5; o6 <= l6; o7 <= l7; o8 <= l8; end if; end process; end jalan; ================= register output ================ library IEEE; use IEEE.STD_LOGIC_1164.all; entity register_output is port(in1,in2,in3,in4,in5,in6,in7,in8,rst,clk : in std_logic; ot1,ot2,ot3,ot4,ot5,ot6,ot7,ot8 : out std_logic); end register_output; architecture jalan of register_output is begin process (in1,in2,in3,in4,in5,in6,in7,in8,rst,clk) begin wait until clk'event and clk='1'; if rst = '1' then ot1 <= '0'; ot2 <= '0'; ot3 <= '0'; ot4 <= '0'; ot5 <= '0'; ot6 <= '0'; ot7 <= '0'; ot8 <= '0'; elsif rst = '0' then ot1 <= in1; ot2 <= in2; ot3 <= in3; ot4 <= in4; ot5 <= in5; ot6 <= in6; ot7 <= in7; ot8 <= in8; end if; end process; end jalan;

Page 90: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

============== JK Flip-Flop ============== library ieee; use ieee.std_logic_1164.all; entity JK_FF is port ( clock: in std_logic; J, K: in std_logic; reset: in std_logic; Q, Qbar: out std_logic ); end JK_FF; architecture behv of JK_FF is signal state: std_logic; signal input: std_logic_vector(1 downto 0); begin input <= J & K; p: process(clock, reset) is begin if (reset='1') then state <= '0'; elsif (rising_edge(clock)) then -- compare to the truth table case (input) is when "11" => state <= not state; when "10" => state <= '1'; when "01" => state <= '0'; when others => null; end case; end if; end process; Q <= state; Qbar <= not state; end behv;

Page 91: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

===================== D – Flip – Flop ===================== library ieee; use ieee.std_logic_1164.all; entity d_flip_flop is port (clk, d: in std_logic; d_out: out std_logic); end d_flip_flop; architecture jalan of d_flip_flop is begin process (d, clk) begin wait until clk'event and clk='1'; d_out<=d; end process; end; ======================= gerbang xor 8 bit ======================= library ieee; use ieee.std_logic_1164.all; entity gerbangxor8bit is port (a1, a2, a3, a4, a5, a6, a7, a8, b1, b2, b3, b4, b5, b6, b7, b8 : in std_logic; c1, c2, c3, c4, c5, c6, c7, c8 : out std_logic); end gerbangxor8bit; architecture jalan of gerbangxor8bit is begin c1<= a1 xor b1; c2<= a2 xor b2; c3<= a3 xor b3; c4<= a4 xor b4; c5<= a5 xor b5; c6<= a6 xor b6; c7<= a7 xor b7; c8<= a8 xor b8; end jalan; ============================== pengontrol sinus(gerbang and normal 2 masukan) ============================= library ieee; use ieee.std_logic_1164.all; entity pengontrol_sinus is port (sin, sub: in std_logic; ot: out std_logic); end pengontrol_sinus; architecture jalan of pengontrol_sinus is

Page 92: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

begin ot <= sin and sub; end jalan; ========================== ROM Look Up Table ========================== library ieee; use ieee.std_logic_1164.all; entity sinelut is port (clk, si1, si2, si3, si4, si5, si6, si7, si8: in std_logic; so1, so2, so3, so4, so5, so6, so7, so8: out std_logic); end sinelut; architecture cari of sinelut is begin process (clk,si3, si2, si3, si4, si5, si6, si7, si8) begin wait until clk'event and clk='1'; if si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 0 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 80 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 1 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 83 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 2 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 86 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 3 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 89 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 4 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 8C elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 5 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 8F elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 6 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa 92 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 7 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 95 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 8 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa 98 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 9 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 9C elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 10 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 9F elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 11 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa A2 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 12 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa A5 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 13 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa A8 elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 14 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa AB elsif si1='0'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 15 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa AE elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 16 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa B0

Page 93: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 17 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa B3 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 18 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa B6 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 19 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa B9 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 20 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa BC elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 21 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa BF elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 22 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa C1 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 23 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa C4 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 24 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa C7 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 25 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa C9 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 26 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa CC elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 27 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa CE elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 28 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa D1 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 29 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa D3 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 30 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa D5 elsif si1='0'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 31 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa D8 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 32 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa DA elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 33 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa DC elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 34 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa DE elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 35 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa E0 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 36 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa E2 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 37 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa E4 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 38 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa E6 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 39 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa E8 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 40 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa EA elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 41 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa EC elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 42 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa ED elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 43 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa EF elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 44

Page 94: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa F0 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 45 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa F2 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 46 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa F3 elsif si1='0'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 47 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa F5 elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 48 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa F6 elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 49 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa F7 elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 50 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa F8 elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 51 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa F9 elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 52 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa FA elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 53 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa FB elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 54 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa FC elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 55 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa FC elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 56 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa FD elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 57 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa FE elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 58 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa FE elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 59 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 60 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 61 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 62 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 63 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 64 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 65 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 66 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 67 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 68 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 69 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa FF elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 70 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa FE elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 71 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa FE

Page 95: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 72 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa FD elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 73 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa FC elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 74 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa FC elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 75 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa FB elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 76 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa FA elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 77 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa F9 elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 78 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa F8 elsif si1='0'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 79 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa F7 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 80 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa F6 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 81 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa F5 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 82 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa F3 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 83 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa F2 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 84 so1<='1'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa F0 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 85 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa EF elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 86 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa ED elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 87 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa EC elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 88 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa EA elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 89 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa E8 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 90 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa E6 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 91 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa E4 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 92 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa E2 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 93 so1<='1'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa E0 elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 94 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa DE elsif si1='0'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 95 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa DC elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 96 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa DA elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 97 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa DB elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 98 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa D5 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 99

Page 96: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa D3 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 100 so1<='1'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa D1 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 101 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa CE elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 102 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa CC elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 103 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa C9 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 104 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa C7 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 105 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa C4 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 106 so1<='1'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa C1 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 107 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa BF elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 108 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa BC elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 109 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa B9 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 110 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa B6 elsif si1='0'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 111 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa B3 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 112 so1<='1'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa B0 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 113 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa AE elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 114 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa AB elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 115 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa A8 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 116 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa A5 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 117 so1<='1'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa A2 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 118 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 9F elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 119 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 9C elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 120 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa 98 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 121 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 95 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 122 so1<='1'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa 92 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 123 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 8F elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 124 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 8C elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 125 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 89 elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 126 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 86

Page 97: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

elsif si1='0'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 12 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 83 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 128 so1<='1'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 80 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 129 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 7C elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 130 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 79 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 131 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 76 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 132 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 73 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 133 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 70 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 134 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 6D elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 135 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 6A elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 136 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 67 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 137 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 63 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 138 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 60 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 139 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 5D elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 140 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 5A elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 141 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 57 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 142 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa 54 elsif si1='1'and si2='0'and si3='0'and si4='0' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 143 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 51 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 144 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 4F elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 145 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 4C elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 146 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 49 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 147 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 46 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 148 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 43 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 149 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 40 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 150 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa 3E elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 151 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa 3B elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 152 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa 38 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 153 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 36 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 154

Page 98: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 33 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 155 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 31 elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 156 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa 2E elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 157 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 2C elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 158 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 2A elsif si1='1'and si2='0'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 159 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 27 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 160 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 25 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 161 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 23 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 162 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 21 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 163 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 1F elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 164 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 1D elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 165 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa 1B elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 166 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 19 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 167 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 17 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 168 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 15 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 169 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 13 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 170 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa 12 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 171 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 10 elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 172 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 0F elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 173 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 0D elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 174 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 0C elsif si1='1'and si2='0'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 175 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 0A elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 176 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 09 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 177 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa 08 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 178 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 07 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 179 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 06 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 180 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 05 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 181 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa 04

Page 99: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 182 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 03 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 183 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 03 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 184 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa 02 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 185 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 01 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 186 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 01 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 187 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 188 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 189 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 190 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='0'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 191 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 192 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 193 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 194 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 195 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 196 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 197 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 00 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 198 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 01 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 199 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 01 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 200 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa 02 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 201 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 03 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 202 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 03 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 203 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa 04 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 204 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 05 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 205 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 06 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 206 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 07 elsif si1='1'and si2='1'and si3='0'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 207 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa 08 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 208 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 09 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 209

Page 100: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 0A elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 210 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 0C elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 211 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 0D elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 212 so1<='0'; so2<='0'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 0F elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 213 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 10 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 214 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='0'; --hexa 12 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 215 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 13 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 216 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 15 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 217 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 17 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 218 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 19 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 219 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa 1B elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 220 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 1D elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 221 so1<='0'; so2<='0'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 1F elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 222 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 21 elsif si1='1'and si2='1'and si3='0'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 223 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 23 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 224 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='0'; so8<='1'; --hexa 25 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 225 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 27 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 226 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 2A elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 227 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 2C elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 228 so1<='0'; so2<='0'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa 2E elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 229 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 31 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 230 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 33 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 231 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 36 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 232 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='0'; --hexa 38 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 233 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='1'; --hexa 3B elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 234 so1<='0'; so2<='0'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='1'; so8<='0'; --hexa 3E elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 235 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 40 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 236 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 43

Page 101: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Lampiran L5

elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 237 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 46 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 238 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 49 elsif si1='1'and si2='1'and si3='1'and si4='0' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 239 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 4C elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='0' then --alamat 240 so1<='0'; so2<='1'; so3<='0'; so4<='0'; so5<='1'; so6<='1'; so7<='1'; so8<='1'; --hexa 4F elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='0'and si8='1' then --alamat 241 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='0'; so7<='0'; so8<='1'; --hexa 51 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='0' then --alamat 242 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='0'; so8<='0'; --hexa 54 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='0'and si7='1'and si8='1' then --alamat 243 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 57 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='0' then --alamat 244 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 5A elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='0'and si8='1' then --alamat 245 so1<='0'; so2<='1'; so3<='0'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 5D elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='0' then --alamat 246 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='0'; so8<='0'; --hexa 60 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='0'and si6='1'and si7='1'and si8='1' then --alamat 247 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='0'; so7<='1'; so8<='1'; --hexa 63 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='0' then --alamat 248 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 67 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='0'and si8='1' then --alamat 249 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='0'; so7<='1'; so8<='0'; --hexa 6A elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='0' then --alamat 250 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='1'; so6<='1'; so7<='0'; so8<='1'; --hexa 6D elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='0'and si7='1'and si8='1' then --alamat 251 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 70 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='0' then --alamat 252 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='0'; so6<='1'; so7<='1'; so8<='1'; --hexa 73 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='0'and si8='1' then --alamat 253 so1<='0'; so2<='1'; so3<='1'; so4<='0'; so5<='0'; so6<='1'; so7<='1'; so8<='0'; --hexa 76 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='0' then --alamat 254 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='0'; so7<='0'; so8<='1'; --hexa 79 elsif si1='1'and si2='1'and si3='1'and si4='1' and si5='1'and si6='1'and si7='1'and si8='1' then --alamat 255 so1<='0'; so2<='1'; so3<='1'; so4<='1'; so5<='1'; so6<='1'; so7<='0'; so8<='0'; --hexa 7C end if; end process; end cari;

Page 102: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

TL/H/5608

DA

C0830/D

AC

0831/D

AC

0832

8-B

itm

PC

om

patib

le,D

ouble

-Buffe

red

Dto

AC

onverte

rs

February 1995

DAC0830/DAC0831/DAC0832 8-Bit mPCompatible, Double-Buffered D to A Converters

General DescriptionThe DAC0830 is an advanced CMOS/Si-Cr 8-bit multiplying

DAC designed to interface directly with the 8080, 8048,

8085, Z80É, and other popular microprocessors. A deposit-

ed silicon-chromium R-2R resistor ladder network divides

the reference current and provides the circuit with excellent

temperature tracking characteristics (0.05% of Full Scale

Range maximum linearity error over temperature). The cir-

cuit uses CMOS current switches and control logic to

achieve low power consumption and low output leakage

current errors. Special circuitry provides TTL logic input volt-

age level compatibility.

Double buffering allows these DACs to output a voltage cor-

responding to one digital word while holding the next digital

word. This permits the simultaneous updating of any num-

ber of DACs.

The DAC0830 series are the 8-bit members of a family of

microprocessor-compatible DACs (MICRO-DACTM). For ap-

plications demanding higher resolution, the DAC1000 series

(10-bits) and the DAC1208 and DAC1230 (12-bits) are avail-

able alternatives.

BI-FETTM and MICRO-DACTM are trademarks of National Semiconductor Corporation.

Z80É is a registered trademark of Zilog Corporation.

FeaturesY Double-buffered, single-buffered or flow-through digital

data inputsY Easy interchange and pin-compatible with 12-bit

DAC1230 seriesY Direct interface to all popular microprocessorsY Linearity specified with zero and full scale adjust onlyÐ

NOT BEST STRAIGHT LINE FIT.Y Works with g10V reference-full 4-quadrant

multiplicationY Can be used in the voltage switching modeY Logic inputs which meet TTL voltage level specs (1.4V

logic threshold)Y Operates ‘‘STAND ALONE’’ (without mP) if desiredY Available in 20-pin small-outline or molded chip carrier

package

Key SpecificationsY Current settling time 1 msY Resolution 8 bitsY Linearity 8, 9, or 10 bits

(guaranteed over temp.)Y Gain Tempco 0.0002% FS/§CY Low power dissipation 20 mWY Single power supply 5 to 15 VDC

Typical Application

*Allows easy upgrade to 12-bit DAC1230,

See application hints

TL/H/5608–1

Connection Diagrams (Top Views)

Dual-In-Line and

Small-Outline Packages

²This is necessary for the

12-bit DAC1230 series to

permit interchanging from

an 8-bit to a 12-bit DAC

with No PC board changes

and no software changes,

See applications section.

TL/H/5608–21

Molded Chip Carrier Package

TL/H/5608–22

C1995 National Semiconductor Corporation RRD-B30M115/Printed in U. S. A.

Page 103: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Absolute Maximum Ratings (Notes 1 & 2)

If Military/Aerospace specified devices are required,

please contact the National Semiconductor Sales

Office/Distributors for availability and specifications.

Supply Voltage (VCC) 17 VDC

Voltage at Any Digital Input VCC to GND

Voltage at VREF Input g25V

Storage Temperature Range b65§C to a150§CPackage Dissipation

at TAe25§C (Note 3) 500 mW

DC Voltage Applied to

IOUT1 or IOUT2 (Note 4) b100 mV to VCC

ESD Susceptability (Note 14) 800V

Lead Temperature (soldering, 10 sec.)

Dual-In-Line Package (plastic) 260§CDual-In-Line Package (ceramic) 300§CSurface Mount Package

Vapor Phase (60 sec.) 215§CInfrared (15 sec.) 220§C

Operating ConditionsTemperature Range TMINsTAsTMAX

Part numbers with ‘LCN’ suffix 0§C to a70§CPart numbers with ‘LCWM’ suffix 0§C to a70§CPart numbers with ‘LCV’ suffix 0§C to a70§CPart numbers with ‘LCJ’ suffix b40§C to a85§CPart numbers with ‘LJ’ suffix b55§C to a125§C

Voltage at Any Digital Input VCC to GND

Electrical Characteristics VREFe10.000 VDC unless otherwise noted. Boldface limits apply over tempera-

ture, TMINsTAsTMAX. For all other limits TAe25§C.

VCC e 4.75 VDCVCC e 5 VDC g5%

VCC e 15.75 VDCVCC e 12 VDC g5%

Parameter ConditionsSee to 15 VDC g5% Limit

NoteTyp

TestedDesign Limit

Units

(Note 12)Limit

(Note 6)(Note 5)

CONVERTER CHARACTERISTICS

Resolution 8 8 8 bits

Linearity Error Max Zero and full scale adjusted 4, 8b10VsVREFsa10V

DAC0830LJ & LCJ 0.05 0.05 % FSR

DAC0832LJ & LCJ 0.2 0.2 % FSR

DAC0830LCN, LCWM & LCV 0.05 0.05 % FSR

DAC0831LCN 0.1 0.1 % FSR

DAC0832LCN, LCWM & LCV 0.2 0.2 % FSR

Differential Nonlinearity Zero and full scale adjusted 4, 8

Max b10VsVREFsa10V

DAC0830LJ & LCJ 0.1 0.1 % FSR

DAC0832LJ & LCJ 0.4 0.4 % FSR

DAC0830LCN, LCWM & LCV 0.1 0.1 % FSR

DAC0831LCN 0.2 0.2 % FSR

DAC0832LCN, LCWM & LCV 0.4 0.4 % FSR

Monotonicity b10VsVREF LJ & LCJ 4 8 8 bitssa10V LCN, LCWM & LCV 8 8 bits

Gain Error Max Using Internal Rfb 7g0.2 g1 g1 % FS

b10VsVREFsa10V

Gain Error Tempco Max Using internal Rfb 0.0002 0.0006%

FS/§CPower Supply Rejection All digital inputs latched high

VCCe14.5V to 15.5V 0.0002 0.0025 %

11.5V to 12.5V 0.0006 FSR/V

4.5V to 5.5V 0.013 0.015

Reference Input Max 15 20 20 kX

Min 15 10 10 kX

Output Feedthrough Error VREFe20 Vp-p, fe100 kHz3 mVp-p

All data inputs latched low

2

Page 104: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Electrical Characteristics VREFe10.000 VDC unless otherwise noted. Boldface limits apply over tempera-

ture, TMINsTAsTMAX. For all other limits TAe25§C. (Continued)

VCC e 4.75 VDCVCC e 5 VDC g5%

VCC e 15.75 VDCVCC e 12 VDC g5%

Parameter ConditionsSee to 15 VDC g5% Limit

NoteTyp

TestedDesign Limit

Units

(Note 12)Limit

(Note 6)(Note 5)

CONVERTER CHARACTERISTICS (Continued)

Output Leakage IOUT1 All data inputs LJ & LCJ 10 100 100nA

Current Max latched low LCN, LCWM & LCV 50 100

IOUT2 All data inputs LJ & LCJ 100 100nA

latched high LCN, LCWM & LCV 50 100

Output IOUT1 All data inputs 45pF

Capacitance IOUT2 latched low 115

IOUT1 All data inputs 130pF

IOUT2 latched high 30

DIGITAL AND DC CHARACTERISTICS

Digital Input Max Logic Low LJ 4.75V 0.6

Voltages LJ 15.75V 0.8

LCJ 4.75V 0.7 VDC

LCJ 15.75V 0.8

LCN, LCWM, LCV 0.95 0.8

Min Logic High LJ & LCJ 2.0 2.0VDCLCN, LCWM, LCV 1.9 2.0

Digital Input Max Digital inputs k0.8V

Currents LJ & LCJ b50 b200 b200 mA

LCN, LCWM, LCV b160 b200 mA

Digital inputsl2.0V

LJ & LCJ 0.1 a10 a10 mA

LCN, LCWM, LCV a8 a10

Supply Current Max LJ & LCJ 1.2 3.5 3.5mA

Drain LCN, LCWM, LCV 1.7 2.0

3

Page 105: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Electrical Characteristics VREFe10.000 VDC unless otherwise noted. Boldface limits apply over tempera-

ture, TMINsTAsTMAX. For all other limits TAe25§C. (Continued)

VCCe15.75 VDCVCCe12 VDCg5%

VCCe4.75 VDCVCCe5 VDC

Seeto 15 VDC g5% g5%

LimitSymbol Parameter Conditions

NoteTyp

Tested DesignTyp

Tested Design Units

(Note 12)Limit Limit

(Note 12)Limit Limit

(Note 5) (Note 6) (Note 5) (Note 6)

AC CHARACTERISTICS

ts Current Setting VILe0V, VIHe5V1.0 1.0 ms

Time

tW Write and XFER VILe0V, VIHe5V 11 100 250 375 600

Pulse Width Min 9 320 320 900 900

tDS Data Setup Time VILe0V, VIHe5V9

100 250 375 600

Min 320 320 900 900

tDH Data Hold Time VILe0V, VIHe5V9

30 50ns

Min 30 50

tCS Control Setup Time VILe0V, VIHe5V9

110 250 600 900

Min 320 320 1100 1100

tCH Control Hold Time VILe0V, VIHe5V9 0

010 0

0

Min 0 0

Note 1: Absolute Maximum Ratings indicate limits beyond which damage to the device may occur. DC and AC electrical specifications do not apply when operating

the device beyond its specified operating conditions.

Note 2: All voltages are measured with respect to GND, unless otherwise specified.

Note 3: The maximum power dissipation must be derated at elevated temperatures and is dictated by TJMAX, iJA, and the ambient temperature, TA. The maximum

allowable power dissipation at any temperature is PD e (TJMAX b TA)/iJA or the number given in the Absolute Maximum Ratings, whichever is lower. For this

device, TJMAX e 125§C (plastic) or 150§C (ceramic), and the typical junction-to-ambient thermal resistance of the J package when board mounted is 80§C/W. For

the N package, this number increases to 100§C/W and for the V package this number is 120§C/W.

Note 4: For current switching applications, both IOUT1 and IOUT2 must go to ground or the ‘‘Virtual Ground’’ of an operational amplifier. The linearity error is

degraded by approximately VOS d VREF. For example, if VREF e 10V then a 1 mV offset, VOS, on IOUT1 or IOUT2 will introduce an additional 0.01% linearity error.

Note 5: Tested limits are guaranteed to National’s AOQL (Average Outgoing Quality Level).

Note 6: Guaranteed, but not 100% production tested. These limits are not used to calculate outgoing quality levels.

Note 7: Guaranteed at VREFeg10 VDC and VREFeg1 VDC.

Note 8: The unit ‘‘FSR’’ stands for ‘‘Full Scale Range.’’ ‘‘Linearity Error’’ and ‘‘Power Supply Rejection’’ specs are based on this unit to eliminate dependence on a

particular VREF value and to indicate the true performance of the part. The ‘‘Linearity Error’’ specification of the DAC0830 is ‘‘0.05% of FSR (MAX)’’. This

guarantees that after performing a zero and full scale adjustment (see Sections 2.5 and 2.6), the plot of the 256 analog voltage outputs will each be within

0.05%cVREF of a straight line which passes through zero and full scale.

Note 9: Boldface tested limits apply to the LJ and LCJ suffix parts only.

Note 10: A 100nA leakage current with Rfbe20k and VREFe10V corresponds to a zero error of (100c10b9c20c103)c100/10 which is 0.02% of FS.

Note 11: The entire write pulse must occur within the valid data interval for the specified tW, tDS, tDH, and tS to apply.

Note 12: Typicals are at 25§C and represent most likely parametric norm.

Note 13: Human body model, 100 pF discharged through a 1.5 kX resistor.

4

Page 106: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Switching Waveform

TL/H/5608–2

Definition of Package Pinouts

Control Signals (All control signals level actuated)

CS: Chip Select (active low). The CS in combina-

tion with ILE will enable WR1.

ILE: Input Latch Enable (active high). The ILE in

combination with CS enables WR1.

WR1: Write 1. The active low WR1 is used to load the

digital input data bits (DI) into the input latch.

The data in the input latch is latched when WR1is high. To update the input latchÐCS and WR1must be low while ILE is high.

WR2: Write 2 (active low). This signal, in combination

with XFER, causes the 8-bit data which is avail-

able in the input latch to transfer to the DAC

register.

XFER: Transfer control signal (active low). The

XFER will enable WR2.

Other Pin Functions

DI0-DI7: Digital Inputs. DI0 is the least significant bit

(LSB) and DI7 is the most significant bit (MSB).

IOUT1: DAC Current Output 1. IOUT1 is a maximum

for a digital code of all 1’s in the DAC register,

and is zero for all 0’s in DAC register.

IOUT2: DAC Current Output 2. IOUT2 is a constant

minus IOUT1, or IOUT1aIOUT2econstant (I full

scale for a fixed reference voltage).

Rfb: Feedback Resistor. The feedback resistor is

provided on the IC chip for use as the shunt

feedback resistor for the external op amp which is

used to provide an output voltage for the DAC.

This on-chip resistor should always be used (not

an external resistor) since it matches the resistors

which are used in the on-chip R-2R ladder and

tracks these resistors over temperature.

VREF: Reference Voltage Input. This input connects an

external precision voltage source to the internal R-

2R ladder. VREF can be selected over the range ofa10 to b10V. This is also the analog voltage in-

put for a 4-quadrant multiplying DAC application.

VCC: Digital Supply Voltage. This is the power supply

pin for the part. VCC can be from a5 to a15VDC.

Operation is optimum for a15VDC.

GND: The pin 10 voltage must be at the same ground

potential as IOUT1 and IOUT2 for current switching

applications. Any difference of potential (VOS pin

10) will result in a linearity change of

VOS pin 10

3VREF

For example, if VREF e 10V and pin 10 is 9mV

offset from IOUT1 and IOUT2 the linearity change

will be 0.03%.

Pin 3 can be offset g100mV with no linearity

change, but the logic input threshold will shift.

5

Page 107: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Linearity Error

TL/H/5608–3

a) End point test after

zero and fs adj.

b) Best straight line c) Shifting fs adj. to pass

best straight line test

Definition of TermsResolution: Resolution is directly related to the number of

switches or bits within the DAC. For example, the DAC0830

has 28 or 256 steps and therefore has 8-bit resolution.

Linearity Error: Linearity Error is the maximum deviation

from a straight line passing through the endpoints of theDAC transfer characteristic . It is measured after adjusting

for zero and full-scale. Linearity error is a parameter intrinsic

to the device and cannot be externally adjusted.

National’s linearity ‘‘end point test’’ (a) and the ‘‘best

straight line’’ test (b,c) used by other suppliers are illustrated

above. The ‘‘end point test’’ greatly simplifies the adjust-

ment procedure by eliminating the need for multiple itera-

tions of checking the linearity and then adjusting full scale

until the linearity is met. The ‘‘end point test’’ guarantees

that linearity is met after a single full scale adjust. (One ad-

justment vs. multiple iterations of the adjustment.) The ‘‘end

point test’’ uses a standard zero and F.S. adjustment proce-

dure and is a much more stringent test for DAC linearity.

Power Supply Sensitivity: Power supply sensitivity is a

measure of the effect of power supply changes on the DAC

full-scale output.

Settling Time: Settling time is the time required from a code

transition until the DAC output reaches within g(/2LSB of

the final output value. Full-scale settling time requires a zero

to full-scale or full-scale to zero output change.

Full-Scale Error: Full scale error is a measure of the output

error between an ideal DAC and the actual device output.

Ideally, for the DAC0830 series, full-scale is VREF b1LSB.

For VREFe10V and unipolar operation, VFULL-SCALEe

10.0000Vb39mVe9.961V. Full-scale error is adjustable to

zero.

Differential Nonlinearity: The difference between any two

consecutive codes in the transfer curve from the theoretical

1 LSB is differential nonlinearity.

Monotonic: If the output of a DAC increases for increasing

digital input code, then the DAC is monotonic. An 8-bit DAC

which is monotonic to 8 bits simply means that increasing

digital input codes will produce an increasing analog output.

TL/H/5608–4

FIGURE 1. DAC0830 Functional Diagram

6

Page 108: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Typical Performance CharacteristicsDigital Input Threshold

vs. Temperature

Digital Input Threshold

vs. VCC

Gain and Linearity Error

Variation vs. Temperature

Gain and Linearity Error

Variation vs. Supply Voltage Write Pulse Width Data Hold Time

TL/H/5608–5

DAC0830 Series Application HintsThese DAC’s are the industry’s first microprocessor com-

patible, double-buffered 8-bit multiplying D to A converters.

Double-buffering allows the utmost application flexibility

from a digital control point of view. This 20-pin device is also

pin for pin compatible (with one exception) with the

DAC1230, a 12-bit MICRO-DAC. In the event that a sys-

tem’s analog output resolution and accuracy must be up-

graded, substituting the DAC1230 can be easily accom-

plished. By tying address bit A0 to the ILE pin, a two-byte mP

write instruction (double precision) which automatically in-

crements the address for the second byte write (starting

with A0e‘‘1’’) can be used. This allows either an 8-bit or the

12-bit part to be used with no hardware or software chang-

es. For the simplest 8-bit application, this pin should be tied

to VCC (also see other uses in section 1.1).

Analog signal control versatility is provided by a precision R-

2R ladder network which allows full 4-quadrant multiplica-

tion of a wide range bipolar reference voltage by an applied

digital word.

1.0 DIGITAL CONSIDERATIONS

A most unique characteristic of these DAC’s is that the 8-bit

digital input byte is double-buffered. This means that the

data must transfer through two independently controlled 8-

bit latching registers before being applied to the R-2R lad-

der network to change the analog output. The addition of a

second register allows two useful control features. First, any

DAC in a system can simultaneously hold the current DAC

data in one register (DAC register) and the next data word in

the second register (input register) to allow fast updating of

the DAC output on demand. Second, and probably more

important, double-buffering allows any number of DAC’s in a

system to be updated to their new analog output levels

simultaneously via a common strobe signal.

The timing requirements and logic level convention of the

register control signals have been designed to minimize or

eliminate external interfacing logic when applied to most

popular microprocessors and development systems. It is

easy to think of these converters as 8-bit ‘‘write-only’’ mem-

ory locations that provide an analog output quantity. All in-

puts to these DAC’s meet TTL voltage level specs and can

also be driven directly with high voltage CMOS logic in non-

microprocessor based systems. To prevent damage to the

chip from static discharge, all unused digital inputs should

be tied to VCC or ground. If any of the digital inputs are

inadvertantly left floating, the DAC interprets the pin as a

logic ‘‘1’’.

1.1 Double-Buffered Operation

Updating the analog output of these DAC’s in a double-buff-

ered manner is basically a two step or double write opera-

tion. In a microprocessor system two unique system ad-

dresses must be decoded, one for the input latch controlled

by the CS pin and a second for the DAC latch which is

controlled by the XFER line. If more than one DAC is being

driven, Figure 2, the CS line of each DAC would typically be

decoded individually, but all of the converters could share a

common XFER address to allow simultaneous updating of

any number of DAC’s. The timing for this operation is

shown, Figure 3.

It is important to note that the analog outputs that will

change after a simultaneous transfer are those from the

DAC’s whose input register had been modified prior to the

XFER command.

7

Page 109: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

*TIE TO LOGIC 1 IF NOT NEEDED (SEE SEC. 1.1).

FIGURE 2. Controlling Mutiple DACs

TL/H/5608–6

FIGURE 3

The ILE pin is an active high chip select which can be de-

coded from the address bus as a qualifier for the normal CS

signal generated during a write operation. This can be used

to provide a higher degree of decoding unique control sig-

nals for a particular DAC, and thereby create a more effi-

cient addressing scheme.

Another useful application of the ILE pin of each DAC in a

multiple DAC system is to tie these inputs together and use

this as a control line that can effectively ‘‘freeze’’ the out-

puts of all the DAC’s at their present value. Pulling this line

low latches the input register and prevents new data from

being written to the DAC. This can be particularly useful in

multiprocessing systems to allow a processor other than the

one controlling the DAC’s to take over control of the data

bus and control lines. If this second system were to use the

same addresses as those decoded for DAC control (but for

a different purpose) the ILE function would prevent the

DAC’s from being erroneously altered.

In a ‘‘Stand-Alone’’ system the control signals are generat-

ed by discrete logic. In this case double-buffering can be

controlled by simply taking CS and XFER to a logic ‘‘0’’, ILE

to a logic ‘‘1’’ and pulling WR1 low to load data to the input

latch. Pulling WR2 low will then update the analog output. A

logic ‘‘1’’ on either of these lines will prevent the changing

of the analog output.

8

Page 110: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

TL/H/5608–7

ILEeLOGIC ‘‘1’’; WR2 and XFER GROUNDED

FIGURE 4

1.2 Single-Buffered Operation

In a microprocessor controlled system where maximum

data throughput to the DAC is of primary concern, or when

only one DAC of several needs to be updated at a time, a

single-buffered configuration can be used. One of the two

internal registers allows the data to flow through and the

other register will serve as the data latch.

Digital signal feedthrough (see Section 1.5) is minimized if

the input register is used as the data latch. Timing for this

mode is shown in Figure 4.

Single-buffering in a ‘‘stand-alone’’ system is achieved by

strobing WR1 low to update the DAC with CS, WR2 and

XFER grounded and ILE tied high.

1.3 Flow-Through Operation

Though primarily designed to provide microprocessor inter-

face compatibility, the MICRO-DAC’s can easily be config-

ured to allow the analog output to continuously reflect the

state of an applied digital input. This is most useful in appli-

cations where the DAC is used in a continuous feedback

control loop and is driven by a binary up-down counter, or in

function generation circuits where a ROM is continuously

providing DAC data.

Simply grounding CS, WR1, WR2, and XFER and tying ILE

high allows both internal registers to follow the applied digi-

tal inputs (flow-through) and directly affect the DAC analog

output.

1.4 Control Signal Timing

When interfacing these MICRO-DAC to any microprocessor,

there are two important time relationships that must be con-

sidered to insure proper operation. The first is the minimum

WR strobe pulse width which is specified as 900 ns for all

valid operating conditions of supply voltage and ambient

temperature, but typically a pulse width of only 180ns is

adequate if VCCe15VDC. A second consideration is that

the guaranteed minimum data hold time of 50ns should

be met or erroneous data can be latched. This hold time is

defined as the length of time data must be held valid on the

digital inputs after a qualified (via CS) WR strobe makes a

low to high transition to latch the applied data.

If the controlling device or system does not inherently meet

these timing specs the DAC can be treated as a slow mem-

ory or peripheral and utilize a technique to extend the write

strobe. A simple extension of the write time, by adding a

wait state, can simultaneously hold the write strobe active

and data valid on the bus to satisfy the minimum WR pulse-

width. If this does not provide a sufficient data hold time at

the end of the write cycle, a negative edge triggered one-

shot can be included between the system write strobe and

the WR pin of the DAC. This is illustrated in Figure 5 for an

exemplary system which provides a 250ns WR strobe time

with a data hold time of less than 10ns.

The proper data set-up time prior to the latching edge (LO to

HI transition) of the WR strobe, is insured if the WR pulse-

width is within spec and the data is valid on the bus for the

duration of the DAC WR strobe.

1.5 Digital Signal Feedthrough

When data is latched in the internal registers, but the digital

inputs are changing state, a narrow spike of current may

flow out of the current output terminals. This spike is caused

by the rapid switching of internal logic gates that are re-

sponding to the input changes.

There are several recommendations to minimize this effect.

When latching data in the DAC, always use the input regis-

ter as the latch. Second, reducing the VCC supply for the

DAC from a15V to a5V offers a factor of 5 improvement in

the magnitude of the feedthrough, but at the expense of

internal logic switching speed. Finally, increasing CC (Figure8) to a value consistent with the actual circuit bandwidth

requirements can provide a substantial damping effect on

any output spikes.

9

Page 111: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

TL/H/5608–8

FIGURE 5. Accommodating a High Speed System

2.0 ANALOG CONSIDERATIONS

The fundamental purpose of any D to A converter is to pro-

vide an accurate analog output quantity which is representa-

tive of the applied digital word. In the case of the DAC0830,

the output, IOUT1, is a current directly proportional to the

product of the applied reference voltage and the digital input

word. For application versatility, a second output, IOUT2, is

provided as a current directly proportional to the comple-

ment of the digital input. Basically:

IOUT1e

VREF

15 kXc

Digital Input

256;

IOUT2e

VREF

15 kXc

255bDigital Input

256

where the digital input is the decimal (base 10) equivalent of

the applied 8-bit binary word (0 to 255), VREF is the voltage

at pin 8 and 15 kX is the nominal value of the internal resist-

ance, R, of the R-2R ladder network (discussed in Section

2.1).

Several factors external to the DAC itself must be consid-

ered to maintain analog accuracy and are covered in subse-

quent sections.

2.1 The Current Switching R-2R Ladder

The analog circuitry, Figure 6, consists of a silicon-chromi-

um (SiCr or Si-chrome) thin film R-2R ladder which is depos-

ited on the surface oxide of the monolithic chip. As a result,

there are no parasitic diode problems with the ladder (as

there may be with diffused resistors) so the reference volt-

age, VREF, can range b10V to a10V even if VCC for the

device is 5VDC.

The digital input code to the DAC simply controls the posi-

tion of the SPDT current switches and steers the available

ladder current to either IOUT1 or IOUT2 as determined by the

logic input level (‘‘1’’ or ‘‘0’’) respectively, as shown in

Figure 6. The MOS switches operate in the current mode

with a small voltage drop across them and can therefore

switch currents of either polarity. This is the basis for the 4-

quadrant multiplying feature of this DAC.

2.2 Basic Unipolar Output Voltage

To maintain linearity of output current with changes in the

applied digital code, it is important that the voltages at both

of the current output pins be as near ground potential

(0VDC) as possible. With VREFea10V every millivolt ap-

pearing at either IOUT1 or IOUT2 will cause a 0.01% linearity

error. In most applications this output current is converted to

a voltage by using an op amp as shown in Figure 7.

The inverting input of the op amp is a ‘‘virtual ground’’ creat-

ed by the feedback from its output through the internal 15

kX resistor, Rfb. All of the output current (determined by the

digital input and the reference voltage) will flow through Rfbto the output of the amplifier. Two-quadrant operation can

be obtained by reversing the polarity of VREF thus causing

IOUT1 to flow into the DAC and be sourced from the output

of the amplifier. The output voltage, in either case, is always

equal to IOUT1cRfb and is the opposite polarity of the refer-

ence voltage.

The reference can be either a stable DC voltage source or

an AC signal anywhere in the range from b10V to a10V.

The DAC can be thought of as a digitally controlled attenua-

tor: the output voltage is always less than or equal to the

applied reference voltage. The VREF terminal of the device

presents a nominal impedance of 15 kX to ground to exter-

nal circuitry.

Always use the internal Rfb resistor to create an output volt-

age since this resistor matches (and tracks with tempera-

ture) the value of the resistors used to generate the output

current (IOUT1).

10

Page 112: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

FIGURE 6

FIGURE 7 TL/H/5608–9

2.3 Op Amp Considerations

The op amp used in Figure 7 should have offset voltage

nulling capability (See Section 2.5).

The selected op amp should have as low a value of input

bias current as possible. The product of the bias current

times the feedback resistance creates an output voltage er-

ror which can be significant in low reference voltage appli-

cations. BI-FET op amps are highly recommended for use

with these DACs because of their very low input current.

Transient response and settling time of the op amp are im-

portant in fast data throughput applications. The largest sta-

bility problem is the feedback pole created by the feedback

resistance, Rfb, and the output capacitance of the DAC.

This appears from the op amp output to the (b) input and

includes the stray capacitance at this node. Addition of a

lead capacitance, CC in Figure 8, greatly reduces overshoot

and ringing at the output for a step change in DAC output

current.

Finally, the output voltage swing of the amplifier must be

greater than VREF to allow reaching the full scale output

voltage. Depending on the loading on the output of the am-

plifier and the available op amp supply voltages (only g12

volts in many development systems), a reference voltage

less than 10 volts may be necessary to obtain the full ana-

log output voltage range.

2.4 Bipolar Output Voltage with a Fixed Reference

The addition of a second op amp to the previous circuitry

can be used to generate a bipolar output voltage from a

fixed reference voltage. This, in effect, gives sign signifi-

cance to the MSB of the digital input word and allows two-

quadrant multiplication of the reference voltage. The polarity

of the reference can also be reversed to realize full 4-quad-

rant multiplication: gVREFcgDigital CodeegVOUT. This

circuit is shown in Figure 9.

This configuration features several improvements over ex-

isting circuits for bipolar outputs with other multiplying

DACs. Only the offset voltage of amplifier 1 has to be nulled

to preserve linearity of the DAC. The offset voltage error of

the second op amp (although a constant output voltage er-

ror) has no effect on linearity. It should be nulled only if

absolute output accuracy is required. Finally, the values of

the resistors around the second amplifier do not have to

match the internal DAC resistors, they need only to match

and temperature track each other. A thin film 4-resistor net-

work available from Beckman Instruments, Inc. (part no.

694-3-R10K-D) is ideally suited for this application. These

resistors are matched to 0.1% and exhibit only 5 ppm/§Cresistance tracking temperature coefficient. Two of the four

available 10 kX resistors can be paralleled to form R in

Figure 9 and the other two can be used independently as

the resistances labeled 2R.

2.5 Zero Adjustment

For accurate conversions, the input offset voltage of the

output amplifier must always be nulled. Amplifier offset er-

rors create an overall degradation of DAC linearity.

The fundamental purpose of zeroing is to make the voltage

appearing at the DAC outputs as near 0VDC as possible.

This is accomplished for the typical DAC Ð op amp connec-

tion (Figure 7) by shorting out Rfb, the amplifier feedback

resistor, and adjusting the VOS nulling potentiometer of the

op amp until the output reads zero volts. This is done, of

course, with an applied digital code of all zeros if IOUT1 is

driving the op amp (all one’s for IOUT2). The short around

Rfb is then removed and the converter is zero adjusted.

11

Page 113: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

tsOP Amp CC (O to Full Scale)

LF356 22 pF 4 ms

LF351 22 pF 5 ms

LF357* 10 pF 2 ms

*2.4 kX RESISTOR ADDED FROMbINPUT TO

GROUND TO INSURE STABILITY

FIGURE 8

VOUTeVREF(DIGITAL CODEb128)

128

TL/H/5608–10

1 LSBelVREFl128

Input Code IDEAL VOUT

MSB ÀÀÀÀÀÀÀÀÀÀLSB aVREF bVREF

*THESE RESISTORS ARE AVAILABLE FROM 1 1 1 1 1 1 1 1 VREFb1 LSB blVREFla1 LSBBECKMAN INSTRUMENTS, INC. AS THEIR

1 1 0 0 0 0 0 0 VREF/2 blVREFl/2PART NO. 694-3-R10K-D

1 0 0 0 0 0 0 0 0 0

0 1 1 1 1 1 1 1 b1 LSB a1 LSB

0 0 1 1 1 1 1 1 blVREFl

2b1 LSB

lVREFl2

a1 LSB

0 0 0 0 0 0 0 0 blVREFl a lVREFl

FIGURE 9

2.6 Full-Scale Adjustment

In the case where the matching of Rfb to the R value of the

R-2R ladder (typically g0.2%) is insufficient for full-scale

accuracy in a particular application, the VREF voltage can be

adjusted or an external resistor and potentiometer can be

added as shown in Figure 10 to provide a full-scale adjust-

ment.

The temperature coefficients of the resistors used for this

adjustment are an important concern. To prevent degrada-

tion of the gain error temperature coefficient by the external

resistors, their temperature coefficients ideally would have

to match that of the internal DAC resistors, which is a highly

impractical constraint. For the values shown in Figure 10, if

the resistor and the potentiometer each had a temperature

coefficient of g100 ppm/§C maximum, the overall gain error

temperature coefficent would be degraded a maximum of

0.0025%/§C for an adjustment pot setting of less than 3%

of Rfb.

2.7 Using the DAC0830 in a Voltage Switching

Configuration

The R-2R ladder can also be operated as a voltage switch-

ing network. In this mode the ladder is used in an inverted

manner from the standard current switching configuration.

The reference voltage is connected to one of the current

output terminals (IOUT1 for true binary digital control, IOUT2is for complementary binary) and the output voltage is taken

from the normal VREF pin. The converter output is now a

voltage in the range from 0V to 255/256 VREF as a function

of the applied digital code as shown in Figure 11.

TL/H/5608–11

FIGURE 10. Adding Full-Scale Adjustment

12

Page 114: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

TL/H/5608–12

FIGURE 11. Voltage Mode Switching

This configuration offers several useful application advan-

tages. Since the output is a voltage, an external op amp is

not necessarily required but the output impedance of the

DAC is fairly high (equal to the specified reference input

resistance of 10 kX to 20 kX) so an op amp may be used

for buffering purposes. Some of the advantages of this

mode are illustrated in Figures 12, 13, 14 and 15.

There are two important things to keep in mind when using

this DAC in the voltage switching mode. The applied refer-

ence voltage must be positive since there are internal para-

sitic diodes from ground to the IOUT1 and IOUT2 terminals

which would turn on if the applied reference went negative.

There is also a dependence of conversion linearity and

gain error on the voltage difference between VCC and the

voltage applied to the normal current output terminals. This

is a result of the voltage drive requirements of the ladder

switches. To ensure that all 8 switches turn on sufficiently

(so as not to add significant resistance to any leg of the

ladder and thereby introduce additional linearity and gain

errors) it is recommended that the applied reference voltage

be kept less than a5VDC and VCC be at least 9V more

positive than VREF. These restrictions ensure less than

0.1% linearity and gain error change. Figures 16, 17 and 18characterize the effects of bringing VREF and VCC closer

together as well as typical temperature performance of this

voltage switching configuration.

TL/H/5608–13

# Voltage switching mode eliminates output signal inversion and therefore a

need for a negative power supply.

# Zero code output voltage is limited by the low level output saturation volt-

age of the op amp. The 2 kX pull-down resistor helps to reduce this volt-

age.

# VOS of the op amp has no effect on DAC linearity.

FIGURE 12. Single Supply DAC

# VOUTe2.5V # D

128b1 J

# Slewing and settling time for a full scale output change is & 1.8 ms

FIGURE 13. Obtaining a Bipolar Output from a Fixed

Reference with a Single Op Amp

13

Page 115: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

FIGURE 14. Bipolar Output with Increased Output Voltage Swing

TL/H/5608–14

# Only a single a15V supply required

# Non-interactive full-scale and zero code output adjustments

# VMAX and VMIN must be s a5VDC and t0V.

# Incremental Output Stepe

1

256(VMAXbVMIN).

#VOUTe

D

256(VMAXbVMIN)a

255

256VMIN

FIGURE 15. Single Supply DAC with Level Shift and Span-

Adjustable Output

Gain and Linearity Error

Variation vs. Supply Voltage

Gain and Linearity Error

Variation vs. Reference Voltage

Gain and Linearity Error

Variation vs. Temperature

TL/H/5608–15

FIGURE 16 FIGURE 17

Note: For these curves, VREF is the voltage ap-

plied to pin 11 (IOUT1) with pin 12 (IOUT2)

grounded.

FIGURE 18

14

Page 116: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DAC0830 Series Application Hints (Continued)

2.8 Miscellaneous Application Hints

These converters are CMOS products and reasonable care

should be exercised in handling them to prevent catastroph-

ic failures due to static discharge.

Conversion accuracy is only as good as the applied refer-

ence voltage so providing a stable source over time and

temperature changes is an important factor to consider.

A ‘‘good’’ ground is most desirable. A single point ground

distribution technique for analog signals and supply returns

keeps other devices in a system from affecting the output of

the DACs.

During power-up supply voltage sequencing, the b15V (orb12V) supply of the op amp may appear first. This will

cause the output of the op amp to bias near the negative

supply potential. No harm is done to the DAC, however, as

the on-chip 15 kX feedback resistor sufficiently limits the

current flow from IOUT1 when this lead is internally clamped

to one diode drop below ground.

Careful circuit construction with minimization of lead lengths

around the analog circuitry, is a primary concern. Good high

frequency supply decoupling will aid in preventing inadver-

tant noise from appearing on the analog output.

Overall noise reduction and reference stability is of particu-

lar concern when using the higher accuracy versions, the

DAC0830 and DAC0831, or their advantages are wasted.

3.0 GENERAL APPLICATION IDEAS

The connections for the control pins of the digital input reg-

isters are purposely omitted. Any of the control formats dis-

cussed in Section 1 of the accompanying text will work with

any of the circuits shown. The method used depends on the

overall system provisions and requirements.

The digital input code is referred to as D and represents the

decimal equivalent value of the 8-bit binary input, for exam-

ple:

Binary Input

Pin 13 Pin 7 D

MSB LSB Decimal Equivalent

1 1 1 1 1 1 1 1 255

1 0 0 0 0 0 0 0 128

0 0 0 1 0 0 0 0 16

0 0 0 0 0 0 1 0 2

0 0 0 0 0 0 0 0 0

Applications

DAC Controlled Amplifier (Volume Control) Capacitance Multiplier

TL/H/5608–16

# VOUTe

bVIN (256)

D

# When De0, the amplifier will go open loop and the output will saturate.

# Feedback impedance from the binput to the output varies from 15 kX to% as the input code changes from full-scale to zero.

# CEQUIVeC1 # 1a

256

D J# Maximum voltage across the equivalent capacitance is

limited toVO MAX (op amp)

1a

256

D

# C2 is used to improve settling time of op amp.

15

Page 117: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Applications (Continued)

Variable fO, Variable QO, Constant BW Bandpass Filter

TL/H/5608–17

# fO e0KD

256

2qR1C; QO e 0KD

256

(2RQ a R1)

RQ(K a 1); 3dbBW e

RQ(K a 1)

2qR1C(2RQ a R1)

where C1 e C2 e C; K e

R6

R5and R1 e R of DAC e 15k

# HO e 1 for RIN e R4 e R1

# Range of fO and Q is & 16 to 1 for circuit shown. The

range can be extended to 255 to 1 by replacing R1 with a

second DAC0830 driven by the same digital input word.

# Maximum fO c Q product should be s200 kHz.

DAC Controlled Function Generator

TL/H/5608–18

# DAC controls the frequency of sine, square, and triangle outputs.

# f e

D

256(20k)Cfor VOMAX e V0MIN of square wave output and R1 e 3 R2.

# 255 to 1 linear frequency range; oscillator stops with D e 0

# Trim symmetry and wave-shape for minimum sine wave distortion.

16

Page 118: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Applications (Continued)

Two Terminal Floating 4 to 20 mA Current Loop Controller

TL/H/5608–19

IOUT e VREF Ð 1

R1

a

D

256 Rfb ( Ð 1 a

R2

R3 (# DAC0830 linearly controls the current flow from the input terminal to the

output terminal to be 4 mA (for De0) to 19.94 mA (for De255).

# Circuit operates with a terminal voltage differential of 16V to 55V.

# P2 adjusts the magnitude of the output current and P1 adjusts the zero

to full scale range of output current.

# Digital inputs can be supplied from a processor using opto isolators on

each input or the DAC latches can flow-through (connect control lines to

pins 3 and 10 of the DAC) and the input data can be set by SPST toggle

switches to ground (pins 3 and 10).

DAC Controlled Exponential Time Response

TL/H/5608–20

# Output responds exponentially to input changes and automatically stops

when VOUTeVIN

# Output time constant is directly proportional to the DAC input code and

capacitor C

# Input voltage must be positive (See section 2.7)

17

Page 119: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Ordering Information

Temperature Range 0§C to a70§ b40§C to a85§C b55§C to a125§C

Non0.05% FSR DAC0830LCN DAC0830LCM DAC0830LCV DAC0830LCJ DAC0830LJ

Linearity 0.1% FSR DAC0831LCN

0.2% FSR DAC0832LCN DAC0832LCM DAC0832LCV DAC0832LCJ DAC0832LJ

Package Outline N20AÐMolded DIP M20B Small Outline V20A Chip Carrier J20AÐCeramic DIP

Physical Dimensions inches (millimeters)

Ceramic Dual-In-Line Package (J)

Order Number DAC0830LCJ,

DAC0830LJ, DAC0832LJ or DAC0832LCJ

NS Package Number J20A

18

Page 120: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

Physical Dimensions inches (millimeters) (Continued)

Molded Small Outline Package (M)

Order Number DAC0830LCM

or DAC0832LCM

NS Package Number M20B

Molded Dual-In-Line Package (N)

Order Number DAC0830LCN,

DAC0831LCN or DAC0832LCN

NS Package Number N20A

19

Page 121: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

DA

C0830/D

AC

0831/D

AC

0832

8-B

itm

PC

om

patible

,D

ouble

-Buff

ere

dD

toA

Convert

ers

Physical Dimensions inches (millimeters) (Continued)

Molded Chip Carrier (V)

Order Number DAC0830LCV

or DAC0832LCV

NS Package Number V20A

LIFE SUPPORT POLICY

NATIONAL’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT

DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL

SEMICONDUCTOR CORPORATION. As used herein:

1. Life support devices or systems are devices or 2. A critical component is any component of a life

systems which, (a) are intended for surgical implant support device or system whose failure to perform can

into the body, or (b) support or sustain life, and whose be reasonably expected to cause the failure of the life

failure to perform, when properly used in accordance support device or system, or to affect its safety or

with instructions for use provided in the labeling, can effectiveness.

be reasonably expected to result in a significant injury

to the user.

National Semiconductor National Semiconductor National Semiconductor National SemiconductorCorporation Europe Hong Kong Ltd. Japan Ltd.1111 West Bardin Road Fax: (a49) 0-180-530 85 86 13th Floor, Straight Block, Tel: 81-043-299-2309Arlington, TX 76017 Email: cnjwge@ tevm2.nsc.com Ocean Centre, 5 Canton Rd. Fax: 81-043-299-2408Tel: 1(800) 272-9959 Deutsch Tel: (a49) 0-180-530 85 85 Tsimshatsui, KowloonFax: 1(800) 737-7018 English Tel: (a49) 0-180-532 78 32 Hong Kong

Fran3ais Tel: (a49) 0-180-532 93 58 Tel: (852) 2737-1600Italiano Tel: (a49) 0-180-534 16 80 Fax: (852) 2736-9960

National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.

Page 122: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

This datasheet has been download from:

www.datasheetcatalog.com

Datasheets for electronics components.

Page 123: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

WIDE BANDWIDTHSINGLE J-FET OPERATIONAL AMPLIFIER

. INTERNALLY ADJUSTABLE INPUT OFFSETVOLTAGE. LOW POWER CONSUMPTION.WIDE COMMON-MODE (UP TO VCC

+) ANDDIFFERENTIAL VOLTAGE RANGE. LOW INPUT BIAS AND OFFSET CURRENT.OUTPUT SHORT-CIRCUIT PROTECTION.HIGH INPUT IMPEDANCE J–FET INPUTSTAGE. INTERNAL FREQUENCY COMPENSATION. LATCH UP FREE OPERATION.HIGH SLEW RATE : 16V/µs (typ)

NDIP8

(Plastic Package)

1

2

3

4

8

6

5

7

1 - Offset Null 12 - Inverting input3 - Non-inverting input4 - VCC

-

5 - Offset Null 26 - Output7 - VCC

+

8 - N.C.

PIN CONNECTIONS (top view)

DESCRIPTION

These circuits are high speed J–FET input singleoperationalamplifiers incorporatingwellmatched,highvoltage J–FET and bipolar transistors in a monolithicintegratedcircuit.The devicesfeaturehighslew rates, low inputbiasandoffsetcurrents, and low offset voltage temperaturecoefficient.

LF151LF251 - LF351

October 1997

DSO8

(Plastic Micropackage)

ORDER CODES

Part Number TemperaturePackage

N D

LF351 0oC, +70oC • •LF251 –40oC, +105oC • •LF151 –55oC, +125oC • •

1/9

Page 124: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

ABSOLUTE MAXIMUM RATINGS

Symbol Parameter Value Unit

VCC Supply Voltage - (note 1) ±18 V

Vi Input Voltage - (note 3) ±15 V

Vid Differential Input Voltage - (note 2) ±30 V

Ptot Power Dissipation 680 mW

Output Short-circuit Duration - (note 4) Infinite

Toper Operating Free Air Temperature Range LF351LF251LF151

0 to 70–40 to 105–55 to 125

oC

Tstg Storage Temperature Range –65 to 150 oC

Notes : 1. All voltage values, except differential voltage, are with respect to the zero reference level (ground) of the supply voltages where thezero reference level is the midpoint between VCC

+ and VCC–.

2. Differential voltages are at the non-inverting input terminal with respect to the inverting input terminal.3. The magnitude of the input voltage must never exceed the magnitude of the supply voltage or 15 volts, whichever is less.4. The output may be shorted to ground or to either supply. Temperature and /or supply voltages must be limited to ensure that the

dissipation rating is not exceeded.

Output

Non-invertinginput

Inve rtinginput

VCC

VCC

100Ω

1.3k

30k

35k 35k 100Ω1.3k

8.2k

Offse t Null1 Offse t Null2

100Ω

200Ω

SCHEMATIC DIAGRAM

N1 N2

LF351

100kΩ

VCC

INPUT OFFSET VOLTAGE NULL CIRCUITS

LF151 - LF251 - LF351

2/9

Page 125: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

ELECTRICAL CHARACTERISTICSVCC = ±15V, Tamb = 25oC (unless otherwise specified)

Symbol ParameterLF151 - LF251 - LF351

UnitMin. Typ. Max.

Vio Input Offset Voltage (RS = 10kΩ)Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

3 1013

mV

DVio Input Offset Voltage Drift 10 µV/oC

Iio Input Offset Current *Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

5 1004

pAnA

Iib Input Bias Current *Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

20 20020

pAnA

Avd Large Signal Voltage Gain (RL = 2kΩ, VO = ±10V)Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

5025

200V/mV

SVR Supply Voltage Rejection Ratio (RS = 10kΩ)Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

8080

86dB

ICC Supply Current (no load)Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

1.4 3.43.4

mA

Vicm Input Common Mode Voltage Range ±11 +15-12

V

CMR Common Mode Rejection Ratio (RS = 10kΩ)Tamb = 25oCTmin. ≤ Tamb ≤ Tmax.

7070

86dB

Ios Output Short-circuit CurrentTamb = 25oCTmin. ≤ Tamb ≤ Tmax.

1010

40 6060

mA

±VOPP Output Voltage SwingTamb = 25oC RL = 2kΩ

RL = 10kΩTmin. ≤ Tamb ≤ Tmax. RL = 2kΩ

RL = 10kΩ

10121012

1213.5

V

SR Slew Rate(Vi = 10V, RL = 2kΩ, CL = 100pF, Tamb = 25oC, unity gain) 12 16

V/µs

tr Rise Time(Vi = 20mV, RL = 2kΩ, CL = 100pF, Tamb = 25oC, unity gain) 0.1

µs

KOV Overshoot(Vi = 20mV, RL = 2kΩ, CL = 100pF, Tamb = 25oC, unity gain) 10

%

GBP Gain Bandwidth Product(f = 100kHz, Tamb = 25oC, Vin = 10mV, RL = 2kΩ, CL = 100pF) 2.5 4

MHz

Ri Input Resistance 1012 ΩTHD Total Harmonic Distortion (f = 1kHz, AV = 20dB, RL = 2kΩ,

CL = 100pF, Tamb = 25oC, VO = 2VPP) 0.01%

en Equivalent Input Noise Voltage (f = 1kHz, Rs = 100Ω) 15nV

√Hz

∅ m Phase Margin 45 Degrees* The input bias currents are junction leakage currents which approximately double for every 10oC increase in the junction temperature.

LF151 - LF251 - LF351

3/9

Page 126: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

30

20

25

15

10

5

0

MA

XIM

UM

PE

AK

-TO

-PE

AK

OU

TP

UT

VO

LTA

GE

(V)

100 1K 10K 100K 10M1M

FREQUENCY (Hz)

See Figure 2

= 2kΩRL= +25 CTamb

= 15VVCC

= 5VVCC

= 10VVCC

MAXIMUM PEAK-TO-PEAK OUTPUTVOLTAGE VERSUS FREQUENCY

30

20

25

15

10

5

0

MA

XIM

UM

PE

AK

-TO

-PE

AK

OU

TP

UT

VO

LTA

GE

(V)

100 1K 10K 100K 10M1M

FREQUENCY (Hz)

See Figure 2= +25 CTamb

= 10kΩRL

VCC= 10V

VCC= 15V

VCC= 5V

MAXIMUM PEAK-TO-PEAK OUTPUTVOLTAGE VERSUS FREQUENCY

30

25

20

15

10

5

0

MA

XIM

UM

PE

AK

-TO

-PE

AK

OU

TP

UT

VO

LTA

GE

(V)

FREQUENCY (Hz)

10k 40k 100k 400k 1M 4M 10M

Tamb = +25 C

Tamb = -55 C

Tamb = +125 C

RL = 2kΩSee Figure 2

VCC= 15V

MAXIMUM PEAK-TO-PEAK OUTPUTVOLTAGE VERSUS FREQUENCY

30

25

20

10

5

15

0-75 -25 25 75 125-50 0 50 -50

MA

XIM

UM

PE

AK

-TO

-PE

AK

OU

TP

UT

VO

LTA

GE

(V)

TEMPER ATURE( C)

V CC = 15V

S ee Figure 2

R L = 10kΩ

R L = 2kΩ

MAXIMUM PEAK-TO-PEAK OUTPUTVOLTAGE VERSUS FREE AIR TEMP.

30

25

20

15

10

5

0

MA

XIM

UM

PE

AK

-TO

-PE

AK

OU

TP

UT

VO

LTA

GE

(V)

0.1 0.2 0.4 0.7 1 2 4 7 10

Tamb= +25 CVCC

= 15V

See Figure 2

LOAD RESISTANCE (kΩ)

MAXIMUM PEAK-TO-PEAK OUTPUTVOLTAGE VERSUS LOAD RESISTANCE

30

25

20

15

10

5

0 2 4 6 8 10 12 14 16

MA

XIM

UM

PE

AK

-TO

-PE

AK

OU

TP

UT

VO

LTA

GE

(V)

SUPPLYVOLTAGE (V)

RL = 10 kΩTamb = +25 C

MAXIMUM PEAK-TO-PEAK OUTPUTVOLTAGE VERSUS SUPPLY VOLTAGE

LF151 - LF251 - LF351

4/9

Page 127: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

100

10

1

0.1

0.01INP

UT

BIA

SC

UR

RE

NT

(nA

)

-50 -25 0 25 50 75 100 125

TEMPERATURE ( C)

VCC = 15V

INPUT BIAS CURRENT VERSUSFREE AIR TEMPERATURE

1000

400200100

2040

10

42

1

DIF

FE

RE

NT

IAL

VO

LTA

GE

AM

PLI

FIC

AT

ION

(V/V

)

-75 -50 -25 0 25 50 75 100 125

TEMPERATURE ( C)

RL= 2kΩ

VO = 10V

VCC = 15V

LARGE SIGNAL DIFFERENTIALVOLTAGE AMPLIFICATION VERSUS

FREE AIR TEMPERATURE

FREQUENCY (Hz)

DIF

FE

RE

NT

IAL

VO

LTA

GE

AM

PLI

FIC

AT

ION

(V/V

) 100

10

100 1K 10K 100K 10M1M

1

DIFFERENTIALVOLTAGE

AMPLIFICATION(left sca le )

180

90

0

R = 2kΩC = 100pFV = 15VT = +125 C

LLCCamb

P HASE S HIFT(right sca le)

LARGE SIGNAL DIFFERENTIALVOLTAGE AMPLIFICATION AND PHASE

SHIFT VERSUS FREQUENCY

2502252001751501007550250

TO

TA

LP

OW

ER

DIS

SIP

AT

ION

(mV

)

-75 -50 -25 0 25 50 75 100 125

TEMPERATURE ( C)

No signa lNo load

+/-15VV CC

TOTAL POWER DISSIPATION VERSUSFREE AIR TEMPERATURE

2.01.81.61.41.21.00.80.60.40.20

SU

PP

LYC

UR

RE

NT

(mA

)

-75 -50 -25 0 25 50 75 100 125

TEMPERATURE ( C)

VCC= 15V

No signa lNo load

SUPPLY CURRENT PER AMPLIFIERVERSUS FREE AIR TEMPERATURE

2.01.81.61.41.21.00.80.60.40.20

SU

PP

LYC

UR

RE

NT

(mA

)

0 2 4 6 8 10 12 14 16

SUPPLY VOLTAGE (V)

No signa lNo load

= +25 CTamb

SUPPLY CURRENT PER AMPLIFIERVERSUS SUPPLY VOLTAGE

LF151 - LF251 - LF351

5/9

Page 128: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

89

88

87

86

85

84

-50 -25 0 25 50 75 100 125

CO

MM

ON

MO

DE

MO

DE

RE

JEC

TIO

NR

AT

IO(d

B)

TEMPERATURE( C)

83-75

RL = 10 kΩ= 15VVCC

COMMON MODE REJECTION RATIOVERSUS FREE AIR TEMPERATURE

6

4

2

0

-2

-4

0 0.5 1 1.5 2 2.5 3 3.5INP

UT

AN

DO

UT

PU

TV

OLT

AG

ES

(V)

TIME (µs )

-6

= 15VVCC

RL = 2 kΩ

= 100pFCLTamb= +25 C

OUTPUTINPUT

VOLTAGE FOLLOWER LARGE SIGNALPULSE RESPONSE

t r

28

24

20

16

12

8

4

0

-4

OU

TP

UT

VO

LTA

GE

(mV

)

0 0.1 0.2 0.3 0.4 0.5 0.6 0.7

TIME (µs )

10%

90%

OVERSHOOT

RL= 2kΩTamb= +25 C

VCC= 15V

OUTPUT VOLTAGE VERSUSELAPSED TIME

70

60

50

40

30

20

10

0EQ

UIV

ALE

NT

INP

UT

NO

ISE

VO

LTA

GE

(nV

/VH

z)

10 40 100 400 1k 4k 10k 40k 100k

FREQUENCY (Hz)

AV = 10RS = 100ΩTamb = +25 C

VCC = 15V

EQUIVALENT INPUT NOISE VOLTAGEVERSUS FREQUENCY

1

0.4

0.1

0.04

0.01

0.004

0.001

TO

TA

LH

AR

MO

NIC

DIS

TO

RT

ION

(%)

100 400 1k 4k 10k 40k 100k

FREQUENCY (Hz)

AV = 1

Tamb = +25 C

VCC = 15V

= 6VVO(rms)

AV = 1

Tamb = +25 C

= 6VVO(rms)

V CC = 15V

TOTAL HARMONIC DISTORTION VERSUSFREQUENCY

LF151 - LF251 - LF351

6/9

Page 129: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

-

eI

LF351 eo

CL= 100pF R = 2kΩL

Figure 1 : Voltage Follower

PARAMETER MEASUREMENT INFORMATION

-eI

LF351

ΡL CL= 100pF

1k Ω10k Ω

eo

Figure 2 : Gain-of-10 Inverting Amplifier

-

LF351

1k Ω

RF = 100k Ω

9.1k Ω3.3k Ω

+15V

-15V

3.3k Ω

C = 3.3 µFF

f =osc1

F2 x R FC

TYPICAL APPLICATION

(0.5Hz) SQUARE WAVE OSCILLATOR

LF351

-

R1 R2

C3

R3

C2C1

C1 = C2 =C32

= 100pF

R1 = R2 = 2R3 = 1.5MΩ

f =o1 = 1kHz

1C12 x R

HIGH Q NOTCH FILTER

LF151 - LF251 - LF351

7/9

Page 130: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

PM

-DIP

8.E

PS

PACKAGE MECHANICAL DATA8 PINS - PLASTIC DIP

DimensionsMillimeters Inches

Min. Typ. Max. Min. Typ. Max.A 3.32 0.131

a1 0.51 0.020B 1.15 1.65 0.045 0.065b 0.356 0.55 0.014 0.022b1 0.204 0.304 0.008 0.012

D 10.92 0.430

E 7.95 9.75 0.313 0.384e 2.54 0.100e3 7.62 0.300e4 7.62 0.300

F 6.6 0260i 5.08 0.200

L 3.18 3.81 0.125 0.150Z 1.52 0.060 D

IP8.

TB

L

LF151 - LF251 - LF351

8/9

Page 131: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

PM

-SO

8.E

PS

PACKAGE MECHANICAL DATA8 PINS - PLASTIC MICROPACKAGE (SO)

DimensionsMillimeters Inches

Min. Typ. Max. Min. Typ. Max.A 1.75 0.069

a1 0.1 0.25 0.004 0.010a2 1.65 0.065a3 0.65 0.85 0.026 0.033b 0.35 0.48 0.014 0.019

b1 0.19 0.25 0.007 0.010

C 0.25 0.5 0.010 0.020c1 45o (typ.)D 4.8 5.0 0.189 0.197E 5.8 6.2 0.228 0.244

e 1.27 0.050e3 3.81 0.150

F 3.8 4.0 0.150 0.157L 0.4 1.27 0.016 0.050M 0.6 0.024

S 8o (max.) SO

8.T

BL

Information furnished is believed to be accurate and reliable. However, SGS-THOMSON Microelectronics assumes no responsi-bility for the consequences of use of such information nor for any infringement of patents or other rights of third parties whichmay result from its use. No license is granted by implication or otherwise under any patent or patent rights of SGS-THOMSONMicroelectronics. Specifications mentioned in this publ icationare subject to change without notice. This publication supersedesand replaces all information previously supplied. SGS-THOMSON Microelectronics products are not authorized for use as criticalcomponents in life support devices or systems without express written approval of SGS-THOMSON Microelectronics.

1997 SGS-THOMSON Microelectronics – Printed in Italy – All Rights Reserved

SGS-THOMSON Microelectronics GROUP OF COMPANIESAustralia - Brazil - Canada - China - France - Germany - Hong Kong - Italy - Japan - Korea - Malaysia - Malta - Morocco

The Netherlands - Singapore - Spain - Sweden - Switzerland - Taiwan - Thailand - United Kingdo m- U.S.A. OR

DE

RC

OD

E:

LF151 - LF251 - LF351

9/9

Page 132: PEMBANGKIT GELOMBANG SINUS, SEGITIGA DAN KOTAK …

This datasheet has been download from:

www.datasheetcatalog.com

Datasheets for electronics components.