Oleh :
i
FINAL PROJECT
By :
ii
HALAMAN PERSEMBAHAN DAN MOTTO HIDUP
MOTTO :
DAN PERJUANGAN”
vi
INTISARI
viii
ABSTRACT
Anybody/someone who want to measure their blood pressure in order to know their
health must go to a klinik or a health experts. Tensimeter that used is not includes
technology inside it yet, so the measurement accuracy is not good enough and only the
health experts can do the measurement. That is why we need a tensimeter that can be
monitored by anybody anytime in order to minimize the health problems.
In this research, the display of blood pressure measurement on the LCD 2x16 is
already working and the locking sensor is capable of displays the expected data. The error
in this research is in the detection of both sistolik and distolik bump that caused by the
broken oscillation signal amplifier circuit. For the future research, it is recommended that
in the detection of both distolik and sistolik bump, do not use the oscillation signal
amplifier circuit because the bump has already been able to detect with only the amplifier
circuit.
ix
KATA PENGANTAR
Syukur dan terima kasih kepada Tuhan Yesus Kristus atas segala rahmat dan
karunia-Nya sehingga tugas akhir ini dengan judul “Pengukur Tekanan Darah (Tensimeter)
Digital Berbasis Mikro ATMega8535” ini dapat terselesaikan.
Selama menulis tugas akhir ini, penulis menyadari bahwa begitu banyak pihak yang
telah memberikan bantuan dan dorongan dengan caranya masing-masing, sehingga tugas
akhir ini dapat diselesaikan. Oleh karena itu penulis ingin mengucapkan rasa terimakasih
yang sebesar-besarnya kepada :
x
DAFTAR ISI
xii
2.6. Regulator Tegangan ............................................................................. 15
2.6.1 Regulasi Tegangan dengan Regulasi IC .................................. 16
2.7. Mikrokontroler AVR ATMega8535 .................................................... 17
2.7.1 Port I/O (Input/Output) ............................................................ 19
2.7.2 ADC (Analog Digital Converter) ............................................ 19
2.8. Penguat Operasi (OP-Amp) ................................................................. 21
2.9. Intrumentation Amplifier ..................................................................... 22
2.10. Differential Amplifier (Penguat Beda) ................................................ 23
2.11. Oscilattion Signal Amplifier ................................................................ 24
2.12. Rangkaian Penguat .............................................................................. 25
2.13. Rangakaian Pembagi Tegangan ........................................................... 25
2.14. LED (Light Emitting Diode) ................................................................ 27
2.15. LCD (Liquid Crystal Dysplay) ............................................................ 28
BAB III. RANCANGAN PENELITIAN..................................................................... 30
3.1. Diagram Blok Perancangan ................................................................. 31
3.2. Perancangan Perangkat Keras ............................................................. 33
2.3.1 Rangkaian Regulator Tegangan ............................................... 34
2.3.2 Rangkaian Sensor (BPS-Pressure sensor) ................................ 34
2.3.3 Instumentstion Amplifier ......................................................... 35
2.3.4 Oscilattion Signal Amplifier..................................................... 37
2.3.5 Rangkaian Mikrokontroler ATMega 8535 ............................... 38
2.3.5.1 Rangkaian Osilator ..................................................... 38
2.4.5.1 Rangkaian Reset ......................................................... 38
2.3.6 Rangkaian Penampil ................................................................ 39
2.3.7 LED (Light Emitting Diode) .................................................... 41
2.3.8 Buzzer ...................................................................................... 41
2.3.9 Rangkaian Lengkap ................................................................. 42
3.3. Perancangan Perangkat Lunak ............................................................. 43
3.3.1 Program Utama ........................................................................ 43
3.3.2 Routine Baca Nilai Tekanan .................................................... 44
3.4. Penggunaan Pin pada Mikrokontroler ................................................. 47
BAB IV. HASIL DAN PEMBAHASAN .................................................................... 49
4.1. Cara Kerja Tensimeter Digital berbasis Mikro ATMega8535 ............ 49
xiii
4.2. Pengamatan Tensimeter Digital berbasis Mikro ATMega8535 .......... 50
4.2.1 Pengujian Rangkaian Tegulator Tegangan .............................. 50
4.2.2 Pengujian Rangkaian Penurun Tegangan 3 Volt ..................... 51
4.2.3 Pengujian Rangkaian Sensor ................................................... 51
4.2.4 Pengujian Rangkaian Instrumentation Amplifier .................... 52
4.2.5 Pengujian Mikrokontroler ATMega 8535 ................................ 54
4.2.6 Pengujian LCD ........................................................................ 55
4.2.7 Pengujian Sinyal Sistolik dan Diastolik .................................. 56
4.2.8 Pengujian Tampilan Tekanan Darah pada LCD ...................... 58
4.3. Analisa ................................................................................................ 60
4.3.1 Rangkaian Regulator 5 Volt .................................................... 60
4.3.2 Rangkaian Penurun Tegangan
3 Volt dan Rangkaian Sensor .................................................. 61
4.3.3 Instrumentation Amplifier ....................................................... 64
4.3.4 Osilation Signal Amplifier ....................................................... 66
4.3.5 Sistolik dan Diastolik ............................................................... 67
4.3.6 Sub Routine Baca ADC dan Nilai Skala Pengali ADC ........... 68
4.3.7 Perangkat Lunak ...................................................................... 71
4.3.7.1. Inisialisasi ................................................................... 72
4.3.7.2. Tampilan Awal ........................................................... 73
4.3.7.3. Baca Nilai Tekanan .................................................... 74
4.3.7.4. Tampilan Nilai Tekanan pada LCD ............................ 74
4.3.7.5. Baca Lonjakan Tekanan ............................................. 75
4.3.7.6. Tampilan Sistolik dan Diastolik ................................. 76
4.3.7.7. Indikator LED ............................................................. 77
4.3.7.8. Indicator Buzzer ......................................................... 78
4.3.8 Analisa Perangkat Lunak ......................................................... 78
BAB V. KESIMPULAN DAN SARAN...................................................................... 80
4.1. Kesimpulan .......................................................................................... 80
4.2. Saran .................................................................................................... 80
DAFTAR PUSTAKA ................................................................................................... 82
LAMPIRAN
xiv
DAFTAR GAMBAR
Halaman
Gambar 2.1. Grafik tekanan saat pemompaan hingga pelepasan udara [14] ............... 7
Gambar 2.2. Pembesaran nilai osilasi dari nilai tekanan [14]...................................... 8
Gambar 2.3. Struktur Esterior Jantung......................................................................... 9
Gambar 2.4. Bentuk tensimeter (sphygmomanometer) [12] ....................................... 10
Gambar 2.5. Chestpiece dari Stetoskop ....................................................................... 13
Gambar 2.6. IC sensor tekanan udara (BPS-Pressure 030) [17] ................................. 14
Gambar 2.7. Prinsip Regulasi Tegangan .................................................................... 16
Gambar 2.8. Rangkaian regulasi tegangan dengan IC 78xx [6]. ................................ 17
Gambar 2.9. Konfigurasi pin ATMega8535 [18]......................................................... 18
Gambar 2.10. Register ADMUX ................................................................................... 20
Gambar 2.11. Format Data ADC dengan ADLAR=0 .................................................... 21
Gambar 2.12. Format Data ADC dengan ADLAR=1 .................................................... 21
Gambar 2.13. Simbol Penguat Operasional (Op-Amp) ................................................. 22
Gambar 2.14. Instrumentation Amplifier Circuit [7]. .................................................... 23
Gambar 2.15. Differential Amplifier Circuit [10]. ........................................................ 24
Gambar 2.16. Oscillation Signal Amplifier [14] ........................................................... 24
Gambar 2.17. Rangkaian Penguat Non-inverting .......................................................... 25
Gambar 2.18. Rangkaian Pembagi Tegangan ............................................................... 26
Gambar 2.19. Rangkaian LED [2] ................................................................................. 27
Gambar 2.20. Bentuk LCD 2 x 16 karakter ................................................................... 28
Gambar 2.21. Bagian LCD 2 x 16 karakter [16] ........................................................... 28
Gambar 3.1. Perancangan struktur mekanis “Tensimeter Digital” ............................. 30
Gambar 3.2. Diagram Blok Perancangan Tensimeter Digital ..................................... 31
Gambar 3.3. Rangkaian Regulator Tegangan dengan IC 7805 ................................... 33
Gambar 3.4. Perancangan Rangkaian Sensor .............................................................. 34
Gambar 3.5. Perancangan Rangkaian Instrumentation Amplifier [3] ......................... 35
Gambar 3.6. Perancangan Rangkaian Signal Oscillation [3] ...................................... 37
Gambar 3.7. Perancangan Rangkaian Osilator ATMega8535 .................................... 38
Gambar 3.8. Perancangan Rangkaian Reset ATMega8535 ......................................... 38
xv
Halaman
Gambar 3.9. Perancangan Rangkaian LCD ................................................................. 40
Gambar 3.10. Perancangan Penampilan LCD Proses Pertama ..................................... 40
Gambar 3.11. Perancangan Penampilan LCD Proses Kedua ........................................ 40
Gambar 3.12. Perancangan Rangkaian LED ................................................................. 41
Gambar 3.13. Perancangan Rangkaian Buzzer .............................................................. 42
Gambar 3.14. Perancangan Rangkaian Lengkap Pengukur Tekanan Darah ................. 42
Gambar 3.15. Perancangan Diagram Alir Pengukur
Tekanan Darah Digital Keseluruhan ...................................................... 43
Gambar 3.16. Perancangan Routine Baca Nilai Tekanan ............................................. 47
Gambar 4.1. Mekanik dari tensimeter digital berbasis mikro ATMega8535 .............. 49
Gambar 4.2. Pengujian regulator tegangan ................................................................. 51
Gambar 4.3. Pengujian mikrokontroler ATMega 8535 ............................................... 55
Gambar 4.4. Hasil pengujian LCD .............................................................................. 55
Gambar 4.5. Proses pembacaan sinyal antara 250 mmHg hingga 0 mmHg ............... 57
Gambar 4.6. Lonjakan tekanan sistolik dan diastolik .................................................. 57
Gambar 4.7. Sinyal yang terbaca pada rangkaian osilasi ............................................ 58
Gambar 4.8. Tampilan Alat Ukur saat tekanan sebesar 0 mmHg ............................... 58
Gambar 4.9. Tampilan LCD saat tekanan sebesar 0 mmHg ....................................... 59
Gambar 4.10. Rangkaian regulator tegangan 5 volt dengan IC 7805 ........................... 60
xvi
DAFTAR TABEL
Halaman
Tabel 2.1. Level Tekanan Darah Dewasa (usia >18 tahun) ..................................... 12
Tabel 2.2. Karakteristik Sensor Tekanan Udara
(BPS-Pressure Sensor 030) [17]............................................................. 15
Tabel 2.3. Jenis IC dan keluaran tegangan [7] ......................................................... 17
Tabel 2.4. Konfigurasi Pengaturan Port I/O pada ATMega8535 ............................ 19
Tabel 2.5. Pemilihan Mode Tegangan Referensi ADC ........................................... 21
Tabel 3.1. Range tegangan output setelah penguatan .............................................. 36
Tabel 3.2. Koneksi Antara Modul LCD dengan Mikrokontroler ............................ 39
Tabel 3.3. Nilai ADCdc dengan gain sebesar 380 kali ............................................. 34
Tabel 3.3. (Lanjutan) Nilai ADCdc dengan gain sebesar 380 kali ........................... 45
Tabel 3.3. Nilai skala pengali tiap satu kenaikan tekanan ....................................... 46
Tabel 4.1. Range tegangan keluaran sensor ............................................................. 51
Tabel 4.1. (Lanjutan) Range tegangan keluaran sensor ........................................... 52
Tabel 4.2. Range tegangan output setelah penguatan .............................................. 52
Tabel 4.2. (Lanjutan) Range tegangan output setelah penguatan ............................ 53
Tabel 4.3. Tampilan Tekanan Darah pada Alat Ukur dan Tampilan pada LCD ...... 59
Tabel 4.4. Tegangan keluaran regulator tegangan ................................................... 61
Tabel 4.5. Error pada rangkaian penurun tegangan 3 volt ....................................... 61
Tabel 4.6. Tegangan keluaran sensor saat perancangan dan pengujian .................. 62
Tabel 4.7. Pergeseran tegangan keluaran sensor ..................................................... 63
Tabel 4.7. (Lanjutan) Pergeseran tegangan keluaran sensor ................................... 64
Tabel 4.8. Perbandingan Penguatan Antara Perancangan
dengan Pengujian .................................................................................... 64
Tabel 4.8. (Lanjutan) Perbandingan Penguatan Antara Perancangan
dengan Pengujian .................................................................................... 65
Tabel 4.9. Error pada rangkaian oscillation signal amplifier .................................. 67
Tabel 4.10. Nilai ADCdc dengan gain sebesar 380 kali ............................................. 69
Tabel 4.11. Nilai skala pengali tiap satu kenaikan tekanan ....................................... 70
Tabel 4.11. (Lanjutan) Nilai skala pengali tiap satu kenaikan tekanan ..................... 71
xvii
1
BAB I
PENDAHULUAN
1
2
adalah tipe penggunaan sehari-hari, dimana permasalahan akan terkena hipertensi dapat
terjadi kapan saja, dan dimana saja dapat segera diketahui dan segera diatasi.
Dari permasalahan yang ada tersebut, maka diperlukan suatu solusi baru agar
seseorang yang ingin mengetahui tekanan darahnya tidak perlu pergi ke klinik kesehatan
atau rumah sakit. Dengan memanfaatkan komponen-komponen yang murah dan mudah
ditemukan seperti di pasaran, maka penulis mengambil tugas akhir ”Pengukur Tekanan
Darah (Tensimeter) Digital berbasis Mikro ATMega8535”.
Tensimeter digital yang akan dibuat menggunakan mikrokontroler ATMega8535.
Mikrokontroler ATMega 8535 merupakan generasi AVR (Alf and Vegard’s Risc
processor) yang memiliki kapabilitas yang sangat maju, dengan biaya ekonomi yang cukup
minimal. Digunakannya ATMega8535 dikarenakan mikrokontroler ini mudah didapat dan
murah dari segi biaya yang dikeluarkan. Selain itu ATMega8535 memiliki fasilitas yang
lengkap yang dapat menunjang penulis dalam pembuatan tensimeter digital berbasis mikro
ATMega8535.
Kontruksi tensimeter digital yang akan dibuat mirip dengan tensimeter pada
umumnya, yaitu menggunakan kantong karet terbungkus kain (cuff), pompa udara, dan
sumbat udara. Pengukuran tekanan darah dilakukan saat bunyi pertama (sistolik) dan saat
bunyi mulai menghilang (diastolik) seiring dengan mulai dikuranginya tekanan udara.
Perbedaan dari perangkat yang akan dibuat dengan tensimeter pada umumnya adalah
sistem penampil nilai pengukuran, dan digunakannya sensor tekanan udara (BPS-Pressure
sensor) sebagai pengganti dari stetoskop.
Secara garis besar data masukan / input dari nilai tekanan darah yang semula masih
dalam bentuk analog dibandingkan dengan skala yang ada diubah menjadi bentuk digital
agar dapat diolah oleh mikrokontroler. Data keluaran dari mikrokontroler yang berupa nilai
tekanan darah sistolik maupun diastolik ditampilkan melalui LCD (Liquid Crystal
Display).
Dari uraian tersebut, permasalahan yang ada di dalam penelitian ini dapat
dirumuskan sebagai berikut:
1. Bagaimana membuat perangkat keras untuk tensimeter digital?
2. Bagaimana membuat program agar perangkat keras berjalan dengan baik?
3. Bagaimana respon sensor pada pendeteksian tekanan darah?
4. Bagaiman menulis atau menampilkan data ke LCD.
3
6. Data / hasil pengukuran tekanan darah yang didapat akan ditampilkan melalui
LCD.
Selain itu juga memuat dasar teori mengenai aplikasi dasar komponen
atau piranti yang akan digunakan. Dasar teori yang dimaksud adalah
dasar teori tentang, jantung dan tekanan darah, pengukuran tekanan
darah baik itu sistolik maupun diastolik, sensor tekanan udara (BPS-
Pressure sensor 030), mikrokontroler AVR ATMega8535, dan semua
hal yang terkait didalam penelitian.
BAB II
TINJAUAN PUSTAKA DAN DASAR TEORI
Pada bab ini akan dibahas tentang teori-teori atau hal-hal yang mendukung dalam
perancangan serta pembuatan dari alat pendeteksi tekanan darah berbasis mikrokontroler
ATMega8535.
2.1. Dasar Penelitian
Perkembangan teknologi elektronika khususnya digital dan otomatis dibidang
kesehatan saat ini sangat pesat, dimana setiap penggunaan alat dengan metode ini memiliki
keakuratan yang cukup tinggi jika dibandingkan ketika masih menggunakan alat dengan
metode lama yang kebanyakan dalam pengoperasiannya masih manual dan masih belum
menyertakan teknologi elektronik didalamnya sehingga masih banyak terdapat kesalahan
baik dari alat maupun human eror.
Dengan semakin pesatnya teknologi elektronik dibidang kesehatan, sudah banyak
diciptakan alat-alat kesehatan yang sangat bermanfaat bagi manusia. Namun seperti kita
ketahui untuk mendapatkan alat-alat kesehatan dengan kualitas yang baik, harga dari alat-
alat tersebut masih terlalu mahal untuk dijangkau oleh konsumen dengan taraf kehidupan
yang relatif rendah. Sebagai contoh tensimeter digital, alat ini sudah ada di pasaran tetapi
harga yang ditawarkan kepada konsumen relatif tinggi. Permasalahan akan timbul apabila
alat tersebut rusak, dan penggantian komponen yang cukup sulit didapat dipasaran karena
harga komponen yang ditawarkan relatif mahal.
Untuk mengatasi berbagai permasalahan diatas, maka diperlukan suatu solusi baru
yaitu membuat suatu tensimeter digital dengan memanfaatkan komponen-komponen yang
murah serta mudah ditemukan dipasaran tetapi mempunyai kualitas yang baik. Untuk itu
penulis mengambil tugas akhir dengan judul “Tensimeter Digital Berbasis Mikrokontroler
AVR ATMega8535” dimana komponen-komponen yang diperlukan dalam pembuatan alat
ini murah dan mudah didapat.
Untuk membuat alat pembaca/pengukur tekanan darah (Sphygmomanometer
digital) atau yang biasa dikenal dengan nama tensimeter digital diperlukan sebuah pompa,
sumbat udara yang dapat diputar, kantong karet yang dibungkus kain, serta pembaca
tekanan. Konsep dasar dari alat ini sama seperti dengan tensimeter analog/manual pada
umumnya yaitu pertama kali adalah memasang kantong karet yang terbungkus kain/manset
6
7
(cuff) pada lengan atas, kemudian manset dikembangkan dengan cara memompakan udara
kedalamnya hingga mencapai batas tekanan yang ditentukan oleh perancang. Kemudian
sensor tekanan dengan sendirinya akan mengeksekusi harga tekanan yang terukur pada saat
itu juga yang kemudian ditampilkan ke LCD. Kantong karet yang membesar akan menekan
pembuluh darah lengan (Brachial Arthery) hingga aliran darah terhenti sementara. Udara
kemudian dikeluarkan secara perlahan dengan memutar sumbat udara [14].
Ada beberapa hal yang harus diperhatikan saat udara dalam kantong karet
diturunkan, yaitu nilai tekanan yang terukur, kedua denyut yang dihasilkan jantung akibat
tekanan ketika jantung memompa darah (berkontraksi) dan tekanan ketika jantung dalam
fase istirahat. Sinyal-sinyal yang terjadi pada saat jantung mengalami kondisi tersebut
dideteksi dengan rangkaian Oscillation Signal Amplifier, sehingga dihasilkan pulsa logika
satu (high) dan pulsa logika rendah (low) [14 ].
Pulsa-pulsa inilah yang akan digunakan sebagai input bagi mikrokontroler untuk
menentukan tekanan sistolik dan diastolik. Kemudian tekanan sistolik dan diastolik tersebut
akan ditampilkan oleh mikrokontroler ke layar tampilan (LCD). Gambar 2.1 menunjukkan
grafik tegangan keluaran sensor saat dilakukan pemompaan dan pelepasan tekanan udara,
dalam kotak terputus tersebut menunjukkan terjadinya tekanan sistolik maupun diastolik.
Gambar 2.1. Grafik tekanan saat pemompaan hingga pelepasan udara [14]
Pembesaran dari kotak terputus yang berupa nilai tekanan sistolik maupun nilai
diastolik terlihat dalam Gambar 2.2.
8
2.2. Jantung
Jantung merupakan sebuah organ yang terdiri dari berbagai macam otot. Otot
jantung merupakan jaringan dengan bentuk dan susunannya menyerupai jaringan otot serat
lintang, namun memiliki cara kerja menyerupai otot polos yaitu bekerja di luar kemauan
manusia (dipengaruhi saraf otonom). Jantung berfungsi untuk mengalirkan darah ke
seluruh tubuh. Gambar 2.3 merupakan bagian-bagian yang ada pada jantung manusia.
oleh jantung pada simpul yang terdapat pada atrium dekstra dekat jalur masuknya vena
cava yang disebut nodus sino atrial. Rangsangan kemudian akan diteruskan ke dinding
atrium dan juga ke bagian septum kordis oleh nodus atrio ventricular. Dari nodus atrio
ventricular ini rangsangan akan melalui annulus fibrosus dan akan terhenti sekitar 0.1
detik. Selanjutnya rangsangan tersebut akan diteruskan ke bagian apeks kordis dan melalui
berkas purkinje disebarkan ke seluruh dinding ventrikel sehingga jantung dapat
berkontraksi.
Dalam kerjanya jantung memiliki tiga periode yaitu:
a. Periode kontraksi/sistolik (periode sistole), yaitu keadaan di mana jantung pada
bagian ventrikel menguncup.
b. Periode dilatasi/diastolik (periode diastole), yaitu keadaan di mana jantung
mengembang.
c. Periode istirahat, yaitu waktu antara periode kontraksi dan dilatasi di mana
jantung berhenti sekitar 0.1 detik.
Kerja jantung dapat diketahui dengan cara memeriksa perjalanan darah dalam
arteri, karena pada dasarnya dinding arteri akan mengembang jika didalamnya terdapat
aliran darah. Gelombang darah ini menimbulkan denyutan pada arteri. Kuncup denyutan
arteri tersebut disebut denyut nadi atau pulse [1].
Usia, obat-obatan, dan perubahan posisi juga dapat mempengaruhi tekanan darah. Tekanan
darah yang normal bagi mereka yang tidak meminum obat tekanan darah seharusnya
kurang dari 120/80 [9].
Dari perbandingan nilai tekanan darah antara tekanan darah batas atas (sistolik) dan
tekanan darah bawah (diastolik) tersebut, maka dapat diketahui bahwa seseorang
mempunyai tekanan darah tinggi (hipertensi), tekanan darah rendah (hipotensi), ataupun
tekanan darah normal.
2.4. Stetoskop
Pengukuran tekanan darah selain menggunakan tensimeter juga membutuhkan
suatu instrumen lain guna mendengarkan dan mendapatkan bunyi dari detak tekanan darah
dari pembuluh arteri. Instrumen yang digunakan di dalam pengukuran tekanan darah pada
umumnya dikenal dengan stetoskop.
Stetoskop adalah sebuah alat akustik medis yang digunakan untuk mendengarkan
suara yang ada di dalam tubuh manusia atau hewan. Stetoskop biasa digunakan untuk
mendengarkan suara detak jantung atau pernapasan. Suara ini digunakan untuk
mendiagnose penyakit tertentu. Stetoskop terbagi atas dua jenis, yaitu stetoskop akustik
dan stetoskop elektronis [13].
13
Stetoskop akustik bekerja dengan cara menyalurkan suara dari chestpieces melalui
selang udara ke telinga pendengar. Chestpiece terdiri dari dua bagian yang dapat
dipergunakan untuk mendengarkan suara dari tubuh manusia, sebuah diafragma dan
sebuah mangkuk berongga (bellpiece). Gambar dari chestpiece terlihat pada Gambar 2.5.
ini memiliki keakuratan dan kestabilan output terhadap suhu mulai dari 0ºC sampai 50ºC.
Sensor ini juga memiliki kemampuan pembacaan tekanan mulai dari 0 psi sampai 5.8
psi.(1 Psi = 51,7 mmHg) [17]. Bentuk dan pin dari IC sensor tekanan udara (BPS-Pressure
Sensor 030) terlihat pada Gambar 2.6.
Keunggulan sensor tekanan BPS-PRESSURE SENSOR
1. Memiliki ketahanan tinggi.
2. Memiliki performa tinggi.
3. Ukuran yang kecil.
4. Memiliki impedansi tinggi pada alokasi tegangan rendah.
5. Tegangan output yang linier.
Kelemahan sensor tekanan BPS-PRESSURE SENSOR
1. Maksimum pressure sensing 5,8 psi ( 299.86 MmHg).
2. Memerlukan supply daya.
3. Bekerja maksimal terhadap suhu antara 00 sampai 500 celcius.
Tabel 2.2. Karakteristik Sensor Tekanan Udara (BPS-Pressure Sensor 030) [17]
menyediakan tegangan referensi biasanya juga memakai tegangan sumber dari filter
rectifier sebagai sumber daya.
Supply
(belum teregulasi)
+ Penguat
differensial
Umpan Balik
IC 78xx mempunyai tiga kaki seperti terlihat dalam Gambar 2.8, satu untuk Vin,
satu untuk Vout, dan satu untuk Ground. Dalam IC ini juga terdapat rangkaian pelindung
agar di dalam IC tidak terjadi arus yang kuat atau daya yang terlalu tinggi yang membebani
IC tersebut.
= 1024 (2.1)
( )
=
di mana :
Vpos : tegangan masukan pada pin positif
Vneg : tegangan masukan pada pin negatif
Gain : faktor penguatan
Vref : tegangan referensi yang dipilih
Register yang perlu di set nilainya adalah ADMUX (ADC Multiplexer Selection IO
Register), ADCSRA (ADC Control and Status Register A), dan SFIOR (Special Function
IO Register). ADMUX merupakan register 8 bit yang berfungsi menentukan referensi
ADC, format data keluaran (output), dan saluran ADC yang digunakan [3]. Register
ADMUX ditunjukkan pada Gambar 2.10.
b. ADLAR merupakan bit pemilihan mode data keluaran ADC yang digunakan
untuk menentukan konfigurasi isi dari register ADCH dan ADCL sebagai tempat
menyimpan hasil konversi.
rendah. Istilah operasional menunjukkan bahwa penambahan komponen luar yang sesuai
dapat dikonfigurasikan untuk melakukan berbagai operasi [6].
Masukan op-amp yang berlabel inverting (-) dan non inverting (+) merupakan
masukan beda (difference input). Umumnya sinyal masukan diberikan pada salah satu
masukan. Adapun masukan yang lain digunakan untuk mengendalikan karakteristik
komponen. Penguatan antara keluaran dan masukan inverting adalah negatif sedangkan
pengauatan antara keluaran dan masukan non inverting adalah positif [9].
Penguat operasional mempunyai dua tegangan catu yang berlabel V+ dan V- yang
sama dan berpolaritas berlawanan seperti terlihat pada Gambar 2.13.
(Vo/Vi) = Av (2.4)
2
= ( 2 − 1)
1
Filter RC terdiri dari dua jaringan yang menentukan dua cut-off frequensi, kedua
kutub secara seksama dipilih untuk menjamin bahwa sinyal osilasi tidak terdistorsi atau
hilang. Konsep dari rangkaian ini secara garis besar digunakan untuk mengevaluasi
Freescale sensor tekanan yang digunakan dalam tekanan darah digital. Rangkaian ini juga
dapat pula diubah dengan mudah untuk memberikan tingkat sinyal keluaran yang sesuai.
Perangkat keras ini juga dengan mudah dimodifikasi untuk memberikan analisis yang lebih
baik untuk mendapatkan nilai sistolik dan diastolik [14].
Vo = [ 1 + ( Rf / R ) ] x Vi (2.5)
Av = (R + Rf) / R
AV = 1 + (Rf / R) (2.6)
26
VL = IL x RL
IL = (VS/(RS + RL))x RL
VL = Vout
maka :
atau
Gambar dari rangkaian pembagi tegangan terlihat pada Gambar 2.18 [2],
Dimana :
VS adalah Sumber Tegangan
RS adalah Tahanan Dalam
RL adalah Tahanan Beban
Vout adalah Tegangan Keluaran
I = (VS – VLED)/RS
atau
RS = (VS – VLED)/I (2.8)
28
Jenis LCD yang digunakan pada perancangan adalah LCD Module M1632 produk
dari SEIKO. Berdasarkan Gambar 2.21, konfigurasi pin LCD adalah :
1. VCC; sebagai pin terminal power supply (+5V).
2. GND; sebagai pin terminal ground.
3. DB0 s/d DB7; sebagai pin jalur data yang digunakan untuk menyalurkan data
kode ASCII atau perintah untuk mengatur kerja LCD.
4. RS (register select); sebagai pin yang membedakan jenis data yang dikirim ke
LCD. Jika RS berlogika ‘0’, maka yang dikirim adalah perintah untuk
mengatur kerja LCD. Jika berlogika ‘1’, maka akan dikirim data kode ASCII
yang akan ditampilkan.
5. R/W (read/write); sebagai pin untuk mengaktifkan pengiriman atau
pengambilan data ke atau dari LCD. Jika R/W berlogika ‘0’, maka terjadi
pengiriman data ke LCD. Jika R/W berlogika ‘1’, maka terjadi pengambilan
data dari LCD.
6. E (enable); merupakan sinyal sinkronisasi. Saat E berubah dari logika ‘1’ ke
‘0’, maka data di DB0 s/d DB7 akan diterima atau diambil dari port
mikrokontroler.
30
BAB III
RANCANGAN PENELITIAN
30
31
berbentuk persegi panjang yang dapat dililitkan pada lengan tangan. Pompa terbuat dari
karet yang dapat mengembang dan mengempis sehingga dapat mengisikan udara ke cuff.
Sumbat udara yang dapat diputar berfungsi sebagai kran pengatur dibuang/dilepaskannya
udara dari cuff yang terpompa untuk mendapatkan tekanan/detak nadi sebagai sinyal
masukan sensor. Agar udara dari pompa dapat terhubung ke cuff dan sensor maka
dibutuhkan selang udara. Selang udara ini juga dipilih dari karet karena lentur sehingga
mudah untuk diposisikan sesuai keinginan.
Sumber tegangan berasal dari baterai 9V, dimana dalam penggunaannya baterai ini
banyak terdapat di pasaran, dan juga mudah diganti jika sudah melemah. LED (Light
Emitting Diode) berfungsi sebagai pendeteksi atau peringatan ketika sinyal-sinyal sistolik
maupun diastolik terjadi. LCD digunakan sebagai penampil saat ada sinyal masukan
(adanya nilai tekanan darah). Buzzer berfungsi sebagai indikator bahwa proses pengukuran
tekanan telah selesai. Tombol reset digunakan untuk mereset atau mengembalikan tampilan
tensimeter digital, ke tampilan semula (sebelum adanya pengukuran nilai tekanan darah).
ATMega8535 berfungsi sebagai mikrokontroler dalam perancangan ini.
Intrumentation Amplifier, LCD (Liquid Crystal Display), Oscillation Signal Amplifier, dan
Mikrokontroler sebagai perangkat keras dan juga perangkat lunaknya. Secara sederhana
konsep pembuatan alat dapat dijelaskan sebagai berikut. Sistem membaca tekanan dan
mengambil pulsa-pulsa untuk dianalisis dan diartikan sebagai tekanan sistolik dan
diastolik. Perancangan alat menggunakan sensor tekanan BPS-Pressure sensor dengan
batas tekanan maksimal 5,8 psi atau sekitar 320 mmHg. Pada perancangan kali ini dibatasi
nilai tekanan maksimal 250 mmHg dengan nilai toleransi sensor.
Dari Gambar 3.2 juga dapat dijelaskan bahwa masing-masing bagian saling
berinterasi sehingga terbentuk suatu sistem yang lengkap. Adapun prinsip kerja rangkaian
yaitu ketika kantong udara di pompa maka akan timbul tekanan yang disebabkan oleh
udara yang tertekan. Udara yang ada pada kantong udara disalurkan ke sensor sehingga
sensor bereaksi dengan menghasilkan tegangan yang semakin besar seiring dengan
semakin besarnya tekanan yang diterima sensor.
Output tegangan keluaran sensor sangat kecil dan terdapat dua tegangan keluaran
sehingga dibutuhkan suatu rangkaian penguat dan sekaligus rangkaian
differential/rangkaian beda (Instrumentation Amplifier) tujuan digunakan rangkaian beda
adalah untuk mendapatkan satu tegangan keluaran dari sensor. Keluaran dari rangkaian
penguat dan rangkaian beda (Instrumentation Amplifier) ini diteruskan ke dua tujuan
berbeda. Keluaran pertama dari rangkaian penguat dan pembanding ditujukan ke ADC
yang berada dalam mikrokontroler ATMega8535 sedangkan keluaran kedua dari rangkaian
penguat dan pembanding ditujukan ke rangkaian penguat dan penyaring osilasi
(Oscillation Signal Amplifier).
Keluaran yang ditujukan ke ADC bertujuan agar output dari sensor yang berupa
nilai-nilai analog dan telah dikuatkan dirubah menjadi data-data digital yang dimengerti
oleh mikrokontroler. Sedangkan kegunaan rangkaian osillation signal amplifier adalah
sebagai pembangkit tegangan dan penyaring sinyal osilasi yang difungsikan sebagai
interupsi yang memberikan logika high dan low ke salah satu port mikro yang diinginkan.
Data masukan yang diterima mikrokontroler dari ADC diolah lagi oleh
mikrokontroler dan diubah menjadi data-data ascii untuk ditampilkan ke LCD. Nilai
tekanan akan selalu ditampilkan ke LCD dan menunggu terdeteksinya sinyal osilasi.
Ketika sinyal osilasi yang pertama terdeteksi, mikrokontroler memerintahkan agar nilai
tekanan tersebut ditampilkan ke LCD sebagai sinyal sistolik yaitu kondisi dimana jantung
pada posisi memompa. Dan ketika sinyal osilasi kedua terdeteksi, mikrokontroler juga
33
akan memerintahkan agar nilai tekanan pada saat itu ditampilkan ke LCD sebagai sinyal
diastolik yaitu kondisi jantung saat berada dalam posisi istirahat.
setelah ditahan oleh manset/cuff. Proses inilah yang akan digunakan sebagai landasan
penulis untuk merancang pendeteksi adanya lonjakan tekanan darah dengan sensor tekanan
udara. Data yang digunakan sebagai pendeteksi adanya lonjakan tekanan di dalam darah
adalah perubahan signifikan tegangan keluaran pada sensor tekanan udara (Vo sensor).
Berdasarkan dari data sheet sensor tekanan membutuhkan tegangan masukan
(Vs+) sebesar 3V, sedangkan VCC yang tersedia sebesar 5V. Oleh karena itu dibutuhkan
suatu rangkaian penurun tegangan 3V, sehingga sensor akan aman dan terlindungi dari
tegangan yang berlebihan yang dapat merusak sensor BPS-Pressure tersebut. Pada Gambar
3.4 menunjukkan gambar rangkaian sensor 3V. Dalam perancangan ini R1 ditentukan
sebesar 10 Ω, Vi sebesar 3V. Berdasarkan perumusan [2.7], maka besarnya R2 adalah :
2
= ×
1+ 2
2
3 = ×5
10 + 2
3
2= 10
5−3
3
2= 10
2
2 = 15 Ω
2 10
=
−1
2 10000
=
380 − 1
20000
=
379
= 52,77 ≈ 53 Ω
Output dari sensor yang telah dikuatkan dan dibedakan, kemudian dibagi menjadi
dua bagian untuk dua tujuan berbeda. Dimana satu bagian digunakan untuk menghitung
nilai tekanan darah yang terjadi dan kemudian ditujukan ke ADC. Sedangkan bagian output
yang lain ditujukan ke rangkaian penguat dan rangkaian oscillation signal amplifier.
Tombol yang dipasang paralel dengan kapasitor berfungsi untuk melakukan reset
secara manual pada saat program sedang berlangsung. Saat tombol ditekan maka tejadi
pengosongan kapasitor dan reset berlogika tinggi, sedangkan saat tombol dilepas tegangan
pada reset menjadi nol dan reset berlogika rendah.
Vo _ port Vd
R1 =
Id
5 1,2
R1 =
20mA
3,8Volt
R1 =
20mA
R1 = 190Ω
3.2.8. Buzzer
Buzzer berfungsi sebagai indikator bahwa proses pengukuran tekanan darah sistolik
dan diastolik telah selesai. Rangkaian perancangan buzzer terlihat pada Gambar 3.13.
42
\
Gambar 3.13. Perancangan Rangkaian Buzzer
Gambar 3.15. Perancangan Diagram Alir Pengukur Tekanan Darah Digital Keseluruhan
Program yang akan dibuat adalah suatu program pengukuran tekanan darah secara
digital menggunakan sensor tekanan udara. Saat terdeteksi lonjakan tekanan pertama kali
didefinisikan sebagai tekanan sistolik, kemudian saat terjadi lonjakan tekanan kedua
didefnisikan sebagai tekanan diastolik. Hasil dari kedua lonjakan tekanan tersebut akan
44
ditampilkan melalui LCD. Gambar 3.15 menunjukkan gambar dari perancangan diagram
alir pengukur tekanan darah digital keseluruhan.
,
( )= 1024 = 39
.
Dari perhitungan yang telah dilakukan, besar ADC (dc) yang lain terlihat di dalam
Tabel 3.2.
Tabel 3.3. (Lanjutan) Nilai ADCdc dengan gain sebesar 380 kali
Tekanan Darah Input ADC Gain = 380 ADC
(mmHg) (mV) (V) (dc)
60 0,7 0,266 276
70 0,8 0,304 315
80 0,9 0,342 354
90 1 0,380 394
100 1,1 0,418 433
110 1,2 0,456 473
120 1,3 0,494 512
130 1,4 0,532 551
140 1,5 0,570 591
150 1,6 0,608 630
160 1,7 0,646 670
170 1,8 0,684 709
180 1,9 0,722 748
190 2 0,760 788
200 2,1 0,798 827
210 2,2 0,836 866
220 2,3 0,874 906
230 2,4 0,912 945
240 2,5 0,950 985
250 2,6 0,988 1024
Data Tabel 3.2 dianggap sesuai karena berasal dari pembacaan sensor yang
dilakukan oleh penulis. Dari perhitungan yang telah dilakukan oleh penulis seperti terlihat
dalam Tabel 3.3, besarnya nilai rata – rata kenaikan tekanan adalah sebesar 0,1mV. Oleh
karena itu besarnya skala pengali tiap – tiap kenaikan adalah sama. Besarnya skala pengali
adalah sebagai berikut :
Karena nilai rata – rata kenaikan tekanan besarnya 0,1mV, maka skala pengali yang
digunakan adalah sebesar 263 seperti terlihat dalam Tabel 3.3.
Dari Tabel 3.3 diketahui besarnya skala pengali adalah 263 untuk tiap-tiap nilai
kenaikan yang sama, oleh karena itu perumusan untuk nilai tekanan (mmHg) pada
perancangan Routine Baca Nilai Tekanan adalah sebagai berikut :
Gambar 3.16 adalah gambar perancangan diagram alir routine baca tekanan
Tensimeter Digital Berbasis mikro ATmega 8535.
BAB IV
HASIL DAN PEMBAHASAN
Pada bab ini akan dibahas tentang pengujian dan juga analisa berdasarkan pada
perancangan sistem yang dibuat. Pengujian ini dilakukan untuk mengetahui kehandalan
dari sistem yang telah dibuat berdasarkan perancangan pada bab sebelumnya. Setelah
menentukan piranti input / output dari sistem pengecekan nilai tekanan dan memprogram
mikrokontroler dengan piranti pemrograman, maka dapat disajikan hasilnya dengan
langsung mengaplikasikan melalui hardware yang telah dibuat atau dapat dilihat secara
langsung dari output yang berupa pendeteksian LED dan penampilan hasil pada LCD.
Hasil perancangan perangkat keras dan program perangkat lunak bahasa C dengan
menggunakan software CodeVisionAVR Evaluation V2.04.5b, telah dihasilkan sebuah alat
yang berfungsi untuk melakukan proses pengukuran dan juga menampilkan nilai tekanan
darah. Bentuk keseluruhan yang dihasilkan dari tensimeter digital ini dapat dilihat pada
gambar 4.1.
49
50
”TEKANAN= mmHg” pada baris pertama dan juga akan menampilkan ”S/D = /
mmHg” pada baris kedua. Port LCD yang digunakan pada mikrokontroler ATMega8535
adalah port C.0 sampai dengan port C.7.
Saat kantung udara dipompa maka akan terjadi tekanan yang mengaktifkan sensor
tekanan udara, saat sensor aktif maka timbul tegangan yang dikuatkan oleh rangkaian
penguat tegangan 380 kali. Hasil penguatan tegangan keluaran sensor ditujukan ke pin
ADC dan juga rangkaian osilasi.
Port ADC yang digunakan pada mikrokontroler ATMega8535 adalah port A.0. Di
dalam ADC terjadi proses konversi sinyal analog menjadi sinyal digital agar dapat dibaca
oleh LCD. Hasil dari konversi ADC ini ditampilkan oleh LCD sebagai nilai tekanan
dengan satuan mmHg. Ketika kantung udara mulai dikosongkan maka tampilan LCD pada
baris pertama yaitu ”TEKANAN= mmHg” akan diisi oleh hasil konversi ADC, nilai yang
berada setelah simbol ”sama dengan” akan semakin berkurang yaitu dari 250 mmHg
hingga 0 mmHg.
Saat menurunnya nilai tekanan inilah rangkaian sinyal osilasi bekerja, yaitu
mencari lonjakan tekanan yang akan ditampilkan pada penampil LCD baris kedua ”S/D = /
mmHg”. Ketika terjadi lonjakan pertama, nilai tekanan yang terbaca akan ditampilkan pada
kolom ” S ” atau kolom sistolik. Saat terjadi lonjakan tekanan pertama atau sistolik ini
maka LED akan menyala sebagai detektor bahwa telah didapatkan nilai sistolik. Proses
selanjutnya adalah mencari nilai diastolik saat pompa dikendorkan terus menerus hingga 0
mmHg yang terbaca pada penampil LCD. Saat dikendorkan terus menerus akan terjadi
lonjakan seperti saat mencari nilai sistolik. Lonjakan tekanan yang kedua ini adalah
lonjakan dari tekanan bawah atau diastolik dan ditampilkan oleh LCD pada baris kedua
kolom ” D ” atau kolom diastolik. Seiring diperolehnya nilai diastolik maka LED yang
tadinya menyala akan padam dan juga buzzer akan berbunyi sesaat sebagai tanda bahwa
pengukuran tekanan darah berbasis mikro ATMega 8535 telah selesai atau telah didapatkan
suatu nilai sistolik dan juga diastolik.
mengukur besarnya nilai keluaran IC 7805 setelah melewati capasitor. Skema dari
pengujian rangkaian regulator tegangan 5 Volt dapat dilihat pada Gambar 4.2.
Hasil pengujian yang didapat, diketahui perubahan tekanan yang diberikan kepada
sensor berdampak juga terhadap keluaran tegangan yang dikeluarkan yaitu semakin besar
tekanan yang diberikan maka semakin besar pula tegangan yang dihasilkan sensor
sehingga dapat disimpulkan sensor yang digunakan masih dalam kondisi baik.
Dari hasil pengujian diketahui bahwa rangkaian penguat instrumentasi ini dapat
berjalan atau mengalami penguatan walaupun penguatan yang terjadi tidak sebesar 380
54
kali. Perubahan yang terjadi pada penguatan dikarenakan adanya perubahan tekanan yang
mempengaruhi besarnya nilai tegangan keluaran sensor tekanan udara.
#include <mega8535.h>
#asm
.equ __lcd_port=0x15 ; PORTC
#endasm
#include <lcd.h>
void main(void)
{
lcd_init(16);
lcd_gotoxy(4,0);
lcd_putsf("TENSIMETER");
lcd_gotoxy(4,1);
lcd_putsf("DIGITAL");
while (1) ;
}
#include <mega8535.h>
#asm
.equ __lcd_port=0x15 ; PORTC
56
#endasm
#include <lcd.h>
void main(void)
{
lcd_init(16);
lcd_gotoxy(4,0);
lcd_putsf("NAMA SAYA");
lcd_gotoxy(4,1);
lcd_putsf("DEN BHENY");
while (1) ;
}
Dari pengujian LCD ini maka dapat disimpulkan bahwa LCD dapat bekerja dengan
baik, karena hasil tampilan sudah sesuai dengan yang diinginkan oleh penulis yaitu
menampilkan tampilan “NAMA SAYA” pada baris pertama dan “DEN BHENY” pada
baris kedua di LCD.
Puncak pemompaan
250 mmHg
Tanpa adanya
pemompaan
0 mmHg
Gambar 4.5. Proses pembacaan sinyal antara 250 mmHg hingga 0 mmHg
Lonjakan sistolik
Lonjakan diastolik
tekanan sistolik dan diastolik yang terjadi. Gambar 4.7 merupakan gambar dari sinyal yang
terbaca pada osiloskop setelah sinyal disaring oleh rangkaian osilasi.
Tabel 4.3. Tampilan Tekanan Darah pada Alat Ukur dan Tampilan pada LCD
Tampilan Tekanan Darah Tampilan Tekanan Darah
No Tensimeter LCD No Tensimeter LCD
(mmHg) (mmHg) (mmHg) (mmHg)
1 0 – 20 0 - 20 13 140 140
2 30 30 14 150 150
3 40 40 15 160 160
4 50 50 16 170 170
5 60 60 17 180 180
6 70 70 18 190 190
7 80 80 19 200 200
8 90 90 20 210 210
9 100 100 21 220 220
10 110 110 22 230 230
11 120 120 23 240 240
12 130 130 24 250 250
Dari tabel 4.3 terlihat bahwa tampilan tekanan darah antara alat ukur dengan LCD
sudah sesuai dengan perancangan. Sehingga dapat disimpulkan bahwa penampil nilai
tekanan darah yang ditampilkan pada LCD sudah sesuai dengan yang diharapkan oleh
penulis, karena sudah sesuai dengan alat ukur tensimeter analog yang digunakan oleh
penulis.
60
4.3. Analisa
Proses analisa “Tensimeter Digital Berbasis Mikro ATMega 8535” dilakukan oleh
penulis dengan membandingan data dari perancangan dengan data yang diambil dari proses
pengujian secara langsung.
IC 7805
error = x 100%
61
,
error = x 100%
,
= x 100%
= 3,2 %
Dari perhitungan diatas seperti terlihat pada tabel 4.4, diketahui bahwa besarnya
error yang terjadi adalah sebesar 3,2 %. Karena error yang terjadi kurang dari 10 % maka
dapat disimpulkan bahwa rangkaian regulator tegangan 5 volt dapat berfungsi dengan
benar dan sesuai dengan tegangan yang diharapkan oleh penulis.
Dari perhitungan diatas diketahui bahwa besarnya error yang terjadi adalah sebesar
0 %. Karena error yang terjadi kurang dari 0% maka dapat disimpulkan bahwa rangkaian
regulator tegangan 5 volt dapat berfungsi dengan benar dan sesuai dengan tegangan yang
diharapkan oleh penulis.
62
Dari tabel 4.6 diketahui adanya pergeseran tegangan keluaran sensor antara
tegangan keluaran sensor perancangan dengan tegangan keluaran sensor pengujian.
Pergeseran ini terjadi karena saat pengambilan data perancangan, penulis mengambil data
keluaran sensor tanpa diberi beban (RL). Sedangkan pada tegangan keluaran pengujian
perancang mengambil data dengan sensor sudah terpasang pada sistem. Walaupun terjadi
pergeseran keluaran sensor, kenaikan dari kedua tegangan keluaran sensor ini masih
bersifat linear. Tabel 4.7 menunjukkan data pergeseran tegangan keluaran yang terjadi
pada rangkaian sensor.
Dari tabel 4.8 terlihat bahwa pada saat pengujian nilai tekanan, saat tekanan sebesar
0 mmHg besarnya nilai tegangan keluaran setelah dikuatkan didapatkan nilai sebesar 0
mV. Perubahan tegangan keluaran yang terjadi pada rangkaian penuat ini disebabkan oleh
66
adanya tegangan saturasi dari Op-Amp. Perubahan tegangan keluaran yang terjadi pada
rangkaian penguat ini akan berpengaruh juga terhadap nilai skala pengali ADC yang akan
dijelaskan pada sub bab 4.3.6.
Dari data tersebut diatas maka dapat dicari berapa besarnya error yang terjadi
antara hasil perancangan dengan hasil pengujian rangkaian oleh penulis, adapun error yang
terjadi ditunjukkan pada tabel 4.9.
67
Dari tabel 4.9 diketahui bahwa besarnya error yang terjadi lebih besar dari 10 %,
yaitu sebesar 136 %. Maka dapat disimpulkan bahwa rangkaian oscillation signal amplifier
ini tidak bekerja sesuai dengan yang diharapkan penulis didalam perancangan rangkaian
oscillation signal amplifier, sehingga berpengaruh terhadap pendeteksian dan letak dari
titik sistolik dan diastolik pengukuran tekanan darah.
signal amplifier ini tidak berjalan sesuai dengan perancangan, sehingga berpengaruh di
dalam menentukan lonjakan sistolik maupun lonjakan diastolik.
Saat dilakukan kedua pengujian tersebut diatas diketahui bahwa tanpa
menggunakan rangkaian oscillation signal amplifier sebenarnya penulis sudah
mendapatkan lonjakan tekanan sistolik maupun diastolik, yaitu saat berada pada rangkaian
instrumentation amplifier. Didalam pengujian penampil tekanan darah pada LCD, saat
pompa dipompa (diberi tekanan) hingga mencapai batas atas pemompaan (250 mmHg),
dan kemudian tekanan dikurangi hingga mencapai batas bawah pemompaan (0 mmHg),
pada penampil LCD terlihat terjadi lonjakan tekanan sistolik maupun diastolik. Hal ini
terlihat dari penampil tekanan darah pada LCD akan stabil beberapa saat setelah
ditemukannya lonjakan tekanan sistolik maupun diastolik.
4.3.6. Sub Routine Baca ADC dan Nilai Skala Pengali ADC
Sub routine baca ADC dan nilai skala pengali ADC pada pengujian mengalami
perubahan dari perancangan sebelumnya. Hal ini dikarenakan adanya pergeseran
perancangan baik itu dari keluaran sensor maupun keluaran rangkaian penguat
intrumentasi. Karena adanya perubahan ini maka penulis menghitung kembali skala ADC
agar pengukur tekanan darah yang dibuat atau didesain penulis dapat mengukur nilai
tekanan darah dan menampilkan nilai tekanan darah pada rangkaian penampil LCD (Liquid
Crystal Display).
Dari data yang diperoleh dengan melakukan pengujian (dilampirkan), diketahui
bahwa kenaikan sensor setiap 10 mmHg memiliki nilai rata – rata sebesar 0,4 mV. Pada
pengujian tegangan keluaran sensor saat batas tekanan yang bernilai 250 mmHg didapat
nilai Vout (tegangan keluaran) sensor adalah sebesar 10,4 mV. Dari pengujian yang
dilakukan didapatkan bahwa tegangan keluaran setelah dikuatkan 380 kali, batas bawah
tekanan (0 mmHg) berada pada nilai tegangan keluaran sebesar 0 mV. Sedangkan untuk
batas atas (250 mmHg) dari nilai tekanan darah adalah sebesar 3550 mV. Besarnya batas
atas tegangan keluaran sensor ini akan dijadikan penulis sebagai nilai dari vref. Dari
ketentuan - ketentuan diatas, dan dari perumusan (2.1), maka dapat dihitung besar nilai
hasil konversi ADC (dc). Untuk Vin sebesar 0 mV (batas bawah), maka nilai ADC (dc)
adalah :
( )= 1024 = 0
69
Dari perhitungan yang telah dilakukan, besar ADC (dc) yang lain terlihat di dalam
Tabel 4.10.
Dari pengujian yang telah dilakukan oleh penulis seperti terlihat dalam Tabel 4.6,
besarnya nilai rata – rata kenaikan tekanan adalah sebesar 0,4 mV. Oleh karena itu
besarnya skala pengali tiap – tiap kenaikan adalah sama. Besarnya skala pengali adalah
sebagai berikut:
Karena nilai rata – rata kenaikan tekanan besarnya 0,4mV, maka skala pengali yang
digunakan adalah sebesar 67 seperti terlihat dalam tabel 4.11.
Tabel 4.11. (Lanjutan) Nilai skala pengali tiap satu kenaikan tekanan
Skala
mmHg
pengali
190 67
200 67
210 67
220 67
230 67
240 67
250 67
Dari Tabel 4.11 diketahui besarnya skala pengali adalah 67 untuk tiap-tiap nilai
kenaikan yang sama, oleh karena itu perumusan untuk nilai tekanan (mmHg) pada Routine
Baca Nilai Tekanan adalah sebagai berikut :
mmHg = (Vout – 0) x 67
mmHg = Vout x 67
terdapat beberapa keunggulan tambahan untuk memenuhi keunggulan spesifik dari AVR.
Selain pustaka standar bahasa C, CVAVR juga mempunyai pustaka tambahan seperti
Alphanumeric LCD Modules, Delays, SPI, dan lain sebagainya. CVAVR juga mempunyai
program generator yang memungkinkan kita membuat program dengan cepat.
Berdasar pada diagram alir pada gambar 3.15, maka uraian dari program “Pengukur
Tekanan Darah (Tensimeter) Digital berbasis Mikro ATmega 8535” adalah sebagai
berikut:
4.3.4.1.Inisialisasi
Blok ini berfungsi sebagai pendefenisian dari mikrokontroler, LCD, dan juga
ADC. Adapun pendefinisian dari mikrokontroler, LCD, ADC adalah sebagai berikut:
; ---------------------------------------------------------------
; INISIALISASI
; ---------------------------------------------------------------
4.3.4.2.Tampilan Awal
Blok ini berfungsi untuk menampilkan tampilan awal (judul) dari pengukur
tekanan darah (tensimeter) digital berbasis ATMega 8535, yaitu “TENSIMETER” pada
baris pertama dan juga “DIGITAL” pada baris kedua LCD (Liquid Crystal Display).
; ---------------------------------------------------------------
; TAMPILAN AWAL
; ---------------------------------------------------------------
{
// LCD module initialization
lcd_init(16);
//tampilan awal LCD
lcd_gotoxy(4,0); //set LCD pada baris pertama kolom keempat
74
; ---------------------------------------------------------------
; BACA NILAI TEKANAN
; ---------------------------------------------------------------
; ---------------------------------------------------------------
; TAMPILKAN NILAI TEKANAN KE LCD (mmHg)
; ---------------------------------------------------------------
while (1)
{
n=0;
sistolik =0;
distolik =0;
mmHg =0;
lcd_gotoxy(0,0); //set LCD pada baris pertama kolom kesatu
lcd_putsf("TEKANAN= mmHg"); //tulis “TEKANAN= mmHg” pada LCD
lcd_gotoxy(8,0); //set LCD pada baris pertama kolom
kedelapan
lcd_putint(mmHg); //masukkan nilai dari mmHg pada LCD baris
pertama kolom kedelapan
while (mmHg == 0) //tunggu sampai ada masukan ADC
{
adc1=read_adc(0);
vout=(adc1*3.55)/1024;
mmHg= vout *67;
}
; ---------------------------------------------------------------
; ADA LONJAKAN TEKANAN
; ---------------------------------------------------------------
{
lonjakan =0;
while (lonjakan == 0)
{
lcd_gotoxy(0,0); //set LCD pada baris pertama kolom kesatu
lcd_putsf("TEKANAN= mmHg");
lcd_gotoxy(8,0);
76
lcd_putint(mmHg);
count = 700;
while (count != 0)
; ---------------------------------------------------------------
; TAMPILAN NILAI SISTOLIK DAN DIASTOLIK
; ---------------------------------------------------------------
{
// Place your code here
n=0;
sistolik =0;
distolik =0;
77
mmHg =0;
4.3.4.7.Indikator LED
Blok ini berfungsi sebagai pendeteksi ditemukannya tekanan sistolik maupun
diastolik, dengan menyalakan LED dan kemudian mematikan LED saat kedua lonjakan
tekanan tersebut ditemukan. LED akan terus menyala jika hanya salah satu lonjakan
tekanan tersebut ditemukan.
; ---------------------------------------------------------------
; INDIKATOR LED NYALA DAN PADAM
; ---------------------------------------------------------------
}
n=n+1; //increament
if (n == 1) //saat n bernilai 1
{
sistolik = mmHg;
PORTB.2=1; //led pada port B.2 nyala
lcd_gotoxy(4,1); //set LCD pada baris kedua kolom keempat
lcd_putint(sistolik); //masukkan nilai sistolik
}
else if (n == 2)
{
distolik = mmHg;
PORTB.2=0; //led pada port B.2 padam
lcd_gotoxy(8,1);
lcd_putint(distolik);
78
selesai = 1;
}
}
4.3.4.8.Indikator Buzzer
Blok ini berfungsi sebagai indikator bahwa proses pengukur tekanan darah
(tensimeter) digital berbasis mikro ATMega8535 telah selesai, sehingga jika akan
melakukan pengukuran lagi harus mereset alat dari awal.
; ---------------------------------------------------------------
; BUZZER AKTIF SESAAT
; ---------------------------------------------------------------
}
while (PIND.2 == 1) //saat port D.2 aktif
{
PORTD.5 = 1; //buzzer pada port D.5 aktif
delay_ms(30); //delay selama 30 milisekon
PORTD.5 = 0; //buzzer pada port D.5 mati
delay_ms(50);
}
}
berpengaruh terhadap nilai tekanan sistolik dan diastolik. Selain itu juga berpengaruh
terhadap indikator yang ada, seperti nyala dan padamnya LED sebagai indikator proses
pembacaan sistolik dan diastolik, bunyi buzzer sebagai indikator bahwa telah didapatkan
nilai pengukuran secara keseluruhan.
80
BAB V
KESIMPULAN DAN SARAN
5.1. Kesimpulan
Dari hasil perancangan dan pengamatan pengukur tekanan darah (tensimeter)
digital berbasis mikro ATMega8535 ini dapat disimpulkan :
1. Sensor tekanan bekerja dengan baik saat mendeteksi adanya tekanan darah,
walaupun mengalami pergeseran tegangan keluaran, tetapi pergeseran tegangan
keluaran sensor tersebut masih bersifat linier.
2. Dalam menentukan lonjakan tekanan sistolik dan diastolik menggunakan
rangkaian signal oscillation, penulis belum berhasil mendapatkan titik dari
lonjakan tekanan sistolik dan diastolik dikarenakan rangkaian osilasi sinyal
belum bekerja dengan baik.
3. Proses penampilan nilai tekanan darah pada rangkaian penampil LCD (Liquid
Crystal Display) sudah berjalan dengan baik, hal ini didukung oleh
didapatkannya nilai tekanan yang sesuai dengan alat ukur yang dibandingkan
dengan tampilan tekanan pada LCD.
5.2. Saran
Dengan ketidak sempurnaan di dalam pembuatan alat ini, maka untuk
pengembangan lebih lanjut diperlukan beberapa saran agar alat berjalan lebih baik,
meliputi :
1. Apabila terjadi tekanan akibat dari kerja jantung, maka tekanan tersebut
digunakan sebagai sinyal-sinyal untuk menentukan nilai sistolik dan diastolik.
2. Pendeteksian tekanan sistolik ataupun diastolik dapat dilakukan tanpa
menggunakan rangkaian signal oscillation, cukup menggunakan rangkaian
penguat (instrumentation amplifier). Karena pada rangkaian penguat sudah
terdeteksi adanya lonjakan tekanan sistolik maupun diastolik.
3. Agar mendapatkan nilai sistolik maupun diastolik sebaiknya penguatan lebih
besar dari 380 kali, misalnya 1000 kali. Dikarenakan semakin besar penguatan,
80
81
maka akan lebih mudah terdeteksi adanya perubahan yang terjadi pada
rangkaian sensor tekanan udara.
82
DAFTAR PUSTAKA
[1] Syaifuddin,ds,h, B.Ac., 1997, Anatomi Fisiologi untuk Siswa Perawat, Edisi 2,
EGC penerbit Buku Kedokteran, Jakarta
[2] Malvino, A, Ph.D., 1994, Prinsip Prinsip Dasar Elektronika/penerjemah :
Barmawi, M, Ph.D., Jakarta, Erlangga
[3] Wardhana, L., 2006, Belajar Sendiri Mikrokontroler AVR Seri ATMega8535,
Simulasi, Hardware, dan Aplikasi, C.V Andi Offset, Yogyakarta.
[4] Bejo, A., 2008, C & AVR Rahasia Kemudahan Bahasa C dalam Mikrokontroler
ATMega8535, Edisi Pertama, Graha Ilmu, Yogyakarta.
[5] Stanley, W.D., 1994, Operational Amplifiers With Linear Integrated Circuits, Third
Edition, Macmillan College Publishing Company Inc, New York.
[6] Blocher, R., 2004, Dasar Elektonika, C.V Andi Offset, Yogyakarta.
[7] Boylestad, R.L. Nashelsky. L., Electronic Devices and Circuit Theory, Sixth
Edition, Prentice Hall, Englewood Cliffs, New Jersey.
[8] Balai Informasi Teknologi LIPI, 2009, Artikel Hipertensi/Tekanan,
http://www.bit.lipi.go.id/pangan-
kesehatan/documents/artikel_hipertensi/tekanan_darah.pdf
[9] http://www.cardiaccentre.com
[10] http://www.totalkesehatananda.com
[11] http://www.nhlbi.nih.gov
[12] http://www.google.co.id/imglanding?q=gambar%20tensimeter&imgurl
[13] Cardiac Auscultation Essays, http:/www2.umdnj.edu
[14] ------, Data Sheet AN1571, Digital Blood Pressure Meter.
[15] ------, Data Sheet IC 7805.
[16] ------, Data Sheet LCD Hitachi HD44780U.
[17] ------, Data Sheet BPS-Pressure Sensor
[18] ------, Data Sheet ATMega8535, Atmel
[19] ------, Data Sheet LM324
LAMPIRAN
VO (mV)
0.5
1.5
2.5
0
1
2
3
0
10
20
30
40
50
60
70
80
90
100
Grafik Data Percobaan Karakteristik Sensor
110
120
130
140
Tekanan (mmHg)
150
160
170
180
190
200
210
220
230
240
250
Tabel Nilai Tekanan (mmHg) dengan Tegangan Keluaran Sensor Tekanan (mV)
/*********************************************
This program was produced by the
CodeWizardAVR V1.23.8c Standard
Automatic Program Generator
© Copyright 1998-2003 HP InfoTech s.r.l.
http://www.hpinfotech.ro
e-mail:office@hpinfotech.ro
#include <mega8535.h>
// Port B initialization
// Func0=In Func1=In Func2=Out Func3=In Func4=In Func5=In Func6=In Func7=In
// State0=T State1=T State2=0 State3=T State4=T State5=T State6=T State7=T
PORTB=0x00;
DDRB=0x04;
// Port C initialization
// Func0=In Func1=In Func2=In Func3=In Func4=In Func5=In Func6=In Func7=In
// State0=T State1=T State2=T State3=T State4=T State5=T State6=T State7=T
PORTC=0x00;
DDRC=0x00;
// Port D initialization
// Func0=In Func1=In Func2=In Func3=In Func4=In Func5=Out Func6=In Func7=In
// State0=T State1=T State2=T State3=T State4=T State5=0 State6=T State7=T
PORTD=0x00;
DDRD=0x20;
// Timer/Counter 0 initialization
// Clock source: System Clock
// Clock value: Timer 0 Stopped
// Mode: Normal top=FFh
// OC0 output: Disconnected
TCCR0=0x00;
TCNT0=0x00;
OCR0=0x00;
// Timer/Counter 1 initialization
// Clock source: System Clock
// Clock value: Timer 1 Stopped
// Mode: Normal top=FFFFh
// OC1A output: Discon.
// OC1B output: Discon.
// Noise Canceler: Off
// Input Capture on Falling Edge
TCCR1A=0x00;
TCCR1B=0x00;
TCNT1H=0x00;
TCNT1L=0x00;
OCR1AH=0x00;
OCR1AL=0x00;
OCR1BH=0x00;
OCR1BL=0x00;
// Timer/Counter 2 initialization
// Clock source: System Clock
// Clock value: Timer 2 Stopped
// Mode: Normal top=FFh
// OC2 output: Disconnected
ASSR=0x00;
TCCR2=0x00;
TCNT2=0x00;
OCR2=0x00;
// ADC initialization
// ADC Clock frequency: 125.000 kHz
// ADC Voltage Reference: AREF pin
// ADC High Speed Mode: Off
// ADC Auto Trigger Source: None
ADMUX=ADC_VREF_TYPE;
ADCSRA=0x85;
SFIOR&=0xEF;
while (1)
{
// Place your code here
n=0;
sistolik =0;
distolik =0;
mmHg =0;
lcd_gotoxy(0,0);
lcd_putsf("TEKANAN= mmHg");
lcd_gotoxy(8,0);
lcd_putint(mmHg);
lcd_gotoxy(0,1);
lcd_putsf("S/D= / mmHg");
lcd_gotoxy(4,1);
lcd_putint(sistolik);
lcd_gotoxy(8,1);
lcd_putint(distolik);
count = 700;
while (count != 0)
{
if (PIND.3 = 1) //bernilai high menandakan adanya lonjakan
{
lonjakan =1;
count =0
}
else
{
lonjakan=0;
}
n=n+1;
if (n == 1)
{
sistolik = mmHg;
PORTB.2=1; //led on
lcd_gotoxy(4,1);
lcd_putint(sistolik);
}
else if (n == 2)
{
distolik = mmHg;
PORTB.2=0; //led off
lcd_gotoxy(8,1);
lcd_putint(distolik);
selesai = 1;
}
}
while (PIND.2 == 1)
{
PORTD.5 = 1;
delay_ms(30);
PORTD.5 = 0;
delay_ms(50);
}
};
}
Hasil Pengujian Tampilan LCD dibandingkan dengan Alat Ukur
+DC Offset
+5.0V
1M
R3
U1a
11
C2
3
+
Vi
0.33 µ 1
Vo
2 LM324N
-
4
R2
150k
R1
1k
33u
C1
1
2πR1C1
f
P1 =
1
2πR3C2
f
P2 =
10
-10
-20
Attenuation (dB)
-40
-60
-70
-80
0.01 0.1 1 10 100
Frequency (Hz)
The oscillation signal varies from person to person. In indicate that, the amplification factor of the amplifier is chosen
general, it varies from less than 1 mm Hg to 3 mm Hg. From to be 150 so that the amplified oscillation signal is within the
the transfer function of MPXV5050GP, this will translate to a output limit of the amplifier (5.0 mV to 3.5 V). Figure 3 shows
voltage output of 12 mV to 36 mV signal. Since the filter gives the output from the pressure sensor and Figure 4 illustrates
an attenuation of 10 dB to the 1 Hz signal, the oscillation signal the extracted oscillation signal at the output of the amplifier.
becomes 3.8 mV to 11.4 mV respectively. Experiments
AN1571
Sensors
2 Freescale Semiconductor
3
2.5
2
Vi (Volts)
1.5
Oscillation signal is extracted here
1
0.5
0
0 5 10 15 20 25 30 35 40
Time (seconds)
3.5
MAP
3
SBP
DBP
2.5
2
Vo (Volts)
1.5
0.5
0
10 15 20 25 30 35
Time (seconds)
Figure 4. Extracted Oscillation Signal at the Output of Amplifier
Referring to the schematic, Figure 5, the MPX5050GP counts is the range of the A/D converter. VRH and VRL are the
pressure sensor is connected to PORT D bit 5 and the output reference voltage inputs to the A/D converter. The resolution
of the amplifier is connected to PORT D bit 6 of the is defined by the following:
microcontroller. This port is an input to the on-chip 8-bit Count = [(VXdcr - VRL)/(VRH - VRL)] x 255
analog-to-digital (A/D) converter. The pressure sensor
provides a signal output to the microprocessor of The count at 0 mm Hg = [(0.2 - 0)/(3.8 - 0)] x 255 ≈ 14
approximately 0.2 Vdc at 0 mm Hg to 4.7 Vdc at 375 mm Hg The count at 300 mm Hg = [(3.8 - 0)/(3.8 - 0)] x 255 ≈ 255
of applied pressure whereas the amplifier provides a signal
Therefore the resolution = 255 - 14 = 241 counts. This
from 0.005 V to 3.5 V. In order to maximize the resolution,
translates to a system that will resolve to 1.24 mm Hg.
separate voltage references should be provided for the A/D
The voltage divider consisting of R5 and R6 is connected to
instead of using the 5 V supply. In this example, the input
the +5 volts powering the system. The output of the pressure
range of the A/D converter is set at approximately 0 Vdc to 3.8
sensor is ratiometric to the voltage applied to it. The pressure
Vdc. This compresses the range of the A/D converter around
sensor and the voltage divider are connected to a common
0 mm Hg to 300 mm Hg to maximize the resolution; 0 to 255
AN1571
Sensors
Freescale Semiconductor 3
supply; this yields a system that is ratiometric. By nature of this instance when the microcontroller encounters certain error
ratiometric system, variations in the voltage of the power due to improper inflation of cuff, a low frequency tone is alarm.
supplied to the system will have no effect on the system In those instance when the measurement is successful, a high
accuracy. frequency pulsation tone will be heard. Hence, different
The liquid crystal display (LCD) is directly driven from I/O musical tone can be produced to differential each condition. In
ports A, B, and C on the microcontroller. The operation of a addition, the LED is used to indicate the presence of a heart
LCD requires that the data and backplane (BP) pins must be beat during the measurement.
driven by an alternating signal. This function is provided by a The microcontroller section of the system requires certain
software routine that toggles the data and backplane at support hardware to allow it to function. The MC34064P-5
approximately a 30 Hz rate. provides an undervoltage sense function which is used to
Other than the LCD, there are two more I/O devices that are reset the microprocessor at system power-up. The 4 MHz
connected to the pulse length converter (PLM) of the crystal provides the external portion of the oscillator function
microcontroller; a buzzer and a light emitting diode (LED). The for clocking the microcontroller and provides a stable base for
buzzer, which connected to the PLMA, can produce two time based functions, for instance calculation of pulse rate.
different frequencies; 122 Hz and 1.953 kHz tones. For
AN1571
Sensors
4 Freescale Semiconductor
Sensors
R10
Freescale Semiconductor
+5.0 V
5.0 V Regulator 10M
MC78L05ACP +5.0 V X1 +5.0 V
3 Input Output 1 4MHz
R9
2
4.7k
C3
C4
GND
C5
1 Reset Input
2
22p
22p
C6
C8
100u
9.0 V Battery
0.33u GND MC34064
100n 3
+5.0 V
16 LCD5657
17 OSC1
OSC2 16 DP1
10 /RESET 18 23
+5.0 V VDD G1 37
19 G4
R5
Buzzer /IRQ 22 36
+5.0 V F1 F4
2 22
R8
100R TCAP1 21 4 35
4.7k + 36R
TCMP1 A1
Pressure Sensor 1 TCMP2 TCAP2 23 A4
MPXV5050GP 20 B1 34
B4
3
RD 50
19 7
R6
52 TDO
15k
Vs 51 SCLK C1 DP C4
1 18 6
Vout D1 D4
LED
20 8
PLMA VRH 17 3 5
GND +5.0 V 21 VRL 7 E1 E4
PLMB
2
49 PC0 PA0 31 28
48 PC1 PA1 30 L
R4 24k 47 PC2/ECLK PA2 29 40
DP L L BP
46 PC3 PA3 28 1
45 PC4 PA4 27 BP
44 PC5 PA5 26 12 2 8
43 PC6 PA6 25 DP2 DP3
+5.0 V 42 PA7 24 27 G2 32
10k
PC7
R0
G3
26 F2 DP E F 31
14 PD0/AN0 PB0 39 F3
R3
25 30
1M
13 PD1/AN1 PB1 38 A2 A3
37
11
12 PD2/AN2 PB2 24 D 1 G A 29
C2 11 PD3/AN3 PB3 36 B2 B3
3 9 PD4/AN4 PB4 35 15 C2 11
34 C B C3
5 PD5/AN5 PB5 14 10
0.33u 1 4 PD6/AN6 PB6 33 D2 D3
LM324N 32 13 9
3 PD7/AN7 PB7 E2 E3
2 330u
C7 MC68HC05B16CFN
4
+5.0 V
R2
150k
R1
C1
33u
5
AN1571
SOFTWARE DESCRIPTION amplifier. When the subroutine TAKE senses a decrease in
CP for a continuous duration of more than 0.75 seconds, the
Upon system power-up, the user needs to manually pump
microcontroller will then assume that the user is no longer
the cuff pressure to approximately 160 mm Hg or 30 mm Hg
pumping the bulb and starts to analyze the oscillation signal.
above the previous SBP. During the pumping of the inflation
Figure 6 shows zoom-in view of a pulse.
bulb, the microcontroller ignores the signal at the output of the
450 ms
VO (volt)
1.75
Premature Pulse
First of all, the threshold level of a valid pulse is set to be microcontroller for this blood pressure meter design in this
1.75 V to eliminate noise or spike. As soon as the amplitude project.
of a pulse is identified, the microcontroller will ignore the signal • On-chip ROM space: 2 kilobytes
for 450 ms to prevent any false identification due to the • On-chip RAM space: 150 bytes
presence of premature pulse "overshoot" due to oscillation.
• 2-channel A/D converter (min.)
Hence, this algorithm can only detect pulse rate which is less
than 133 beats per minute. Next, the amplitudes of all the • 16-bit free running counter timer
pulses detected are stored in the RAM for further analysis. If • LCD driver
the microcontroller senses a non-typical oscillation envelope • On-chip EEPROM space: 32 bytes
shape, an error message (“Err”) is output to the LCD. The user • Power saving Stop and Wait modes
will have to exhaust all the pressure in the cuff before re-
pumping the CP to the next higher value. The algorithm CONCLUSION
ensures that the user exhausts all the air present in the cuff
before allowing any re-pumping. Otherwise, the venous blood This circuit design concept may be used to evaluate
trapped in the distal arm may affect the next measurement. Freescale pressure sensors used in the digital blood pressure
Therefore, the user has to reduce the pressure in the cuff as meter. This basic circuit may be easily modified to provide
soon as possible in order for the arm to recover. Figure 7 on suitable output signal level. The software may also be easily
the following page is a flowchart for the program that controls modified to provide better analysis of the SBP and DBP of a
the system. person.
AN1571
Sensors
6 Freescale Semiconductor
Main Program
Initialization
Clear I/O ports
Y Repump?
AN1571
Sensors
Freescale Semiconductor 7
How to Reach Us:
Home Page:
www.freescale.com
E-mail:
support@freescale.com
AN1571
Rev. 1
05/2005
www.fairchildsemi.com
KA78XX/KA78XXA
3-Terminal 1A Positive Voltage Regulator
Features Description
• Output Current up to 1A The KA78XX/KA78XXA series of three-terminal positive
• Output Voltages of 5, 6, 8, 9, 10, 12, 15, 18, 24V regulator are available in the TO-220/D-PAK package and
• Thermal Overload Protection with several fixed output voltages, making them useful in a
• Short Circuit Protection wide range of applications. Each type employs internal
• Output Transistor Safe Operating Area Protection current limiting, thermal shut down and safe operating area
protection, making it essentially indestructible. If adequate
heat sinking is provided, they can deliver over 1A output
current. Although designed primarily as fixed voltage
regulators, these devices can be used with external
components to obtain adjustable voltages and currents.
TO-220
1
D-PAK
1
1. Input 2. GND 3. Output
Rev. 1.0.0
©2001 Fairchild Semiconductor Corporation
KA78XX/KA78XXA
°
Operating Temperature Range (KA78XX/A/R) TOPR 0 ~ +125 C
°
Storage Temperature Range TSTG -65 ~ +150 C
KA7805
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 4.8 5.0 5.2
Output Voltage VO 5.0mA ≤ Io ≤ 1.0A, PO ≤ 15W
V
VI = 7V to 20V 4.75 5.0 5.25
VO = 7V to 25V - 4.0 100
Line Regulation (Note1) Regline TJ=+25 oC mV
VI = 8V to 12V - 1.6 50
IO = 5.0mA to1.5A - 9 100
Load Regulation (Note1) Regload TJ=+25 oC mV
IO =250mA to 750mA - 4 50
Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA
IO = 5mA to 1.0A - 0.03 0.5
Quiescent Current Change ∆IQ mA
VI= 7V to 25V - 0.3 1.3
Output Voltage Drift ∆VO/∆T IO= 5mA - -0.8 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA=+25 oC - 42 - µV/VO
f = 120Hz
Ripple Rejection RR 62 73 - dB
VO = 8V to 18V
Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - V
Output Resistance rO f = 1KHz - 15 - mΩ
Short Circuit Current ISC VI = 35V, TA =+25 oC - 230 - mA
o
Peak Current IPK TJ =+25 C - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in Vo due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
2
KA78XX/KA78XXA
KA7806
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 5.75 6.0 6.25
Output Voltage VO 5.0mA ≤ IO ≤ 1.0A, PO ≤ 15W
V
VI = 8.0V to 21V 5.7 6.0 6.3
VI = 8V to 25V - 5 120
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 9V to 13V - 1.5 60
IO =5mA to 1.5A - 9 120
Load Regulation (Note1) Regload TJ =+25 oC mV
IO =250mA to750mA - 3 60
Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA
IO = 5mA to 1A - - 0.5
Quiescent Current Change ∆IQ mA
VI = 8V to 25V - - 1.3
mV/
Output Voltage Drift ∆VO/∆T IO = 5mA - -0.8 - o
C
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 45 - µV/Vo
f = 120Hz
Ripple Rejection RR 59 75 - dB
VI = 9V to 19V
Dropout Voltage VDrop IO = 1A, TJ =+25 oC - 2 - V
Output Resistance rO f = 1KHz - 19 - mΩ
Short Circuit Current ISC VI= 35V, TA=+25 oC - 250 - mA
o
Peak Current IPK TJ =+25 C - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
3
KA78XX/KA78XXA
KA7808
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 7.7 8.0 8.3
Output Voltage VO 5.0mA ≤ IO ≤ 1.0A, PO ≤ 15W
V
VI = 10.5V to 23V 7.6 8.0 8.4
VI = 10.5V to 25V - 5.0 160
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 11.5V to 17V - 2.0 80
IO = 5.0mA to 1.5A - 10 160
Load Regulation (Note1) Regload TJ =+25 oC IO= 250mA to mV
- 5.0 80
750mA
Quiescent Current IQ TJ =+25 oC - 5.0 8.0 mA
IO = 5mA to 1.0A - 0.05 0.5
Quiescent Current Change ∆IQ mA
VI = 10.5A to 25V - 0.5 1.0
Output Voltage Drift ∆VO/∆T IO = 5mA - -0.8 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 C o
- 52 - µV/Vo
Ripple Rejection RR f = 120Hz, VI= 11.5V to 21.5V 56 73 - dB
o
Dropout Voltage VDrop IO = 1A, TJ=+25 C - 2 - V
Output Resistance rO f = 1KHz - 17 - mΩ
Short Circuit Current ISC VI= 35V, TA =+25 oC - 230 - mA
Peak Current IPK TJ =+25 oC - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
4
KA78XX/KA78XXA
KA7809
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 8.65 9 9.35
Output Voltage VO 5.0mA≤ IO ≤1.0A, PO ≤15W
V
VI= 11.5V to 24V 8.6 9 9.4
VI = 11.5V to 25V - 6 180
Line Regulation (Note1) Regline TJ=+25 oC mV
VI = 12V to 17V - 2 90
IO = 5mA to 1.5A - 12 180
Load Regulation (Note1) Regload TJ=+25 oC mV
IO = 250mA to 750mA - 4 90
Quiescent Current IQ TJ=+25 oC - 5.0 8.0 mA
IO = 5mA to 1.0A - - 0.5
Quiescent Current Change ∆IQ mA
VI = 11.5V to 26V - - 1.3
Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 58 - µV/Vo
Ripple Rejection f = 120Hz
RR 56 71 - dB
VI = 13V to 23V
Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - V
Output Resistance rO f = 1KHz - 17 - mΩ
Short Circuit Current ISC VI= 35V, TA =+25 oC - 250 - mA
Peak Current IPK TJ= +25 oC - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
5
KA78XX/KA78XXA
KA7810
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 9.6 10 10.4
Output Voltage VO 5.0mA ≤ IO ≤ 1.0A, PO ≤ 15W
V
VI = 12.5V to 25V 9.5 10 10.5
VI = 12.5V to 25V - 10 200
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 13V to 25V - 3 100
IO = 5mA to 1.5A - 12 200
Load Regulation (Note1) Regload TJ =+25 oC mV
IO = 250mA to 750mA - 4 400
Quiescent Current IQ TJ =+25 oC - 5.1 8.0 mA
IO = 5mA to 1.0A - - 0.5
Quiescent Current Change ∆IQ mA
VI = 12.5V to 29V - - 1.0
Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 58 - µV/Vo
f = 120Hz
Ripple Rejection RR 56 71 - dB
VI = 13V to 23V
Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - V
Output Resistance rO f = 1KHz - 17 - mΩ
Short Circuit Current ISC VI = 35V, TA =+25 oC - 250 - mA
Peak Current IPK TJ =+25 oC - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
6
KA78XX/KA78XXA
KA7812/KA7812R
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 11.5 12 12.5
Output Voltage VO 5.0mA ≤ IO≤1.0A, PO≤15W
V
VI = 14.5V to 27V 11.4 12 12.6
VI = 14.5V to 30V - 10 240
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 16V to 22V - 3.0 120
IO = 5mA to 1.5A - 11 240
Load Regulation (Note1) Regload TJ =+25 oC mV
IO = 250mA to 750mA - 5.0 120
Quiescent Current IQ TJ =+25 oC - 5.1 8.0 mA
IO = 5mA to 1.0A - 0.1 0.5
Quiescent Current Change ∆IQ mA
VI = 14.5V to 30V - 0.5 1.0
Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 76 - µV/Vo
f = 120Hz
Ripple Rejection RR 55 71 - dB
VI = 15V to 25V
Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - V
Output Resistance rO f = 1KHz - 18 - mΩ
Short Circuit Current ISC VI = 35V, TA =+25 oC - 230 - mA
Peak Current IPK TJ = +25 oC - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
7
KA78XX/KA78XXA
KA7815
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 14.4 15 15.6
Output Voltage VO 5.0mA ≤ IO≤1.0A, PO≤15W
V
VI = 17.5V to 30V 14.25 15 15.75
VI = 17.5V to 30V - 11 300
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 20V to 26V - 3 150
IO = 5mA to 1.5A - 12 300
Load Regulation (Note1) Regload TJ =+25 oC mV
IO = 250mA to 750mA - 4 150
Quiescent Current IQ TJ =+25 oC - 5.2 8.0 mA
IO = 5mA to 1.0A - - 0.5
Quiescent Current Change ∆IQ mA
VI = 17.5V to 30V - - 1.0
Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 90 - µV/Vo
f = 120Hz
Ripple Rejection RR 54 70 - dB
VI = 18.5V to 28.5V
Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - V
Output Resistance rO f = 1KHz - 19 - mΩ
Short Circuit Current ISC VI = 35V, TA =+25 oC - 250 - mA
Peak Current IPK TJ =+25 oC - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
8
KA78XX/KA78XXA
KA7818
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 17.3 18 18.7
Output Voltage VO 5.0mA ≤ IO ≤1.0A, PO ≤15W
V
VI = 21V to 33V 17.1 18 18.9
VI = 21V to 33V - 15 360
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 24V to 30V - 5 180
IO = 5mA to 1.5A - 15 360
Load Regulation (Note1) Regload TJ =+25 oC mV
IO = 250mA to 750mA - 5.0 180
Quiescent Current IQ TJ =+25 oC - 5.2 8.0 mA
IO = 5mA to 1.0A - - 0.5
Quiescent Current Change ∆IQ mA
VI = 21V to 33V - - 1
Output Voltage Drift ∆VO/∆T IO = 5mA - -1 - mV/ oC
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 110 - µV/Vo
f = 120Hz
Ripple Rejection RR 53 69 - dB
VI = 22V to 32V
Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - V
Output Resistance rO f = 1KHz - 22 - mΩ
Short Circuit Current ISC VI = 35V, TA =+25 oC - 250 - mA
Peak Current IPK TJ =+25 oC - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
9
KA78XX/KA78XXA
KA7824
Parameter Symbol Conditions Unit
Min. Typ. Max.
TJ =+25 oC 23 24 25
Output Voltage VO 5.0mA ≤ IO ≤ 1.0A, PO ≤ 15W
V
VI = 27V to 38V 22.8 24 25.25
VI = 27V to 38V - 17 480
Line Regulation (Note1) Regline TJ =+25 oC mV
VI = 30V to 36V - 6 240
IO = 5mA to 1.5A - 15 480
Load Regulation (Note1) Regload TJ =+25 oC mV
IO = 250mA to 750mA - 5.0 240
Quiescent Current IQ TJ =+25 oC - 5.2 8.0 mA
IO = 5mA to 1.0A - 0.1 0.5
Quiescent Current Change ∆IQ mA
VI = 27V to 38V - 0.5 1
mV/
Output Voltage Drift ∆VO/∆T IO = 5mA - -1.5 - o
C
Output Noise Voltage VN f = 10Hz to 100KHz, TA =+25 oC - 60 - µV/Vo
f = 120Hz
Ripple Rejection RR 50 67 - dB
VI = 28V to 38V
Dropout Voltage VDrop IO = 1A, TJ=+25 oC - 2 - V
Output Resistance rO f = 1KHz - 28 - mΩ
Short Circuit Current ISC VI = 35V, TA=+25 oC - 230 - mA
o
Peak Current IPK TJ =+25 C - 2.2 - A
Note:
1. Load and line regulation are specified at constant junction temperature. Changes in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
10
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
11
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
12
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
13
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
14
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
15
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
16
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
17
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
18
KA78XX/KA78XXA
Note:
1. Load and line regulation are specified at constant junction temperature. Change in VO due to heating effects must be taken
into account separately. Pulse testing with low duty is used.
19
KA78XX/KA78XXA
20
KA78XX/KA78XXA
Typical Applications
Input Output
Figure 5. DC Parameters
Input Output
Input Output
Input Output
21
KA78XX/KA78XXA
Input Output
CI
CO
Notes:
(1) To specify an output voltage. substitute voltage value for "XX." A common ground is required between the input and the Output
voltage. The input voltage must remain typically 2.0V above the output voltage even during the low point on the input ripple
voltage.
(2) CI is required if regulator is located an appreciable distance from power Supply filter.
(3) CO improves stability and transient response.
Input Output
CI
CO
I RI ≥ 5IQ
VO = VXX(1+R2/R1)+IQR2
Figure 10. Circuit for Increasing Output Voltage
Input Output
CO
CI
IRI ≥5 IQ
VO = VXX(1+R2/R1)+IQR2
Figure 11. Adjustable Output Regulator (7 to 30V)
22
KA78XX/KA78XXA
Input
Output
Input
Output
23
KA78XX/KA78XXA
Output
Input
Input Output
24
KA78XX/KA78XXA
Mechanical Dimensions
Package
TO-220
9.90 ±0.20 4.50 ±0.20
1.30 ±0.10
(8.70)
2.80 ±0.10
(1.70)
+0.10
ø3.60 ±0.10 1.30 –0.05
18.95MAX.
(3.70)
15.90 ±0.20
9.20 ±0.20
(1.46)
(3.00)
(45°
)
(1.00)
13.08 ±0.20
10.08 ±0.30
10.00 ±0.20
25
KA78XX/KA78XXA
D-PAK
6.60 ±0.20
0.70 ±0.20
5.34 ±0.30 2.30 ±0.10
(0.50) (4.34) (0.50) 0.50 ±0.10
0.60 ±0.20
6.10 ±0.20
0.91 ±0.10
9.50 ±0.30
2.70 ±0.20
MIN0.55
0.80 ±0.20
0.89 ±0.10
MAX0.96 0.76 ±0.10
0.50 ±0.10
6.60 ±0.20
(5.34)
(0.70)
(0.90)
(1.00)
(5.04)
(1.50)
(3.05)
6.10 ±0.20
(2XR0.25)
9.50 ±0.30
2.70 ±0.20
(0.10)
0.76 ±0.10
26
KA78XX/KA78XXA
Ordering Information
Product Number Output Voltage Tolerance Package Operating Temperature
KA7805 / KA7806
KA7808 / KA7809
KA7810 ±4%
KA7812 / KA7815
KA7818 / KA7824
TO-220
KA7805A / KA7806A
KA7808A / KA7809A 0 ~ + 125°C
KA7810A / KA7812A ±2%
KA7815A / KA7818A
KA7824A
KA7805R / KA7806R
KA7808R / KA7809R ±4% D-PAK
KA7812R
27
KA78XX/KA78XXA
DISCLAIMER
FAIRCHILD SEMICONDUCTOR RESERVES THE RIGHT TO MAKE CHANGES WITHOUT FURTHER NOTICE TO ANY
PRODUCTS HEREIN TO IMPROVE RELIABILITY, FUNCTION OR DESIGN. FAIRCHILD DOES NOT ASSUME ANY
LIABILITY ARISING OUT OF THE APPLICATION OR USE OF ANY PRODUCT OR CIRCUIT DESCRIBED HEREIN; NEITHER
DOES IT CONVEY ANY LICENSE UNDER ITS PATENT RIGHTS, NOR THE RIGHTS OF OTHERS.
www.fairchildsemi.com
www.DatasheetCatalog.com
Description
The HD44780U dot-matrix liquid crystal display controller and driver LSI displays alphanumerics,
Japanese kana characters, and symbols. It can be configured to drive a dot-matrix liquid crystal display
under the control of a 4- or 8-bit microprocessor. Since all the functions such as display RAM, character
generator, and liquid crystal driver, required for driving a dot-matrix liquid crystal display are internally
provided on one chip, a minimal system can be interfaced with this controller/driver.
A single HD44780U can display up to one 8-character line or two 8-character lines.
The HD44780U has pin function compatibility with the HD44780S which allows the user to easily
replace an LCD-II with an HD44780U. The HD44780U character generator ROM is extended to generate
208 5 × 8 dot character fonts and 32 5 × 10 dot character fonts for a total of 240 different character fonts.
The low power supply (2.7V to 5.5V) of the HD44780U is suitable for any portable battery-driven
product requiring low power dissipation.
Features
• 5 × 8 and 5 × 10 dot matrix possible
• Low power operation support:
2.7 to 5.5V
• Wide range of liquid crystal display driver power
3.0 to 11V
• Liquid crystal drive waveform
A (One line frequency AC waveform)
• Correspond to high speed MPU bus interface
2 MHz (when VCC = 5V)
• 4-bit or 8-bit MPU interface enabled
• 80 × 8-bit display RAM (80 characters max.)
• 9,920-bit character generator ROM for a total of 240 character fonts
208 character fonts (5 × 8 dot)
32 character fonts (5 × 10 dot)
167
HD44780U
• 64 × 8-bit character generator RAM
8 character fonts (5 × 8 dot)
4 character fonts (5 × 10 dot)
• 16-common × 40-segment liquid crystal display driver
• Programmable duty cycles
1/8 for one line of 5 × 8 dots with cursor
1/11 for one line of 5 × 10 dots with cursor
1/16 for two lines of 5 × 8 dots with cursor
• Wide range of instruction functions:
Display clear, cursor home, display on/off, cursor on/off, display character blink, cursor shift,
display shift
• Pin function compatibility with HD44780S
• Automatic reset circuit that initializes the controller/driver after power on
• Internal oscillator with external resistors
• Low power consumption
Ordering Information
Type No. Package CGROM
HD44780UA00FS FP-80B Japanese standard font
HCD44780UA00 Chip
HD44780UA00TF TFP-80F
HD44780UA02FS FP-80B European standard font
HCD44780UA02 Chip
HD44780UA02TF TFP-80F
HD44780UBxxFS FP-80B Custom font
HCD44780UBxx Chip
HD44780UBxxTF TFP-80F
Note: xx: ROM code No.
168
HD44780U
OSC1 OSC2
CL1
CL2
M
Reset
circuit
Timing
ACL CPG generator
Instruction 7
register (IR) D
8
Display COM1 to
MPU Instruction
data RAM 16-bit Common COM16
RS inter- decoder
(DDRAM) shift signal
R/W face 80 × 8 bits register driver
E
Address 7 SEG1 to
counter 40-bit 40-bit Segment SEG40
8
7 shift latch signal
DB4 to register circuit driver
DB7
7
Input/ 8 Data 8
DB0 to output register
40
DB3 buffer (DR)
8 8 LCD drive
voltage
Busy selector
flag
Character Character
Cursor
generator generator
and
RAM ROM
blink
(CGRAM) (CGROM)
controller
64 bytes 9,920 bits
GND
5 5
Parallel/serial converter
and
attribute circuit
VCC
V1 V2 V3 V4 V5
169
HD44780U
170
HD44780U
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG33
SEG34
SEG35
SEG36
SEG37
SEG38
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
SEG22 1 64 SEG39
SEG21 2 63 SEG40
SEG20 3 62 COM16
SEG19 4 61 COM15
SEG18 5 60 COM14
SEG17 6 59 COM13
SEG16 7 58 COM12
SEG15 8 57 COM11
SEG14 9 56 COM10
SEG13 10 55 COM9
SEG12 11 54 COM8
SEG11 12 FP-80B 53 COM7
SEG10 13 (Top view) 52 COM6
SEG9 14 51 COM5
SEG8 15 50 COM4
SEG7 16 49 COM3
SEG6 17 48 COM2
SEG5 18 47 COM1
SEG4 19 46 DB7
SEG3 20 45 DB6
SEG2 21 44 DB5
SEG1 22 43 DB4
GND 23 42 DB3
OSC1 24 41 DB2
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
OSC2
V1
V2
V3
V4
V5
CL1
CL2
DB0
DB1
VCC
M
D
RS
R/W
E
171
HD44780U
SEG21
SEG22
SEG23
SEG24
SEG25
SEG26
SEG27
SEG28
SEG29
SEG30
SEG31
SEG32
SEG33
SEG34
SEG35
SEG36
SEG37
SEG38
SEG39
SEG40
80
79
78
77
76
75
74
73
72
71
70
69
68
67
66
65
64
63
62
61
SEG20 1 60 COM16
SEG19 2 59 COM15
SEG18 3 58 COM14
SEG17 4 57 COM13
SEG16 5 56 COM12
SEG15 6 55 COM11
SEG14 7 54 COM10
SEG13 8 53 COM9
SEG12 9 52 COM8
SEG11 10 TFP-80F 51 COM7
SEG10 11 (Top view) 50 COM6
SEG9 12 49 COM5
SEG8 13 48 COM4
SEG7 14 47 COM3
SEG6 15 46 COM2
SEG5 16 45 COM1
SEG4 17 44 DB7
SEG3 18 43 DB6
SEG2 19 42 DB5
SEG1 20 41 DB4
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
GND
OSC1
OSC2
V1
V2
V3
V4
V5
CL1
CL2
VCC
M
D
RS
R/W
E
DB0
DB1
DB2
DB3
172
HD44780U
2 1 80 63
Type code
HD44780U
23 42
X
173
HD44780U
174
HD44780U
Pin Functions
No. of Device
Signal Lines I/O Interfaced with Function
RS 1 I MPU Selects registers.
0: Instruction register (for write) Busy flag:
address counter (for read)
1: Data register (for write and read)
R/ : 1 I MPU Selects read or write.
0: Write
1: Read
E 1 I MPU Starts data read/write.
DB4 to DB7 4 I/O MPU Four high order bidirectional tristate data bus
pins. Used for data transfer and receive
between the MPU and the HD44780U. DB7 can
be used as a busy flag.
DB0 to DB3 4 I/O MPU Four low order bidirectional tristate data bus
pins. Used for data transfer and receive
between the MPU and the HD44780U.
These pins are not used during 4-bit operation.
CL1 1 O Extension driver Clock to latch serial data D sent to the
extension driver
CL2 1 O Extension driver Clock to shift serial data D
M 1 O Extension driver Switch signal for converting the liquid crystal
drive waveform to AC
D 1 O Extension driver Character pattern data corresponding to each
segment signal
COM1 to COM16 16 O LCD Common signals that are not used are changed
to non-selection waveforms. COM9 to COM16
are non-selection waveforms at 1/8 duty factor
and COM12 to COM16 are non-selection
waveforms at 1/11 duty factor.
SEG1 to SEG40 40 O LCD Segment signals
V1 to V5 5 — Power supply Power supply for LCD drive
VCC –V5 = 11 V (max)
VCC, GND 2 — Power supply VCC: 2.7V to 5.5V, GND: 0V
OSC1, OSC2 2 — Oscillation When crystal oscillation is performed, a resistor
resistor clock must be connected externally. When the pin
input is an external clock, it must be input to
OSC1.
175
HD44780U
Function Description
Registers
The HD44780U has two 8-bit registers, an instruction register (IR) and a data register (DR).
The IR stores instruction codes, such as display clear and cursor shift, and address information for display
data RAM (DDRAM) and character generator RAM (CGRAM). The IR can only be written from the
MPU.
The DR temporarily stores data to be written into DDRAM or CGRAM and temporarily stores data to be
read from DDRAM or CGRAM. Data written into the DR from the MPU is automatically written into
DDRAM or CGRAM by an internal operation. The DR is also used for data storage when reading data
from DDRAM or CGRAM. When address information is written into the IR, data is read and then stored
into the DR from DDRAM or CGRAM by an internal operation. Data transfer between the MPU is then
completed when the MPU reads the DR. After the read, data in DDRAM or CGRAM at the next address
is sent to the DR for the next read from the MPU. By the register selector (RS) signal, these two registers
can be selected (Table 1).
When the busy flag is 1, the HD44780U is in the internal operation mode, and the next instruction will
:
not be accepted. When RS = 0 and R/ = 1 (Table 1), the busy flag is output to DB7. The next
instruction must be written after ensuring that the busy flag is 0.
The address counter (AC) assigns addresses to both DDRAM and CGRAM. When an address of an
instruction is written into the IR, the address information is sent from the IR to the AC. Selection of
either DDRAM or CGRAM is also determined concurrently by the instruction.
After writing into (reading from) DDRAM or CGRAM, the AC is automatically incremented by 1
(decremented by 1). The AC contents are then output to DB0 to DB6 when RS = 0 and R/ = 1 (Table:
1).
RS R/ : Operation
0 0 IR write as an internal operation (display clear, etc.)
0 1 Read busy flag (DB7) and address counter (DB0 to DB6)
1 0 DR write as an internal operation (DR to DDRAM or CGRAM)
1 1 DR read as an internal operation (DDRAM or CGRAM to DR)
176
HD44780U
Display data RAM (DDRAM) stores display data represented in 8-bit character codes. Its extended
capacity is 80 × 8 bits, or 80 characters. The area in display data RAM (DDRAM) that is not used for
display can be used as general data RAM. See Figure 1 for the relationships between DDRAM addresses
and positions on the liquid crystal display.
The DDRAM address (ADD) is set in the address counter (AC) as hexadecimal.
Display position
(digit) 1 2 3 4 5 79 80
DDRAM ..................
00 01 02 03 04 4E 4F
address
(hexadecimal)
Display
position 1 2 3 4 5 6 7 8
DDRAM 00 01 02 03 04 05 06 07
address
For
shift left 01 02 03 04 05 06 07 08
For
shift right 4F 00 01 02 03 04 05 06
177
HD44780U
• 2-line display (N = 1) (Figure 4)
Case 1: When the number of display characters is less than 40 × 2 lines, the two lines are
displayed from the head. Note that the first line end address and the second line start address are
not consecutive. For example, when just the HD44780 is used, 8 characters × 2 lines are displayed.
See Figure 5.
When display shift operation is performed, the DDRAM address shifts. See Figure 5.
Display
position 1 2 3 4 5 39 40
00 01 02 03 04 .................. 26 27
DDRAM
address ..................
(hexadecimal) 40 41 42 43 44 66 67
Display
position 1 2 3 4 5 6 7 8
DDRAM 00 01 02 03 04 05 06 07
address
40 41 42 43 44 45 46 47
For 01 02 03 04 05 06 07 08
shift left
41 42 43 44 45 46 47 48
For 27 00 01 02 03 04 05 06
shift right
67 40 41 42 43 44 45 46
178
HD44780U
Case 2: For a 16-character × 2-line display, the HD44780 can be extended using one 40-output
extension driver. See Figure 6.
When display shift operation is performed, the DDRAM address shifts. See Figure 6.
Display
position 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
DDRAM 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F
address
40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F
01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E 0F 10
For
shift left
41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E 4F 50
For 27 00 01 02 03 04 05 06 07 08 09 0A 0B 0C 0D 0E
shift right
67 40 41 42 43 44 45 46 47 48 49 4A 4B 4C 4D 4E
179
HD44780U
The character generator ROM generates 5 × 8 dot or 5 × 10 dot character patterns from 8-bit character
codes (Table 4). It can generate 208 5 × 8 dot character patterns and 32 5 × 10 dot character patterns.
User-defined character patterns are also available by mask-programmed ROM.
In the character generator RAM, the user can rewrite character patterns by program. For 5 × 8 dots, eight
character patterns can be written, and for 5 × 10 dots, four character patterns can be written.
Write into DDRAM the character codes at the addresses shown as the left column of Table 4 to show the
character patterns stored in CGRAM.
See Table 5 for the relationship between CGRAM addresses and data and display patterns.
Areas that are not used for display can be used as general data RAM.
180
HD44780U
Hitachi User
Start
Computer Determine
1
processing character patterns
EPROM → Hitachi 4
No
OK?
Yes
Art work
M/T
Masking
Trial
Sample
Sample 6
evaluation
No
OK?
Yes
Mass
production
Note: For a description of the numbers used in this figure, refer to the preceding page.
181
HD44780U
• Programming character patterns
This section explains the correspondence between addresses and data used to program character
patterns in EPROM. The HD44780U character generator ROM can generate 208 5 × 8 dot character
patterns and 32 5 × 10 dot character patterns for a total of 240 different character patterns.
Character patterns
EPROM address data and character pattern data correspond with each other to form a 5 × 8 or 5 ×
10 dot character pattern (Tables 2 and 3).
Table 2 Example of Correspondence between EPROM Address Data and Character Pattern
(5 × 8 Dots)
LSB
A 1 1A 1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 O 4 O3 O2 O1 O0
0 0 0 0 1 0 0 0 0
0 0 0 1 1 0 0 0 0
0 0 1 0 1 0 1 1 0
0 0 1 1 1 1 0 0 1
0 1 0 0 1 0 0 0 1
0 1 0 1 1 0 0 0 1
0 1 1 0 1 1 1 1 0
0 1 1 0 0 0 1 0 0 1 1 1 0 0 0 0 0 Cursor position
1 0 0 0 0 0 0 0 0
1 0 0 1 0 0 0 0 0
1 0 1 0 0 0 0 0 0
1 0 1 1 0 0 0 0 0
1 1 0 0 0 0 0 0 0
1 1 0 1 0 0 0 0 0
1 1 1 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0
Character code Line
position
182
HD44780U
Handling unused character patterns
1. EPROM data outside the character pattern area: Always input 0s.
2. EPROM data in CGRAM area: Always input 0s. (Input 0s to EPROM addresses 00H to FFH.)
3. EPROM data used when the user does not use any HD44780U character pattern: According to
the user application, handled in one of the two ways listed as follows.
a. When unused character patterns are not programmed: If an unused character code is written
into DDRAM, all its dots are lit. By not programing a character pattern, all of its bits become
lit. (This is due to the EPROM being filled with 1s after it is erased.)
b. When unused character patterns are programmed as 0s: Nothing is displayed even if unused
character codes are written into DDRAM. (This is equivalent to a space.)
Table 3 Example of Correspondence between EPROM Address Data and Character Pattern
(5 × 10 Dots)
LSB
A 1 1A 1 0 A9 A8 A7 A6 A5 A4 A3 A2 A1 A0 O 4 O3 O2 O1 O0
0 0 0 0 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 1 0 0 1 1 0 1
0 0 1 1 1 0 0 1 1
0 1 0 0 1 0 0 0 1
0 1 0 1 1 0 0 0 1
0 1 1 0 0 1 1 1 1
0 1 0 1 0 0 1 0 0 1 1 1 0 0 0 0 1
1 0 0 0 0 0 0 0 1
1 0 0 1 0 0 0 0 1
1 0 1 0 0 0 0 0 0 Cursor position
1 0 1 1 0 0 0 0 0
1 1 0 0 0 0 0 0 0
1 1 0 1 0 0 0 0 0
1 1 1 0 0 0 0 0 0
1 1 1 1 0 0 0 0 0
Character code Line
position
183
HD44780U
Table 4 Correspondence between Character Codes and Character Patterns (ROM Code: A00)
Upper 4
Lower Bits 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
4 Bits
CG
RAM
xxxx0000 (1)
xxxx0001 (2)
xxxx0010 (3)
xxxx0011 (4)
xxxx0100 (5)
xxxx0101 (6)
xxxx0110 (7)
xxxx0111 (8)
xxxx1000 (1)
xxxx1001 (2)
xxxx1010 (3)
xxxx1011 (4)
xxxx1100 (5)
xxxx1101 (6)
xxxx1110 (7)
xxxx1111 (8)
Note: The user can specify any pattern for character-generator RAM.
184
HD44780U
Table 4 Correspondence between Character Codes and Character Patterns (ROM Code: A02)
Upper 4
Lower Bits 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111
4 Bits
CG
xxxx0000 RAM
(1)
xxxx0001 (2)
xxxx0010 (3)
xxxx0011 (4)
xxxx0100 (5)
xxxx0101 (6)
xxxx0110 (7)
xxxx0111 (8)
xxxx1000 (1)
xxxx1001 (2)
xxxx1010 (3)
xxxx1011 (4)
xxxx1100 (5)
xxxx1101 (6)
xxxx1110 (7)
xxxx1111 (8)
185
HD44780U
Table 5 Relationship between CGRAM Addresses, Character Codes (DDRAM) and Character
Patterns (CGRAM Data)
0 0 0 * * * 1 1 1 1 0
0 0 1 1 0 0 0 1
0 1 0 1 0 0 0 1
Character
0 1 1 1 1 1 1 0 pattern (1)
0 0 0 0 * 0 0 0 0 0 0
1 0 0 1 0 1 0 0
1 0 1 1 0 0 1 0
1 1 0 1 0 0 0 1
1 1 1 * * * 0 0 0 0 0 Cursor position
0 0 0 * * * 1 0 0 0 1
0 0 1 0 1 0 1 0
0 1 0 1 1 1 1 1
Character
0 1 1 0 0 1 0 0
0 0 0 0 * 0 0 1 0 0 1 pattern (2)
1 0 0 1 1 1 1 1
1 0 1 0 0 1 0 0
1 1 0 0 0 1 0 0
1 1 1 * * * 0 0 0 0 0 Cursor position
0 0 0 * * *
0 0 1
0 0 0 0 * 1 1 1 1 1 1
1 0 0
1 0 1
1 1 0
1 1 1 * * *
Notes: 1. Character code bits 0 to 2 correspond to CGRAM address bits 3 to 5 (3 bits: 8 types).
2. CGRAM address bits 0 to 2 designate the character pattern line position. The 8th line is the
cursor position and its display is formed by a logical OR with the cursor.
Maintain the 8th line data, corresponding to the cursor display position, at 0 as the cursor
display.
If the 8th line data is 1, 1 bits will light up the 8th line regardless of the cursor presence.
3. Character pattern row positions correspond to CGRAM data bits 0 to 4 (bit 4 being at the left).
4. As shown Table 5, CGRAM character patterns are selected when character code bits 4 to 7 are
all 0. However, since character code bit 3 has no effect, the R display example above can be
selected by either character code 00H or 08H.
5. 1 for CGRAM data corresponds to display selection and 0 to non-selection.
* Indicates no effect.
186
HD44780U
Table 5 Relationship between CGRAM Addresses, Character Codes (DDRAM) and Character
Patterns (CGRAM Data) (cont)
0 0 0 0 * * * 0 0 0 0 0
0 0 0 1 0 0 0 0 0
0 0 1 0 1 0 1 1 0
0 0 1 1 1 1 0 0 1
0 1 0 0 1 0 0 0 1 Character
0 0 0 0 * 0 0 * 0 0 0 1 0 1 1 0 0 0 1 pattern
0 1 1 0 1 1 1 1 0
0 1 1 1 1 0 0 0 0
1 0 0 0 1 0 0 0 0
1 0 0 1 1 0 0 0 0
1 0 1 0 * * * 0 0 0 0 0 Cursor position
1 0 1 1 * * * * * * * *
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1 * * * * * * * *
0 0 0 0 * * *
0 0 0 1
0 0 0 0 * 1 1 * 1 1 1 0 0 1
1 0 1 0 * * *
1 0 1 1 * * * * * * * *
1 1 0 0
1 1 0 1
1 1 1 0
1 1 1 1 * * * * * * * *
Notes: 1. Character code bits 1 and 2 correspond to CGRAM address bits 4 and 5 (2 bits: 4 types).
2. CGRAM address bits 0 to 3 designate the character pattern line position. The 11th line is the
cursor position and its display is formed by a logical OR with the cursor.
Maintain the 11th line data corresponding to the cursor display positon at 0 as the cursor
display.
If the 11th line data is “1”, “1” bits will light up the 11th line regardless of the cursor presence.
Since lines 12 to 16 are not used for display, they can be used for general data RAM.
3. Character pattern row positions are the same as 5 × 8 dot character pattern positions.
4. CGRAM character patterns are selected when character code bits 4 to 7 are all 0.
However, since character code bits 0 and 3 have no effect, the P display example above can be
selected by character codes 00H, 01H, 08H, and 09H.
5. 1 for CGRAM data corresponds to display selection and 0 to non-selection.
* Indicates no effect.
187
HD44780U
The timing generation circuit generates timing signals for the operation of internal circuits such as
DDRAM, CGROM and CGRAM. RAM read timing for display and internal operation timing by MPU
access are generated separately to avoid interfering with each other. Therefore, when writing data to
DDRAM, for example, there will be no undesirable interferences, such as flickering, in areas other than
the display area.
The liquid crystal display driver circuit consists of 16 common signal drivers and 40 segment signal
drivers. When the character font and number of lines are selected by a program, the required common
signal drivers automatically output drive waveforms, while the other common signal drivers continue to
output non-selection waveforms.
Sending serial data always starts at the display data character pattern corresponding to the last address of
the display data RAM (DDRAM).
Since serial data is latched when the display data character pattern corresponding to the starting address
enters the internal shift register, the HD44780U drives from the head display.
The cursor/blink control circuit generates the cursor or character blinking. The cursor or the blinking will
appear with the digit located at the display data RAM (DDRAM) address set in the address counter (AC).
For example (Figure 8), when the address counter is 08H, the cursor position is displayed at DDRAM
address 08H.
AC 0 0 0 1 0 0 0
Display position 1 2 3 4 5 6 7 8 9 10 11
00 01 02 03 04 05 06 07 08 09 0A
DDRAM address
(hexadecimal)
40 41 42 43 44 45 46 47 48 49 4A
cursor position
Note: The cursor or blinking appears when the address counter (AC) selects the character
generator RAM (CGRAM). However, the cursor and blinking become meaningless.
The cursor or blinking is displayed in the meaningless position when the AC is a CGRAM address.
188
HD44780U
• For 4-bit interface data, only four bus lines (DB4 to DB7) are used for transfer. Bus lines DB0 to DB3
are disabled. The data transfer between the HD44780U and the MPU is completed after the 4-bit data
has been transferred twice. As for the order of data transfer, the four high order bits (for 8-bit
operation, DB4 to DB7) are transferred before the four low order bits (for 8-bit operation, DB0 to
DB3).
The busy flag must be checked (one instruction) after the 4-bit data has been transferred twice. Two
more 4-bit operations then transfer the busy flag and address counter data.
• For 8-bit interface data, all eight bus lines (DB0 to DB7) are used.
RS
R/W
Instruction register (IR) Busy flag (BF) and Data register (DR)
write address counter (AC) read
read
189
HD44780U
Reset Function
An internal reset circuit automatically initializes the HD44780U when the power is turned on. The
following instructions are executed during the initialization. The busy flag (BF) is kept in the busy state
until the initialization ends (BF = 1). The busy state lasts for 10 ms after VCC rises to 4.5 V.
1. Display clear
2. Function set:
DL = 1; 8-bit interface data
N = 0; 1-line display
F = 0; 5 × 8 dot character font
3. Display on/off control:
D = 0; Display off
C = 0; Cursor off
B = 0; Blinking off
4. Entry mode set:
I/D = 1; Increment by 1
S = 0; No shift
Note: If the electrical characteristics conditions listed under the table Power Supply Conditions Using
Internal Reset Circuit are not met, the internal reset circuit will not operate normally and will fail
to initialize the HD44780U. For such a case, initial-ization must be performed by the MPU as
explained in the section, Initializing by Instruction.
Instructions
Outline
Only the instruction register (IR) and the data register (DR) of the HD44780U can be controlled by the
MPU. Before starting the internal operation of the HD44780U, control information is temporarily stored
into these registers to allow interfacing with various MPUs, which operate at different speeds, or various
peripheral control devices. The internal operation of the HD44780U is determined by signals sent from
the MPU. These signals, which include register selection signal (RS), read/
:
write signal (R/ ), and the data bus (DB0 to DB7), make up the HD44780U instructions (Table 6). There
are four categories of instructions that:
190
HD44780U
Normally, instructions that perform data transfer with internal RAM are used the most. However, auto-
incrementation by 1 (or auto-decrementation by 1) of internal HD44780U RAM addresses after each data
write can lighten the program load of the MPU. Since the display shift instruction (Table 11) can perform
concurrently with display data write, the user can minimize system development time with maximum
programming efficiency.
When an instruction is being executed for internal operation, no instruction other than the busy
flag/address read instruction can be executed.
Because the busy flag is set to 1 while an instruction is being executed, check it to make sure it is 0
before sending another instruction from the MPU.
Note: Be sure the HD44780U is not in the busy state (BF = 0) before sending an instruction from the
MPU to the HD44780U. If an instruction is sent without checking the busy flag, the time between
the first instruction and next instruction will take much longer than the instruction time itself.
Refer to Table 6 for the list of each instruc-tion execution time.
Table 6 Instructions
Execution Time
Code (max) (when fcp or
Instruction RS R/ : DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Description fOSC is 270 kHz)
Clear 0 0 0 0 0 0 0 0 0 1 Clears entire display and sets
display DDRAM address 0 in address
counter.
Return 0 0 0 0 0 0 0 0 1 — Sets DDRAM address 0 in 1.52 ms
home address counter. Also returns
display from being shifted to
original position. DDRAM
contents remain unchanged.
Entry 0 0 0 0 0 0 0 1 I/D S Sets cursor move direction 37 µs
mode set and specifies display shift.
These operations are
performed during data write
and read.
Display 0 0 0 0 0 0 1 D C B Sets entire display (D) on/off, 37 µs
on/off cursor on/off (C), and blinking
control of cursor position character
(B).
Cursor or 0 0 0 0 0 1 S/C R/L — — Moves cursor and shifts 37 µs
display display without changing
shift DDRAM contents.
Function 0 0 0 0 1 DL N F — — Sets interface data length 37 µs
set (DL), number of display lines
(N), and character font (F).
Set 0 0 0 1 ACG ACG ACG ACG ACG ACG Sets CGRAM address. 37 µs
CGRAM CGRAM data is sent and
address received after this setting.
Set 0 0 1 ADD ADD ADD ADD ADD ADD ADD Sets DDRAM address. 37 µs
DDRAM DDRAM data is sent and
address received after this setting.
Read busy 0 1 BF AC AC AC AC AC AC AC Reads busy flag (BF) 0 µs
flag & indicating internal operation is
address being performed and reads
address counter contents.
191
HD44780U
Table 6 Instructions (cont)
Execution Time
Code (max) (when fcp or
Instruction RS R/ : DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Description fOSC is 270 kHz)
Write data 1 0 Write data Writes data into DDRAM or 37 µs
to CG or CGRAM. tADD = 4 µs*
DDRAM
Read data 1 1 Read data Reads data from DDRAM or 37 µs
from CG or CGRAM. tADD = 4 µs*
DDRAM
I/D = 1: Increment DDRAM: Display data RAM Execution time
I/D = 0: Decrement CGRAM: Character generator changes when
S = 1: Accompanies display shift RAM frequency changes
S/C = 1: Display shift ACG: CGRAM address Example:
S/C = 0: Cursor move ADD: DDRAM address When fcp or fOSC is
R/L = 1: Shift to the right (corresponds to cursor
250 kHz,
R/L = 0: Shift to the left address) 270
37 µs × = 40 µs
DL = 1: 8 bits, DL = 0: 4 bits AC: Address counter used for 250
N = 1: 2 lines, N = 0: 1 line both DD and CGRAM
F = 1: 5 × 10 dots, F = 0: 5 × 8 dots addresses
BF = 1: Internally operating
BF = 0: Instructions acceptable
Note: — indicates no effect.
* After execution of the CGRAM/DDRAM data write or read instruction, the RAM address counter
is incremented or decremented by 1. The RAM address counter is updated after the busy flag
turns off. In Figure 10, tADD is the time elapsed after the busy flag turns off until the address
counter is updated.
Address counter
(DB0 to DB6 pins) A A+1
t ADD
192
HD44780U
Instruction Description
Clear Display
Clear display writes space code 20H (character pattern for character code 20H must be a blank pattern)
into all DDRAM addresses. It then sets DDRAM address 0 into the address counter, and returns the
display to its original status if it was shifted. In other words, the display disappears and the cursor or
blinking goes to the left edge of the display (in the first line if 2 lines are displayed). It also sets I/D to 1
(increment mode) in entry mode. S of entry mode does not change.
Return Home
Return home sets DDRAM address 0 into the address counter, and returns the display to its original status
if it was shifted. The DDRAM contents do not change.
The cursor or blinking go to the left edge of the display (in the first line if 2 lines are displayed).
I/D: Increments (I/D = 1) or decrements (I/D = 0) the DDRAM address by 1 when a character code is
written into or read from DDRAM.
The cursor or blinking moves to the right when incremented by 1 and to the left when decremented by 1.
The same applies to writing and reading of CGRAM.
S: Shifts the entire display either to the right (I/D = 0) or to the left (I/D = 1) when S is 1. The display
does not shift if S is 0.
If S is 1, it will seem as if the cursor does not move but the display does. The display does not shift when
reading from DDRAM. Also, writing into or reading out from CGRAM does not shift the display.
D: The display is on when D is 1 and off when D is 0. When off, the display data remains in DDRAM,
but can be displayed instantly by setting D to 1.
C: The cursor is displayed when C is 1 and not displayed when C is 0. Even if the cursor disappears, the
function of I/D or other specifications will not change during display data write. The cursor is displayed
using 5 dots in the 8th line for 5 × 8 dot character font selection and in the 11th line for the 5 × 10 dot
character font selection (Figure 13).
B: The character indicated by the cursor blinks when B is 1 (Figure 13). The blinking is displayed as
switching between all blank dots and displayed characters at a speed of 409.6-ms intervals when f cp or fOSC
is 250 kHz. The cursor and blinking can be set to display simultaneously. (The blinking frequency
changes according to fOSC or the reciprocal of fcp. For example, when fcp is 270 kHz, 409.6 × 250/270 =
379.2 ms.)
193
HD44780U
Cursor or display shift shifts the cursor position or display to the right or left without writing or reading
display data (Table 7). This function is used to correct or search the display. In a 2-line display, the
cursor moves to the second line when it passes the 40th digit of the first line. Note that the first and
second line displays will shift at the same time.
When the displayed data is shifted repeatedly each line moves only horizontally. The second line display
does not shift into the first line position.
The address counter (AC) contents will not change if the only action performed is a display shift.
Function Set
DL: Sets the interface data length. Data is sent or received in 8-bit lengths (DB7 to DB0) when DL is 1,
and in 4-bit lengths (DB7 to DB4) when DL is 0.When 4-bit length is selected, data must be sent or
received twice.
Note: Perform the function at the head of the program before executing any instructions (except for the
read busy flag and address instruction). From this point, the function set instruction cannot be
executed unless the interface data length is changed.
Set CGRAM address sets the CGRAM address binary AAAAAA into the address counter.
194
HD44780U
Clear
Code 0 0 0 0 0 0 0 0 0 1
display
Entry
Code 0 0 0 0 0 0 0 0 0 1
mode set
Display
Code 0 0 0 0 0 0 0 0 0 1
on/off control
Figure 11
Cursor or
Code 0 0 0 0 0 1 S/C R/L * * Note: * Don’t care.
display shift
Set CGRAM 0 0 0 0 A A A A A A
Code
address
Higher Lower
order bit order bit
Figure 12
195
HD44780U
Set DDRAM address sets the DDRAM address binary AAAAAAA into the address counter.
However, when N is 0 (1-line display), AAAAAAA can be 00H to 4FH. When N is 1 (2-line display),
AAAAAAA can be 00H to 27H for the first line, and 40H to 67H for the second line.
Read busy flag and address reads the busy flag (BF) indicating that the system is now internally operating
on a previously received instruction. If BF is 1, the internal operation is in progress. The next instruction
will not be accepted until BF is reset to 0. Check the BF status before the next write operation. At the
same time, the value of the address counter in binary AAAAAAA is read out. This address counter is
used by both CG and DDRAM addresses, and its value is determined by the previous instruction. The
address contents are the same as for instructions set CGRAM address and set DDRAM address.
S/C R/L
0 0 Shifts the cursor position to the left. (AC is decremented by one.)
0 1 Shifts the cursor position to the right. (AC is incremented by one.)
1 0 Shifts the entire display to the left. The cursor follows the display shift.
1 1 Shifts the entire display to the right. The cursor follows the display shift.
No. of
Display Duty
N F Lines Character Font Factor Remarks
0 0 1 5 × 8 dots 1/8
0 1 1 5 × 10 dots 1/11
1 * 2 5 × 8 dots 1/16 Cannot display two lines for 5 × 10 dot character font
Note: * Indicates don’t care.
196
HD44780U
Cursor
Figure 14
197
HD44780U
To write into CG or DDRAM is determined by the previous specification of the CGRAM or DDRAM
address setting. After a write, the address is automatically incremented or decremented by 1 according to
the entry mode. The entry mode also determines the display shift.
Read data from CG or DDRAM reads 8-bit binary data DDDDDDDD from CG or DDRAM.
The previous designation determines whether CG or DDRAM is to be read. Before entering this read
instruction, either CGRAM or DDRAM address set instruction must be executed. If not executed, the first
read data will be invalid. When serially executing read instructions, the next address data is normally
read from the second read. The address set instructions need not be executed just before this read
instruction when shifting the cursor by the cursor shift instruction (when reading out DDRAM). The
operation of the cursor shift instruction is the same as the set DDRAM address instruction.
After a read, the entry mode automatically increases or decreases the address by 1. However, display shift
is not executed regardless of the entry mode.
Note: The address counter (AC) is automatically incremented or decremented by 1 after the write
instructions to CGRAM or DDRAM are executed. The RAM data selected by the AC cannot be
read out at this time even if read instructions are executed. Therefore, to correctly read data,
execute either the address set instruction or cursor shift instruction (only with DDRAM), then just
before reading the desired data, execute the read instruction from the second time the read
instruction is sent.
Write data to
Code 1 0 D D D D D D D D
CG or DDRAM
Higher Lower
order bits order bits
Figure 15
198
HD44780U
Interface to MPUs
RS
R/W
Internal
operation
DB7
write
Data
Instruction
P30 to P37
P77
P76
P75
Functioning
Busy
Busy flag
check
8
Busy
Busy flag
check
H8/325
E
RS
R/W
HD44780U
DB0 to DB7
Not
busy
Busy flag
COM1 to
COM16
SEG1 to
SEG40
16
40
Data
Instruction
write
LCD
199
HD44780U
• Interfacing to a 4-bit MPU
The HD44780U can be connected to the I/O port of a 4-bit MPU. If the I/O port has enough bits, 8-bit
data can be transferred. Otherwise, one data transfer must be made in two operations for 4-bit data. In
this case, the timing sequence becomes somewhat complex. (See Figure 18.)
See Figure 19 for an interface example to the HMCS4019R.
Note that two cycles are needed for the busy flag check as well as for the data transfer. The 4-bit
operation is selected by the program.
RS
R/W
E
Internal
operation
Instruction
write
Functioning
Busy AC3
Busy flag
check
Note: IR7 , IR3 are the 7th and 3rd bits of the instruction.
AC3 is the 3rd bit of the address counter.
HMCS4019R
D15
D14
D13
R10 to R13
4
RS
R/W
E
Not
busy AC3
Busy flag
check
HD44780
DB4 to DB7
COM1 to
COM16
SEG1 to
SEG40
16
40
D7 D3
Instruction
write
LCD
200
HD44780U
Character Font and Number of Lines: The HD44780U can perform two types of displays, 5 × 8 dot
and 5 × 10 dot character fonts, each with a cursor.
Up to two lines are displayed for 5 × 8 dots and one line for 5 × 10 dots. Therefore, a total of three
The number of lines and font types can be selected by the program. (See Table 6, Instructions.)
Connection to HD44780 and Liquid Crystal Display: See Figure 20 for the connection examples.
HD44780
COM1
COM8
SEG1
SEG40
Example of a 5 × 8 dot, 8-character × 1-line display (1/4 bias, 1/8 duty cycle)
HD44780
COM1
COM11
SEG1
SEG40
Example of a 5 × 10 dot, 8-character × 1-line display (1/4 bias, 1/11 duty cycle)
201
HD44780U
Since five segment signal lines can display one digit, one HD44780U can display up to 8 digits for a 1-
line display and 16 digits for a 2-line display.
The examples in Figure 20 have unused common signal pins, which always output non-selection
waveforms. When the liquid crystal display panel has unused extra scanning lines, connect the extra
scanning lines to these common signal pins to avoid any undesirable effects due to crosstalk during the
floating state (Figure 21).
HD44780
COM1
COM8
COM9
COM16
SEG1
SEG40
Example of a 5 × 8 dot, 8-character × 2-line display (1/5 bias, 1/16 duty cycle)
Cursor
202
HD44780U
Connection of Changed Matrix Layout: In the preceding examples, the number of lines correspond to
the scanning lines. However, the following display examples (Figure 22) are made possible by altering
the matrix layout of the liquid crystal display panel. In either case, the only change is the layout. The
display characteristics and the number of liquid crystal display characters depend on the number of
common signals or on duty factor. Note that the display data RAM (DDRAM) addresses for 4 characters
× 2 lines and for 16 characters × 1 line are the same as in Figure 20.
Cursor
203
HD44780U
VLCD is the peak value for the liquid crystal display drive waveforms, and resistance dividing provides
voltages V1 to V5 (Figure 23).
Table 10 Duty Factor and Power Supply for Liquid Crystal Display Drive
Duty Factor
1/8, 1/11 1/16
Bias
Power Supply 1/4 1/5
V1 VCC–1/4 VLCD VCC–1/5 VLCD
V2 VCC–1/2 VLCD VCC–2/5 VLCD
V3 VCC–1/2 VLCD VCC–3/5 VLCD
V4 VCC–3/4 VLCD VCC–4/5 VLCD
V5 VCC–VLCD VCC–VLCD
VCC VCC
R R
V1 V1
R
V2 R V2
VLCD R VLCD
V3 R V3
V4 R
V4
R R
V5 V5
VR VR
–5 V –5 V
1/4 bias 1/5 bias
(1/8, 1/11 duty cycle) (1/16, duty cycle)
204
HD44780U
COM1
1 2 3 4 8 1 2
VCC
V1
V2 (V3)
V4
V5
1 frame
COM1
1 2 3 4 11 1 2
VCC
V1
V2 (V3)
V4
V5
1 frame
COM1
1 2 3 4 16 1 2
VCC
V1
V2
V3
V4
V5
1 frame
205
HD44780U
Note: When using the internal reset, the electrical characteristics in the Power Supply Conditions Using
Internal Reset Circuit table must be satisfied. If not, the HD44780U must be initialized by
instructions. See the section, Initializing by Instruction.
206
HD44780U
Table 11 8-Bit Operation, 8-Digit × 1-Line Display Example with Internal Reset
Instruction
Step
No. RS R/ : DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display Operation
1 Power supply on (the HD44780U is initialized by the internal Initialized. No display.
reset circuit)
2 Function set Sets to 8-bit operation and
0 0 0 0 1 1 0 0 * * selects 1-line display and 5 × 8
dot character font. (Number of
display lines and character fonts
cannot be changed after step
#2.)
3 Display on/off control Turns on display and cursor.
_
0 0 0 0 0 0 1 1 1 0 Entire display is in space mode
because of initialization.
4 Entry mode set Sets mode to increment the
_
0 0 0 0 0 0 0 1 1 0 address by one and to shift the
cursor to the right at the time of
write to the DD/CGRAM.
Display is not shifted.
5 Write data to CGRAM/DDRAM Writes H. DDRAM has already
H_
1 0 0 1 0 0 1 0 0 0 been selected by initialization
when the power was turned on.
The cursor is incremented by
one and shifted to the right.
6 Write data to CGRAM/DDRAM Writes I.
HI_
1 0 0 1 0 0 1 0 0 1
7 · ·
· ·
· ·
· ·
· ·
8 Write data to CGRAM/DDRAM Writes I.
HITACHI_
1 0 0 1 0 0 1 0 0 1
9 Entry mode set Sets mode to shift display at the
HITACHI_
0 0 0 0 0 0 0 1 1 1 time of write.
10 Write data to CGRAM/DDRAM Writes a space.
ITACHI _
1 0 0 0 1 0 0 0 0 0
207
HD44780U
Table 11 8-Bit Operation, 8-Digit × 1-Line Display Example with Internal Reset (cont)
Instruction
Step
No. RS R/ : DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display Operation
11 Write data to CGRAM/DDRAM Writes M.
1 0 0 1 0 0 1 1 0 1 Cursor
12 · ·
· ·
· ·
· ·
· ·
13 Write data to CGRAM/DDRAM Writes O.
MICROKO_
1 0 0 1 0 0 1 1 1 1
14 Cursor or display shift Shifts only the cursor position to
MICROKO
_
0 0 0 0 0 1 0 0 * * the left.
15 Cursor or display shift Shifts only the cursor position to
MICROKO
_
0 0 0 0 0 1 0 0 * * the left.
16 Write data to CGRAM/DDRAM Writes C over K.
ICROCO
_
1 0 0 1 0 0 0 0 1 1 The display moves to the left.
17 Cursor or display shift Shifts the display and cursor
MICROCO
_
0 0 0 0 0 1 1 1 * * position to the right.
18 Cursor or display shift Shifts the display and cursor
MICROCO_
0 0 0 0 0 1 0 1 * * position to the right.
19 Write data to CGRAM/DDRAM Writes M.
ICROCOM_
1 0 0 1 0 0 1 1 0 1
20 · ·
· ·
· ·
· ·
· ·
21 Return home Returns both display and cursor
HITACHI
_
0 0 0 0 0 0 0 0 1 0 to the original position (address
0).
208
HD44780U
Table 12 4-Bit Operation, 8-Digit × 1-Line Display Example with Internal Reset
Instruction
Step
No. RS R/ : DB7 DB6 DB5 DB4 Display Operation
1 Power supply on (the HD44780U is initialized by the internal Initialized. No display.
reset circuit)
2 Function set Sets to 4-bit operation.
0 0 0 0 1 0 In this case, operation is
handled as 8 bits by initializa-
tion, and only this instruction
completes with one write.
3 Function set Sets 4-bit operation and selects
0 0 0 0 1 0 1-line display and 5 × 8 dot
0 0 0 0 * * character font. 4-bit operation
starts from this step and
resetting is necessary. (Number
of display lines and character
fonts cannot be changed after
step #3.)
4 Display on/off control Turns on display and cursor.
_
0 0 0 0 0 0 Entire display is in space mode
0 0 1 1 1 0 because of initialization.
5 Entry mode set Sets mode to increment the
0 0 0 0 0 0 address by one and to shift the
0 0 0 1 1 0 cursor to the right at the time of
write to the DD/CGRAM.
Display is not shifted.
6 Write data to CGRAM/DDRAM Writes H.
H_
1 0 0 1 0 0 The cursor is incremented by
1 0 1 0 0 0 one and shifts to the right.
Note: The control is the same as for 8-bit operation beyond step #6.
209
HD44780U
Table 13 8-Bit Operation, 8-Digit × 2-Line Display Example with Internal Reset
Instruction
Step
No. RS R/ : DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display Operation
1 Power supply on (the HD44780U is initialized by the internal Initialized. No display.
reset circuit)
210
HD44780U
Table 13 8-Bit Operation, 8-Digit × 2-Line Display Example with Internal Reset (cont)
Instruction
Step
No. RS R/: DB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 Display Operation
9 Write data to CGRAM/DDRAM HITACHI Writes M.
1 0 0 1 0 0 1 1 0 1 M_
10 · ·
· ·
· ·
· ·
· ·
11 Write data to CGRAM/DDRAM HITACHI Writes O.
1 0 0 1 0 0 1 1 1 1 MICROCO_
211
HD44780U
Initializing by Instruction
If the power supply conditions for correctly operating the internal reset circuit are not met, initialization
by instructions becomes necessary.
Refer to Figures 25 and 26 for the procedures on 8-bit and 4-bit initializations, respectively.
Power on
RS R/WDB7 DB6 DB5 DB4 DB3DB2 DB1 DB0 BF cannot be checked before this instruction.
0 0 0 0 1 1 * * * * Function set (Interface is 8 bits long.)
RS R/WDB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 BF cannot be checked before this instruction.
0 0 0 0 1 1 * * * * Function set (Interface is 8 bits long.)
RS R/WDB7 DB6 DB5 DB4 DB3 DB2 DB1 DB0 BF cannot be checked before this instruction.
0 0 0 0 1 1 * * * * Function set (Interface is 8 bits long.)
Initialization ends
212
HD44780U
Power on
RS R/W DB7 DB6 DB5 DB4 BF cannot be checked before this instruction.
0 0 0 0 1 1 Function set (Interface is 8 bits long.)
RS R/W DB7 DB6 DB5 DB4 BF cannot be checked before this instruction.
0 0 0 0 1 1 Function set (Interface is 8 bits long.)
RS R/W DB7 DB6 DB5 DB4 BF cannot be checked before this instruction.
0 0 0 0 1 1 Function set (Interface is 8 bits long.)
RS R/W DB7 DB6 DB5 DB4 BF can be checked after the following instructions.
0 0 0 0 1 0 When BF is not checked, the waiting time between
0 0 0 0 1 0 instructions is longer than the execution instuction
time. (See Table 6.)
0 0 N F * *
Function set (Set interface to be 4 bits long.)
0 0 0 0 0 0
Interface is 8 bits in length.
0 0 1 0 0 0
Function set (Interface is 4 bits long. Specify the
0 0 0 0 0 0
number of display lines and character font.)
0 0 0 0 0 1 The number of display lines and character font
0 0 0 0 0 0 cannot be changed after this point.
0 0 0 1 I/D S Display off
Display clear
213
HD44780U
214
HD44780U
215
HD44780U
Clock Characteristics
Write Operation
Read Operation
216
HD44780U
217
HD44780U
218
HD44780U
Clock Characteristics
Write Operation
Read Operation
219
HD44780U
220
HD44780U
VCC
(pull up MOS)
NMOS NMOS NMOS
I/O Pin
Pins: DB0 –DB7 VCC VCC
(MOS with pull-up) (input circuit)
(pull-up MOS) PMOS PMOS
Input enable
NMOS
VCC
NMOS
PMOS Output enable
Data
NMOS
(output circuit)
(tristate)
221
HD44780U
6. Applies to input pins and I/O pins, excluding the OSC1 pin.
7. Applies to I/O pins.
8. Applies to output pins.
9. Current flowing through pull–up MOSs, excluding output drive MOSs.
10. Input/output current is excluded. When input is at an intermediate level with CMOS, the excessive
current flows through the input circuit to the power supply. To avoid this from happening, the input
level must be fixed high or low.
11. Applies only to external clock operation.
Th Tl
Oscillator OSC1
0.7 VCC
0.5 VCC
Open OSC2 0.3 VCC
t rcp t fcp
Th
Duty = × 100%
Th + Tl
12. Applies only to the internal oscillator operation using oscillation resistor Rf.
R f : 75 k Ω ± 2% (when VCC = 3 V)
OSC1
R f : 91 k Ω ± 2% (when VCC = 5 V)
Rf Since the oscillation frequency varies depending on the OSC1 and
OSC2 pin capacitance, the wiring length to these pins should be minimized.
OSC2
VCC = 5 V VCC = 3 V
500 500
400 400
f OSC (kHz)
f OSC (kHz)
300 300
(270) (270)
max. max.
200 typ. 200
typ.
min. min.
100 100
50 (91)100 150 50 (75) 100 150
R f (k Ω) R f (k Ω)
222
HD44780U
13. RCOM is the resistance between the power supply pins (VCC, V1, V4, V5) and each common signal
pin (COM1 to COM16).
RSEG is the resistance between the power supply pins (VCC, V2, V3, V5) and each segment signal pin
(SEG1 to SEG40).
14. The following graphs show the relationship between operation frequency and current consumption.
VCC = 5 V VCC = 3 V
1.8 1.8
1.6 1.6
1.4 1.4
1.2 1.2
ICC (mA)
ICC (mA)
1.0 max. 1.0
0.8 0.8
0.6 typ.
0.6
max.
0.4 0.4
0.2 typ.
0.2
0.0 0.0
0 100 200 300 400 500 0 100 200 300 400 500
223
HD44780U
Load Circuits
VCC = 5 V
90 pF 11 k Ω IS2074 H
50 pF
diodes
Test
point
30 pF
224
HD44780U
Timing Characteristics
VIH1 VIH1
RS VIL1 VIL1
tAS tAH
PWEH tAH
tEf
E VIH1 VIH1
VIL1 VIL1 VIL1
tEr
tDSW tH
VIH1 VIH1
DB0 to DB7 VIL1 Valid data VIL1
tcycE
VIH1 VIH1
RS VIL1 VIL1
tAS tAH
PWEH tAH
tEf
E VIH1 VIH1
VIL1 VIL1 VIL1
tEr
tDDR tDHR
VOH1 VOH1
DB0 to DB7 VOL1 * Valid data * VOL1
tcycE
225
HD44780U
tct
VOH2 VOH2
CL1 VOL2
tCWH
tCWH
tCSU
CL2 VOH2
VOL2
tCSU tCWL
tct
D VOH2
VOL2
tDH
tSU
VOH2
M
t DM
trcc tOFF*1
Notes: 1. tOFF compensates for the power oscillation period caused by momentary power supply
oscillations.
2. Specified at 4.5 V for 5-V operation, and at 2.7 V for 3-V operation.
3. For if 4.5 V is not reached during 5-V operation, the internal reset circuit will not operate
normally.
In this case, the LSI must be initialized by software. (Refer to the Initializing by
Instruction section.)
226