Cara Membuat Jadwal Sholat Menggunakan Modul P10 LED dengan AT89C55


FOTO ALAT JADI

10351237_1524636814474681_3933247277570908447_n 10411183_1524636761141353_7868363758297777499_n

1012809_1502235783381451_1159162432922552111_n

I. Untuk membuat jadwal sholat modul ini pertama2 harus disiapkan bahan2 yang diperlukan

1. modul led = 3 pcs

2. Modul kontrol = 1 pcs

3. Power suplai 5 volt = 1pcs

4. box

5. Akrilik

6. Stiker

Ini contoh gambaran bahan yang perlu disiapkan 

Koneksi p10 3 modul

II.Sekarang cara membuat pcb kontrolnya

Gambar pcbnya dengan apa saja boleh

kontrol_skematik

Terlihat digambar aku menggunakan 2 ic rtc (ds1307 dan ds12c887) sebenarnya yang dipakai rtcnya (untuk jam dan kalender) cuma ds1307. sedangkan untuk 12c887 sy manfaatkan ram ext nya saja karena kekurangan ram untuk kendalikan 96×16 led . mikrokontroler yang digunakan seri at89c55 yang memori flashnya lebih besar dari at89s51/52. digambar juga terdapat at24c64 sebagai penyimpan data jadwal sholat dan menyimpan karakter huruf pada saat input melalui keyboard. Xtal yang dipakai juga menggunakan 20mhz karena display-nya bergetar ketika menggunakan xtal 12 mhz..

Ini contoh desain pcb layout bebas kalau mau dirubah letak2nya

kontrol

150150_1524636514474711_8550219584488337710_n

Pada kontrol alat ini sudah terdapat spesifikasi programnya:

1. Iqomah counting down tiap waktu sholat, subuh dzuhur ashar maghrib isya

2. Dua halaman input karakter huruf keyboard ps/2 masing2 1000 karakter

3. Menu setting jam dan kalender

4. Menu set penambahan dan pengurangan jadwal

5. Menu alarm buzzer penanda masuk waktu sholat

 

Pemrograman alat (code assembly)

I. pengisian jadwal ke eeprom at24c64

 

;==============================================================;
; Program Mikrokontroler Menuliskan
; data jadwal sholat abadi 1 tahun ke eeprom
; Mikrokontroler at89s52
; eeprom at24c64
; rtc ds1307
;==============================================================;

;==============================================================;
; Port Mikrokontroler 7-segment
;==============================================================;
CD4094_CP BIT P2.5
CD4094_D BIT P2.6
CD4094_Str BIT P2.4
;==============================================================;
; Port Mikrokontroler AT24C64
;==============================================================;
I2C_SCL BIT P3.0
I2C_SDA BIT P3.1

led bit p2.0
BUZZER bit p1.0
;==============================================================;
; Ram Mirokontroler
;==============================================================;
LEDDigit1 data 31h
LEDDigit2 data 32h
LEDDigit3 data 33h
LEDDigit4 data 34h
LEDDigit5 data 35h
LEDDigit6 data 36h
LEDDigit7 data 37h
LEDDigit8 data 38h
LEDDigit9 data 39h
LEDDigit10 data 3ah
LEDDigit11 data 3bh
LEDDigit12 data 3ch
LEDDigit13 data 3dh
LEDDigit14 data 3eh

puluhan data 40h
RTCDetik data 41h ;00
RTCMenit data 42h ;01
RTCjam data 43h ;02
RTCHari data 44h ;03
RTCTanggal data 45h ;04
RTCBulan data 46h ;05
RTCTahun data 47h ;06
RTCControl data 48h ;07

Alamat_EH equ 50h
Alamat_EL equ 51h

Alamat_JH equ 52h
Alamat_JL equ 53h

Data_Jadwal equ 54h
Data_Hari_28 equ 28
Data_Hari_30 equ 30
Data_Hari_31 equ 31

;==============================================================;
; Alamat eeprom
;==============================================================;
WRTCMD EQU 11010000b ;WRITE DATA COMMAND Note 3
RRDCMD EQU 11010001b ;READ DATA COMMAND Note 3
WTCMD EQU 10100000B ;WRITE DATA COMMAND Note 3
RDCMD EQU 10100001B ;READ DATA COMMAND Note 3
RDEND EQU 01000000B ;READ HIGH-ENDURANCE BLOCK NUMBER COMMAND
BYTCNT EQU 8
BYTSTR equ 30H ;STORAGE FOR READ DATA
;==============================================================;
; Alamat eeprom Jadwal Sholat
;==============================================================;
Imsya_jam_jan equ 500
Imsya_menit_jan equ 535
Subuh_jam_jan equ 570
Subuh_menit_jan equ 605
Dzuhur_jam_jan equ 640
Dzuhur_menit_jan equ 675
Ashar_jam_jan equ 710
Ashar_menit_jan equ 745
Maghrib_jam_jan equ 780
Maghrib_menit_jan equ 815
Isya_jam_jan equ 850
Isya_menit_jan equ 885

Imsya_jam_feb equ 920
Imsya_menit_feb equ 955
Subuh_jam_feb equ 990
Subuh_menit_feb equ 1025
Dzuhur_jam_feb equ 1060
Dzuhur_menit_feb equ 1095
Ashar_jam_feb equ 1130
Ashar_menit_feb equ 1165
Maghrib_jam_feb equ 1200
Maghrib_menit_feb equ 1230
Isya_jam_feb equ 1270
Isya_menit_feb equ 1305

Imsya_jam_mar equ 1340
Imsya_menit_mar equ 1375
Subuh_jam_mar equ 1410
Subuh_menit_mar equ 1445
Dzuhur_jam_mar equ 1480
Dzuhur_menit_mar equ 1515
Ashar_jam_mar equ 1550
Ashar_menit_mar equ 1585
Maghrib_jam_mar equ 1620
Maghrib_menit_mar equ 1655
Isya_jam_mar equ 1690
Isya_menit_mar equ 1725

Imsya_jam_apr equ 1760
Imsya_menit_apr equ 1795
Subuh_jam_apr equ 1830
Subuh_menit_apr equ 1865
Dzuhur_jam_apr equ 1900
Dzuhur_menit_apr equ 1935
Ashar_jam_apr equ 1970
Ashar_menit_apr equ 2005
Maghrib_jam_apr equ 2040
Maghrib_menit_apr equ 2075
Isya_jam_apr equ 2110
Isya_menit_apr equ 2145

Imsya_jam_mei equ 2180
Imsya_menit_mei equ 2215
Subuh_jam_mei equ 2250
Subuh_menit_mei equ 2285
Dzuhur_jam_mei equ 2320
Dzuhur_menit_mei equ 2355
Ashar_jam_mei equ 2390
Ashar_menit_mei equ 2425
Maghrib_jam_mei equ 2460
Maghrib_menit_mei equ 2495
Isya_jam_mei equ 2530
Isya_menit_mei equ 2565

Imsya_jam_jun equ 2600
Imsya_menit_jun equ 2635
Subuh_jam_jun equ 2670
Subuh_menit_jun equ 2705
Dzuhur_jam_jun equ 2740
Dzuhur_menit_jun equ 2775
Ashar_jam_jun equ 2810
Ashar_menit_jun equ 2845
Maghrib_jam_jun equ 2880
Maghrib_menit_jun equ 2915
Isya_jam_jun equ 2950
Isya_menit_jun equ 2985

Imsya_jam_jul equ 3020
Imsya_menit_jul equ 3055
Subuh_jam_jul equ 3090
Subuh_menit_jul equ 3125
Dzuhur_jam_jul equ 3160
Dzuhur_menit_jul equ 3195
Ashar_jam_jul equ 3230
Ashar_menit_jul equ 3265
Maghrib_jam_jul equ 3300
Maghrib_menit_jul equ 3335
Isya_jam_jul equ 3370
Isya_menit_jul equ 3405

Imsya_jam_agu equ 3440
Imsya_menit_agu equ 3475
Subuh_jam_agu equ 3510
Subuh_menit_agu equ 3545
Dzuhur_jam_agu equ 3580
Dzuhur_menit_agu equ 3615
Ashar_jam_agu equ 3650
Ashar_menit_agu equ 3685
Maghrib_jam_agu equ 3720
Maghrib_menit_agu equ 3755
Isya_jam_agu equ 3790
Isya_menit_agu equ 3825

Imsya_jam_sep equ 3860
Imsya_menit_sep equ 3895
Subuh_jam_sep equ 3930
Subuh_menit_sep equ 3965
Dzuhur_jam_sep equ 4000
Dzuhur_menit_sep equ 4035
Ashar_jam_sep equ 4070
Ashar_menit_sep equ 4105
Maghrib_jam_sep equ 4140
Maghrib_menit_sep equ 4175
Isya_jam_sep equ 4210
Isya_menit_sep equ 4245

Imsya_jam_okt equ 4280
Imsya_menit_okt equ 4315
Subuh_jam_okt equ 4350
Subuh_menit_okt equ 4385
Dzuhur_jam_okt equ 4420
Dzuhur_menit_okt equ 4455
Ashar_jam_okt equ 4490
Ashar_menit_okt equ 4525
Maghrib_jam_okt equ 4560
Maghrib_menit_okt equ 4595
Isya_jam_okt equ 4630
Isya_menit_okt equ 4665

Imsya_jam_nov equ 4700
Imsya_menit_nov equ 4735
Subuh_jam_nov equ 4770
Subuh_menit_nov equ 4805
Dzuhur_jam_nov equ 4840
Dzuhur_menit_nov equ 4875
Ashar_jam_nov equ 4910
Ashar_menit_nov equ 4945
Maghrib_jam_nov equ 4980
Maghrib_menit_nov equ 5015
Isya_jam_nov equ 5050
Isya_menit_nov equ 5085

Imsya_jam_des equ 5120
Imsya_menit_des equ 5155
Subuh_jam_des equ 5190
Subuh_menit_des equ 5225
Dzuhur_jam_des equ 5260
Dzuhur_menit_des equ 5295
Ashar_jam_des equ 5330
Ashar_menit_des equ 5365
Maghrib_jam_des equ 5400
Maghrib_menit_des equ 5435
Isya_jam_des equ 5470
Isya_menit_des equ 5505

ProgramLoop: clr buzzer
clr led
call Tunda1Detik
mov Alamat_EH,#00h
mov Alamat_El,#00h
mov Alamat_jH,#00h
mov Alamat_jl,#00h
;==============================================================;
; Program Utama isi bulan Januari
;==============================================================;
;==============================================================;
; TUlis ke memori AT24c64 waktu imsya
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_jan:
mov dptr,#imsya_jam_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_jan_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_jan_2
mov Data_Jadwal,#0
Tulis_imsya_menit_jan:
mov dptr,#imsya_menit_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_jan_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_jan_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_jan:
mov dptr,#Subuh_jam_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_jan_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_jan_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_jan:
mov dptr,#Subuh_menit_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_jan_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_jan_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_jan:
mov dptr,#Dzuhur_jam_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_jan_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_jan_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_jan:
mov dptr,#Dzuhur_menit_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_jan_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_jan_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_jan:
mov dptr,#Ashar_jam_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_jan_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_jan_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_jan:
mov dptr,#Ashar_menit_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_jan_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_jan_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_jan:
mov dptr,#Maghrib_jam_Jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_jan_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_jan_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_jan:
mov dptr,#Maghrib_menit_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_jan_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_jan_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_jan:
mov dptr,#Isya_jam_Jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_jan_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_jan_2

mov Data_Jadwal,#0
Tulis_Isya_menit_jan:
mov dptr,#Isya_menit_jan ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_jan
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_jan_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_jan_2

;==============================================================;
; Program Utama isi bulan Februari
;==============================================================;
;==============================================================;
; TUlis ke memori AT24c64 waktu imsya
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_feb:
mov dptr,#imsya_jam_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_imsya_jam_feb_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_feb_2
mov Data_Jadwal,#0
Tulis_imsya_menit_feb:
mov dptr,#imsya_menit_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_imsya_menit_feb_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_feb_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_feb:
mov dptr,#Subuh_jam_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Subuh_jam_feb_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_feb_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_feb:
mov dptr,#Subuh_menit_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Subuh_menit_feb_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_feb_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_feb:
mov dptr,#Dzuhur_jam_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Dzuhur_jam_feb_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_feb_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_feb:
mov dptr,#Dzuhur_menit_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Dzuhur_menit_feb_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_feb_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_feb:
mov dptr,#Ashar_jam_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Ashar_jam_feb_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_feb_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_feb:
mov dptr,#Ashar_menit_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Ashar_menit_feb_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_feb_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_feb:
mov dptr,#Maghrib_jam_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Maghrib_jam_feb_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_feb_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_feb:
mov dptr,#Maghrib_menit_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Maghrib_menit_feb_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_feb_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_feb:
mov dptr,#Isya_jam_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Isya_jam_feb_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_feb_2

mov Data_Jadwal,#0
Tulis_Isya_menit_feb:
mov dptr,#Isya_menit_feb ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_feb
call tulis_ke_eeprom
mov r0,#Data_Hari_28
Tulis_Isya_menit_feb_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_feb_2

;==============================================================;
; Program Utama isi bulan Maret
;==============================================================;
;==============================================================;
; TUlis ke memori AT24c64 waktu imsya
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_mar:
mov dptr,#imsya_jam_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_mar_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_mar_2
mov Data_Jadwal,#0
Tulis_imsya_menit_mar:
mov dptr,#imsya_menit_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_mar_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_mar_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_mar:
mov dptr,#Subuh_jam_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_mar_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_mar_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_mar:
mov dptr,#Subuh_menit_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_mar_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_mar_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_mar:
mov dptr,#Dzuhur_jam_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_mar_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_mar_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_mar:
mov dptr,#Dzuhur_menit_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_mar_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_mar_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_mar:
mov dptr,#Ashar_jam_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_mar_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_mar_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_mar:
mov dptr,#Ashar_menit_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_mar_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_mar_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_mar:
mov dptr,#Maghrib_jam_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_mar_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_mar_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_mar:
mov dptr,#Maghrib_menit_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_mar_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_mar_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_mar:
mov dptr,#Isya_jam_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_mar_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_mar_2

mov Data_Jadwal,#0
Tulis_Isya_menit_mar:
mov dptr,#Isya_menit_mar ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_mar
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_mar_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_mar_2
;==============================================================;
; Program Utama isi bulan April
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Apr:
mov dptr,#imsya_jam_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_jam_Apr_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Apr_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Apr:
mov dptr,#imsya_menit_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_menit_Apr_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Apr_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Apr:
mov dptr,#Subuh_jam_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_jam_Apr_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Apr_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Apr:
mov dptr,#Subuh_menit_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_menit_Apr_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Apr_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Apr:
mov dptr,#Dzuhur_jam_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_jam_Apr_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Apr_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Apr:
mov dptr,#Dzuhur_menit_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_menit_Apr_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Apr_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Apr:
mov dptr,#Ashar_jam_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_jam_Apr_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Apr_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Apr:
mov dptr,#Ashar_menit_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_menit_Apr_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Apr_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Apr:
mov dptr,#Maghrib_jam_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_jam_Apr_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Apr_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Apr:
mov dptr,#Maghrib_menit_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_menit_Apr_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Apr_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Apr:
mov dptr,#Isya_jam_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_jam_Apr_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Apr_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Apr:
mov dptr,#Isya_menit_Apr ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Apr
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_menit_Apr_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Apr_2

;==============================================================;
; Program Utama isi bulan Mei
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Mei:
mov dptr,#imsya_jam_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_Mei_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Mei_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Mei:
mov dptr,#imsya_menit_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_Mei_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Mei_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Mei:
mov dptr,#Subuh_jam_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_Mei_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Mei_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Mei:
mov dptr,#Subuh_menit_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_Mei_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Mei_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Mei:
mov dptr,#Dzuhur_jam_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_Mei_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Mei_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Mei:
mov dptr,#Dzuhur_menit_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_Mei_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Mei_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Mei:
mov dptr,#Ashar_jam_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_Mei_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Mei_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Mei:
mov dptr,#Ashar_menit_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_Mei_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Mei_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Mei:
mov dptr,#Maghrib_jam_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_Mei_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Mei_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Mei:
mov dptr,#Maghrib_menit_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_Mei_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Mei_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Mei:
mov dptr,#Isya_jam_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_Mei_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Mei_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Mei:
mov dptr,#Isya_menit_Mei ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Mei
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_Mei_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Mei_2
;==============================================================;
; Program Utama isi bulan Juni
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Jun:
mov dptr,#imsya_jam_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_jam_Jun_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Jun_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Jun:
mov dptr,#imsya_menit_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_menit_Jun_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Jun_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Jun:
mov dptr,#Subuh_jam_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_jam_Jun_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Jun_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Jun:
mov dptr,#Subuh_menit_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_menit_Jun_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Jun_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Jun:
mov dptr,#Dzuhur_jam_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_jam_Jun_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Jun_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Jun:
mov dptr,#Dzuhur_menit_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_menit_Jun_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Jun_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Jun:
mov dptr,#Ashar_jam_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_jam_Jun_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Jun_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Jun:
mov dptr,#Ashar_menit_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_menit_Jun_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Jun_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Jun:
mov dptr,#Maghrib_jam_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_jam_Jun_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Jun_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Jun:
mov dptr,#Maghrib_menit_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_menit_Jun_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Jun_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Jun:
mov dptr,#Isya_jam_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_jam_Jun_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Jun_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Jun:
mov dptr,#Isya_menit_Jun ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Jun
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_menit_Jun_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Jun_2

;==============================================================;
; Program Utama isi bulan Juli
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Jul:
mov dptr,#imsya_jam_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_Jul_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Jul_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Jul:
mov dptr,#imsya_menit_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_Jul_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Jul_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Jul:
mov dptr,#Subuh_jam_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_Jul_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Jul_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Jul:
mov dptr,#Subuh_menit_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_Jul_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Jul_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Jul:
mov dptr,#Dzuhur_jam_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_Jul_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Jul_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Jul:
mov dptr,#Dzuhur_menit_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_Jul_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Jul_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Jul:
mov dptr,#Ashar_jam_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_Jul_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Jul_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Jul:
mov dptr,#Ashar_menit_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_Jul_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Jul_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Jul:
mov dptr,#Maghrib_jam_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_Jul_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Jul_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Jul:
mov dptr,#Maghrib_menit_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_Jul_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Jul_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Jul:
mov dptr,#Isya_jam_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_Jul_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Jul_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Jul:
mov dptr,#Isya_menit_Jul ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Jul
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_Jul_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Jul_2

;==============================================================;
; Program Utama isi bulan Agustus
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Agu:
mov dptr,#imsya_jam_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_Agu_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Agu_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Agu:
mov dptr,#imsya_menit_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_Agu_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Agu_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Agu:
mov dptr,#Subuh_jam_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_Agu_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Agu_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Agu:
mov dptr,#Subuh_menit_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_Agu_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Agu_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Agu:
mov dptr,#Dzuhur_jam_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_Agu_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Agu_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Agu:
mov dptr,#Dzuhur_menit_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_Agu_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Agu_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Agu:
mov dptr,#Ashar_jam_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_Agu_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Agu_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Agu:
mov dptr,#Ashar_menit_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_Agu_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Agu_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Agu:
mov dptr,#Maghrib_jam_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_Agu_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Agu_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Agu:
mov dptr,#Maghrib_menit_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_Agu_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Agu_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Agu:
mov dptr,#Isya_jam_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_Agu_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Agu_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Agu:
mov dptr,#Isya_menit_Agu ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Agu
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_Agu_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Agu_2

;==============================================================;
; Program Utama isi bulan September
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Sep:
mov dptr,#imsya_jam_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_jam_Sep_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Sep_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Sep:
mov dptr,#imsya_menit_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_menit_Sep_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Sep_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Sep:
mov dptr,#Subuh_jam_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_jam_Sep_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Sep_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Sep:
mov dptr,#Subuh_menit_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_menit_Sep_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Sep_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Sep:
mov dptr,#Dzuhur_jam_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_jam_Sep_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Sep_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Sep:
mov dptr,#Dzuhur_menit_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_menit_Sep_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Sep_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Sep:
mov dptr,#Ashar_jam_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_jam_Sep_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Sep_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Sep:
mov dptr,#Ashar_menit_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_menit_Sep_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Sep_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Sep:
mov dptr,#Maghrib_jam_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_jam_Sep_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Sep_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Sep:
mov dptr,#Maghrib_menit_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_menit_Sep_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Sep_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Sep:
mov dptr,#Isya_jam_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_jam_Sep_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Sep_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Sep:
mov dptr,#Isya_menit_Sep ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Sep
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_menit_Sep_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Sep_2

;==============================================================;
; Program Utama isi bulan Oktober
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Okt:
mov dptr,#imsya_jam_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_Okt_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Okt_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Okt:
mov dptr,#imsya_menit_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_Okt_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Okt_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Okt:
mov dptr,#Subuh_jam_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_Okt_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Okt_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Okt:
mov dptr,#Subuh_menit_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_Okt_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Okt_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Okt:
mov dptr,#Dzuhur_jam_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_Okt_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Okt_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Okt:
mov dptr,#Dzuhur_menit_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_Okt_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Okt_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Okt:
mov dptr,#Ashar_jam_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_Okt_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Okt_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Okt:
mov dptr,#Ashar_menit_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_Okt_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Okt_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Okt:
mov dptr,#Maghrib_jam_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_Okt_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Okt_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Okt:
mov dptr,#Maghrib_menit_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_Okt_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Okt_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Okt:
mov dptr,#Isya_jam_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_Okt_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Okt_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Okt:
mov dptr,#Isya_menit_Okt ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Okt
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_Okt_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Okt_2
;==============================================================;
; Program Utama isi bulan November
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Nov:
mov dptr,#imsya_jam_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_jam_Nov_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Nov_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Nov:
mov dptr,#imsya_menit_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_imsya_menit_Nov_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Nov_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Nov:
mov dptr,#Subuh_jam_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_jam_Nov_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Nov_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Nov:
mov dptr,#Subuh_menit_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Subuh_menit_Nov_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Nov_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Nov:
mov dptr,#Dzuhur_jam_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_jam_Nov_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Nov_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Nov:
mov dptr,#Dzuhur_menit_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Dzuhur_menit_Nov_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Nov_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Nov:
mov dptr,#Ashar_jam_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Ashar_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_jam_Nov_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Nov_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Nov:
mov dptr,#Ashar_menit_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Ashar_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Ashar_menit_Nov_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Nov_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Nov:
mov dptr,#Maghrib_jam_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_jam_Nov_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Nov_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Nov:
mov dptr,#Maghrib_menit_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Maghrib_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Maghrib_menit_Nov_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Nov_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Nov:
mov dptr,#Isya_jam_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Isya_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_jam_Nov_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Nov_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Nov:
mov dptr,#Isya_menit_Nov ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Isya_Nov
call tulis_ke_eeprom
mov r0,#Data_Hari_30
Tulis_Isya_menit_Nov_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Nov_2
;==============================================================;
; Program Utama isi bulan Desember
;==============================================================;
mov Data_Jadwal,#0
Tulis_imsya_jam_Des:
mov dptr,#imsya_jam_Des ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_imsya_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_jam_Des_2:
call copy_dptr
djnz r0,Tulis_imsya_jam_Des_2

mov Data_Jadwal,#0
Tulis_imsya_menit_Des:
mov dptr,#imsya_menit_Des ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_imsya_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_imsya_menit_Des_2:
call copy_dptr
djnz r0,Tulis_imsya_menit_Des_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat subuh
;==============================================================;
mov Data_Jadwal,#0
Tulis_Subuh_jam_Des:
mov dptr,#Subuh_jam_Des ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_subuh_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_jam_Des_2:
call copy_dptr
djnz r0,Tulis_Subuh_jam_Des_2

mov Data_Jadwal,#0
Tulis_Subuh_menit_Des:
mov dptr,#Subuh_menit_Des ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_subuh_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Subuh_menit_Des_2:
call copy_dptr
djnz r0,Tulis_Subuh_menit_Des_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Dzuhur
;==============================================================;
mov Data_Jadwal,#0
Tulis_Dzuhur_jam_Des:
mov dptr,#Dzuhur_jam_Des ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#Jam_Dzuhur_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_jam_Des_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_jam_Des_2

mov Data_Jadwal,#0
Tulis_Dzuhur_menit_Des:
mov dptr,#Dzuhur_menit_Des ;alamat eeprom yang mau ditulis
call Copy_ke_register
MOV dptr,#menit_Dzuhur_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Dzuhur_menit_Des_2:
call copy_dptr
djnz r0,Tulis_Dzuhur_menit_Des_2

;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Ashar
;==============================================================;
mov Data_Jadwal,#0
Tulis_Ashar_jam_Des:
mov dptr,#Ashar_jam_Des
call Copy_ke_register
MOV dptr,#Jam_Ashar_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_jam_Des_2:
call copy_dptr
djnz r0,Tulis_Ashar_jam_Des_2

mov Data_Jadwal,#0
Tulis_Ashar_menit_Des:
mov dptr,#Ashar_menit_Des
call Copy_ke_register
MOV dptr,#menit_Ashar_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Ashar_menit_Des_2:
call copy_dptr
djnz r0,Tulis_Ashar_menit_Des_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Maghrib
;==============================================================;
mov Data_Jadwal,#0
Tulis_Maghrib_jam_Des:
mov dptr,#Maghrib_jam_Des
call Copy_ke_register
MOV dptr,#Jam_Maghrib_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_jam_Des_2:
call copy_dptr
djnz r0,Tulis_Maghrib_jam_Des_2

mov Data_Jadwal,#0
Tulis_Maghrib_menit_Des:
mov dptr,#Maghrib_menit_Des ;
call Copy_ke_register
MOV dptr,#menit_Maghrib_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Maghrib_menit_Des_2:
call copy_dptr
djnz r0,Tulis_Maghrib_menit_Des_2
;==============================================================;
; TUlis ke memori AT24c64 waktu Sholat Isya
;==============================================================;
mov Data_Jadwal,#0
Tulis_Isya_jam_Des:
mov dptr,#Isya_jam_Des
call Copy_ke_register
MOV dptr,#Jam_Isya_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_jam_Des_2:
call copy_dptr
djnz r0,Tulis_Isya_jam_Des_2

mov Data_Jadwal,#0
Tulis_Isya_menit_Des:
mov dptr,#Isya_menit_Des
call Copy_ke_register
MOV dptr,#menit_Isya_Des
call tulis_ke_eeprom
mov r0,#Data_Hari_31
Tulis_Isya_menit_Des_2:
call copy_dptr
djnz r0,Tulis_Isya_menit_Des_2

setb buzzer
Jmp $
;==============================================================;
copy_dptr: mov dph,Alamat_EH
mov dpl,Alamat_EL
call Copy_ke_register
mov dph,Alamat_JH
mov dpl,Alamat_JL
call tulis_ke_eeprom
ret
;==============================================================;
Copy_ke_register:
mov r3,dph
mov r4,dpl
inc dptr
mov Alamat_EH,dph
mov Alamat_EL,dpl
mov a,Data_Jadwal
mov DPTR,#tabel_dec
movc A,@A+DPTR
ret
;==============================================================;
tulis_ke_eeprom:
mov Alamat_JH,dph
mov Alamat_JL,dpl
movc A,@A+DPTR
mov DPTR,#tabel_hex
movc A,@A+DPTR
mov r1,a
mov dph,Alamat_JH
mov dpl,Alamat_JL
inc dptr
mov Alamat_JH,dph
mov Alamat_JL,dpl
call Tulis_eeprom
clr buzzer
call Tunda0Detik
setb buzzer
call Tunda0Detik
mov dph,Alamat_EH
mov dpl,Alamat_EL
ret
;==============================================================;
; Delay
;==============================================================;
Tunda1Detik: MOV R7,#5
Tunda1DetikL2: MOV R6,#100
Tunda1DetikL1: MOV R5,#230
DJNZ R5,$
DJNZ R6,Tunda1DetikL1
DJNZ R7,Tunda1DetikL2
Ret

Tunda0Detik: MOV R7,#1
jmp Tunda1DetikL2
;**********************************************************************
; This routine writes a byte of data to EEPROM
; This routine is for the 24LC32 or 24LC65
; The EEPROM address is assumed to be in R3:R4
; The DATA to be written is assumed to be in R1
;**********************************************************************
Tulis_eeprom:
MOV A,#WTCMD ;LOAD WRITE COMMAND
CALL OUTS ;SEND IT
MOV A,R3 ;GET HI BYTE ADDRESS
CALL OUT ;SEND IT
MOV A,R4 ;GET LOW BYTE ADDRESS
CALL OUT ;SEND IT
MOV A,R1 ;GET DATA
CALL OUT ;SEND IT
CALL STOP ;SEND STOP CONDITION
RET
;***********************************************************************
; THIS ROUTINE SENDS OUT CONTENTS OF THE ACCUMULATOR
; to the EEPROM and includes START condition. Refer to the data sheets
; for discussion of START and STOP conditions.
;***********************************************************************

OUTS: MOV R2,#8 ;LOOP COUNT — EQUAL TO BIT COUNT
SETB I2C_SDA ;INSURE DATA IS HI
SETB I2C_SCL ;INSURE CLOCK IS HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SDA ;START CONDITION — DATA = 0
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL ;CLOCK = 0
OTSLP: RLC A ;SHIFT BIT
JNC BITLS
SETB I2C_SDA ;DATA = 1
JMP OTSL1 ;CONTINUE
BITLS: CLR I2C_SDA ;DATA = 0
OTSL1: SETB I2C_SCL ;CLOCK HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL ;CLOCK LOW
DJNZ R2,OTSLP ;DECREMENT COUNTER
SETB I2C_SDA ;TURN PIN INTO INPUT
NOP ;NOTE 1
NOP ;NOTE 2
NOP
SETB I2C_SCL ;CLOCK ACK
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL
RET
;**********************************************************************
; THIS ROUTINE SENDS OUT CONTENTS OF ACCUMLATOR TO EEPROM
; without sending a START condition.
;**********************************************************************

OUT: MOV R2,#8 ;LOOP COUNT — EQUAL TO BIT COUNT
OTLP: RLC A ;SHIFT BIT
JNC BITL
SETB I2C_SDA ;DATA = 1
JMP OTL1 ;CONTINUE
BITL: CLR I2C_SDA ;DATA = 0
OTL1: SETB I2C_SCL ;CLOCK HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL ;CLOCK LOW
DJNZ R2,OTLP ;DECREMENT COUNTER
SETB I2C_SDA ;TURN PIN INTO INPUT
NOP ;NOTE 1
NOP ;NOTE 2
NOP
SETB I2C_SCL ;CLOCK ACK
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL
RET
;**********************************************************************
; THIS ROUTINE READS IN A BYTE FROM THE EEPROM
; and stores it in the accumulator
;**********************************************************************

IN: MOV R2,#8 ;LOOP COUNT
SETB I2C_SDA ;SET DATA BIT HIGH FOR INPUT
INLP: CLR I2C_SCL ;CLOCK LOW
NOP ;NOTE 1
NOP
NOP
NOP
NOP ;NOTE 2
NOP
SETB I2C_SCL ;CLOCK HIGH
CLR C ;CLEAR CARRY
JNB I2C_SDA,INL1 ;JUMP IF DATA = 0
CPL C ;SET CARRY IF DATA = 1
INL1: RLC A ;ROTATE DATA INTO ACCUMULATOR
DJNZ R2,INLP ;DECREMENT COUNTER
CLR I2C_SCL ;CLOCK LOW
RET

STOP: CLR I2C_SDA ;STOP CONDITION SET DATA LOW
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
SETB I2C_SCL ;SET CLOCK HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
SETB I2C_SDA ;SET DATA HIGH
RET

;==============================================================;
; Hexa ke desimal
;==============================================================;
tabel_hex:
db 00h,01h,02h,03h,04h,05h,06h,07h,08h,09h,10h
db 11h,12h,13h,14h,15h,16h,17h,18h,19h,20h
db 21h,22h,23h,24h,25h,26h,27h,28h,29h,30h
db 31h,32h,33h,34h,35h,36h,37h,38h,39h,40h
db 41h,42h,43h,44h,45h,46h,47h,48h,49h,50h
db 51h,52h,53h,54h,55h,56h,57h,58h,59h,60h
db 61h,62h,63h,64h,65h,66h,67h,68h,69h,70h
db 71h,72h,73h,74h,75h,76h,77h,78h,79h,80h
db 81h,82h,83h,84h,85h,86h,87h,88h,89h,90h
db 91h,82h,93h,94h,95h,96h,97h,98h,99h

tabel_dec:
db 00,01,02,03,04,05,06,07,08,09,00,00,00,00,00,00
db 10,11,12,13,14,15,16,17,18,19,00,00,00,00,00,00
db 20,21,22,23,24,25,26,27,28,29,00,00,00,00,00,00
db 30,31,32,33,34,35,36,37,38,39,00,00,00,00,00,00
db 40,41,42,43,44,45,46,47,48,49,00,00,00,00,00,00
db 50,51,52,53,54,55,56,57,58,59,00,00,00,00,00,00
db 60,61,62,63,64,65,66,67,68,69,00,00,00,00,00,00
db 70,71,72,73,74,75,76,77,78,79,00,00,00,00,00,00
db 80,81,82,83,84,85,86,87,88,89,00,00,00,00,00,00
db 90,91,82,93,94,95,96,97,98,99,00,00,00,00,00,00
;================================================================================================================;
;================================================================================================================;
; Data Waktu Sholat Januari=31 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_jan: DB 03,03,03,03,03,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
menit_imsya_jan: db 59,59,59,59,59,01,01,01,01,01,04,04,04,04,04,07,07,07,07,07,10,10,10,10,10,12,12,12,12,12,14
Jam_subuh_jan: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_jan: db 09,09,09,09,09,11,11,11,11,11,14,14,14,14,14,17,17,17,17,17,20,20,20,20,20,22,22,22,22,22,24
Jam_dzuhur_jan: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_jan: db 46,46,46,46,46,49,49,49,49,49,51,51,51,51,51,53,53,53,53,53,54,54,54,54,54,55,55,55,55,55,56
Jam_ashar_jan: db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
Menit_ashar_jan: db 10,10,10,10,10,14,14,14,14,14,15,15,15,15,15,16,16,16,16,16,16,16,16,16,16,15,15,15,15,15,14
Jam_maghrib_jan: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_maghrib_jan:db 02,02,02,02,02,05,05,05,05,05,07,07,07,07,07,08,08,08,08,08,09,09,09,09,09,09,09,09,09,09,09
Jam_isya_jan: db 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19
Menit_isya_jan: db 15,15,15,15,15,20,20,20,20,20,21,21,21,21,21,21,21,21,21,21,22,22,22,22,22,22,22,22,22,22,22
;================================================================================================================;
; Data Waktu Sholat Februari=29 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_feb: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_feb: db 14,14,14,16,16,16,16,16,17,17,17,17,17,19,19,19,19,19,21,21,21,21,21,22,22,22,22,22,22
Jam_subuh_feb: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_feb: db 24,24,24,26,26,26,26,26,27,27,27,27,27,29,29,29,29,29,31,31,31,31,31,32,32,32,32,32,32
Jam_dzuhur_feb: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_feb: db 56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,56,55,55,55,55,55,55
Jam_ashar_feb: db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,14,14,14
Menit_ashar_feb: db 14,14,14,12,12,12,12,12,10,10,10,10,10,08,08,08,08,08,04,04,04,04,04,00,00,00,00,00,00
Jam_maghrib_feb: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_maghrib_feb:db 09,09,09,08,08,08,08,08,07,07,07,07,07,06,06,06,06,06,05,05,05,05,05,03,03,03,03,03,03
Jam_isya_feb: db 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19
Menit_isya_feb: db 22,22,22,18,18,18,18,18,17,17,17,17,17,15,15,15,15,15,14,14,14,14,14,14,13,13,13,13,13
;================================================================================================================;
; Data Waktu Sholat maret=31 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_mar: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_mar: db 22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,22,21,21,21,21,21
Jam_subuh_mar: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_mar: db 32,32,32,32,32,32,32,32,32,32,33,33,33,33,33,32,32,32,32,32,32,32,32,32,32,31,31,31,31,31,31
Jam_dzuhur_mar: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_mar: db 54,54,54,54,54,53,53,53,53,53,52,52,52,52,52,50,50,50,50,50,49,49,49,49,49,47,47,47,47,47,47
jam_ashar_mar: db 14,14,14,14,14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
Menit_ashar_mar: db 57,57,57,57,57,59,59,59,59,59,01,01,01,01,01,01,01,01,01,01,02,02,02,02,02,02,02,02,02,02,02
Jam_maghrib_mar: db 18,18,18,18,18,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_mar:db 01,01,01,01,01,59,59,59,59,59,57,57,57,57,57,54,54,54,54,54,52,52,52,52,52,49,49,49,49,49,49
Jam_isya_mar: db 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,18,18,18,18,18,18
Menit_isya_mar: db 10,10,10,10,10,08,08,08,08,08,05,05,05,05,05,03,03,03,03,03,00,00,00,00,00,58,58,58,58,58,58
;================================================================================================================;
; Data Waktu Sholat april =30 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_apr: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_apr: db 20,20,20,20,20,19,19,19,19,19,19,19,19,19,19,18,18,18,18,18,17,17,17,17,17,16,16,16,16,16
Jam_subuh_apr: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_apr: db 30,30,30,30,30,29,29,29,29,29,29,29,29,29,29,28,28,28,28,28,27,27,27,27,27,26,26,26,26,26
Jam_dzuhur_apr: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_apr: db 47,47,47,47,47,44,44,44,44,44,43,43,43,43,43,42,42,42,42,42,40,40,40,40,40,39,39,39,39,39
Jam_ashar_apr: db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,14,14,14,14,14
Menit_ashar_apr: db 03,03,03,03,03,02,02,02,02,02,01,01,01,01,01,01,01,01,01,01,00,00,00,00,00,59,59,59,59,59
Jam_maghrib_apr: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_apr:db 47,47,47,47,47,44,44,44,44,44,42,42,42,42,42,40,40,40,40,40,37,37,37,37,37,35,35,35,35,35
jam_isya_apr: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
menit_isya_apr: db 55,55,55,55,55,52,52,52,52,52,51,51,51,51,51,49,49,49,49,49,46,46,46,46,46,45,45,45,45,45
;================================================================================================================;
; Data Waktu Sholat mei=31 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_mei: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_mei: db 16,16,16,16,16,16,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18
Jam_subuh_mei: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_mei: db 26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28
Jam_dzuhur_mei: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_mei: db 39,39,39,39,39,39,38,38,38,38,38,38,38,38,38,38,39,39,39,39,39,39,39,39,39,39,40,40,40,40,40
Jam_ashar_mei: db 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,15,15,15,15,15
Menit_ashar_mei: db 59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,59,00,00,00,00,00
Jam_maghrib_mei: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_mei:db 35,34,34,34,34,34,32,32,32,32,32,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
Jam_isya_mei: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_isya_mei: db 45,44,44,44,44,44,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,43,44,44,44,44,44
;================================================================================================================;
; Data Waktu Sholat juni=30 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_jun: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_jun: db 18,19,19,19,19,19,20,20,20,20,20,21,21,21,21,21,22,22,22,22,22,23,23,23,23,23,24,24,24,24
Jam_subuh_jun: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_jun: db 28,29,29,29,29,29,30,30,30,30,30,31,31,31,31,31,32,32,32,32,32,33,33,33,33,33,34,34,34,34
Jam_dzuhur_jun: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_jun: db 40,40,40,40,40,40,41,41,41,41,41,42,42,42,42,42,43,43,43,43,43,44,44,44,44,44,45,45,45,45
Jam_ashar_jun: db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
Menit_ashar_jun: db 00,00,00,00,00,00,01,01,01,01,01,02,02,02,02,02,03,03,03,03,03,04,04,04,04,04,04,04,04,04
Jam_maghrib_jun: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_jun:db 31,31,31,31,31,31,31,31,31,31,31,32,32,32,32,32,33,33,33,33,33,34,34,34,34,34,35,35,35,35
Jam_isya_jun: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_isya_jun: db 44,44,44,44,44,44,45,45,45,45,45,46,46,46,46,46,47,47,47,47,47,48,48,48,48,48,49,49,49,49
;================================================================================================================;
; Data Waktu Sholat juli=31 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_jul: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_jul: db 24,24,25,25,25,25,25,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26,26
Jam_subuh_jul: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_jul: db 34,34,35,35,35,35,35,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36
Jam_dzuhur_jul: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_jul: db 45,45,46,46,46,46,46,47,47,47,47,47,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48,48
Jam_ashar_jul: db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
Menit_ashar_jul: db 04,04,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08,08
Jam_maghrib_jul: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_jul:db 38,38,38,38,38,39,39,39,39,39,40,40,40,40,40,40,40,40,40,40,40,40,41,41,41,41,41,41,41,41,41
Jam_isya_jul: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_isya_jul: db 49,49,50,50,50,50,50,51,51,51,51,51,52,52,52,52,52,52,52,52,52,52,53,53,53,53,53,53,53,53,53
;================================================================================================================;
; Data Waktu Sholat agustus=31 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_agu: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_agu: db 26,26,26,26,26,26,26,25,25,25,25,25,23,23,23,23,23,22,22,22,22,22,22,20,20,20,20,20,18,18,18
Jam_subuh_agu: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_agu: db 36,36,36,36,36,36,36,35,35,35,35,35,33,33,33,33,33,32,32,32,32,32,32,30,30,30,30,30,28,28,28
Jam_dzuhur_agu: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_agu: db 48,48,48,48,48,48,48,47,47,47,47,47,46,46,46,46,46,45,45,45,45,45,45,44,44,44,44,44,42,42,42
Jam_ashar_agu: db 15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
Menit_ashar_agu: db 08,08,08,08,08,08,08,07,07,07,07,07,05,05,05,05,05,05,05,05,05,05,05,03,03,03,03,03,00,00,00
Jam_maghrib_agu: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_agu:db 48,48,48,48,48,48,48,47,47,47,47,47,46,46,46,46,46,45,45,45,45,45,45,44,44,44,44,44,42,42,42
Jam_isya_agu: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_isya_agu: db 53,53,53,53,53,53,53,52,52,52,52,52,52,52,52,52,52,51,51,51,51,51,51,51,51,51,51,51,50,50,50
;================================================================================================================;
; Data Waktu Sholat september=30 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_sep: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_imsya_sep: db 18,18,16,16,16,16,16,13,13,13,13,13,11,11,11,11,11,08,08,08,08,08,08,05,05,05,05,05,03,03
Jam_subuh_sep: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04
Menit_subuh_sep: db 28,28,26,26,26,26,26,23,23,23,23,23,21,21,21,21,21,18,18,18,18,18,18,15,15,15,15,15,13,13
Jam_dzuhur_sep: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_sep: db 42,42,41,41,41,41,41,39,39,39,39,39,37,37,37,37,37,35,35,35,35,35,35,34,34,34,34,34,32,32
Jam_ashar_sep: db 15,15,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14
menit_ashar_sep: db 00,00,57,57,57,57,57,55,55,55,55,55,52,52,52,52,52,48,48,48,48,48,48,44,44,44,44,44,41,41
Jam_maghrib_sep: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_sep:db 41,41,41,41,41,41,41,40,40,40,40,40,39,39,39,39,39,38,38,38,38,38,38,37,37,37,37,37,37,37
Jam_isya_sep: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_isya_sep: db 50,50,49,49,49,49,49,48,48,48,48,48,48,48,48,48,48,46,46,46,46,46,46,46,46,46,46,46,46,46
;================================================================================================================;
; Data Waktu Sholat oktober=31 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_okt: db 04,04,04,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
Menit_imsya_okt: db 03,03,03,59,59,59,59,59,57,57,57,57,57,55,55,55,55,55,52,52,52,52,52,49,49,49,49,49,47,47,47
Jam_subuh_okt: db 04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,04,03,03,03,03,03,03,03,03
Menit_subuh_okt: db 13,13,13,09,09,09,09,09,07,07,07,07,07,05,05,05,05,05,02,02,02,02,02,59,59,59,59,59,57,57,57
Jam_dzuhur_okt: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_okt: db 32,32,32,30,30,30,30,30,29,29,29,29,29,28,28,28,28,28,27,27,27,27,27,26,26,26,26,26,26,26,26
Jam_ashar_okt: db 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14
Menit_ashar_okt: db 41,41,41,36,36,36,36,36,33,33,33,33,33,33,33,33,33,33,35,35,35,35,35,38,38,38,38,38,40,40,40
Jam_maghrib_okt: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_okt:db 37,37,37,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,36,37,37,37
Jam_isya_okt: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18
Menit_isya_okt: db 46,46,46,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,47,47,47
;===============================================================================================================;
; Data Waktu Sholat november=30 ok
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_nov: db 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
Menit_imsya_nov: db 47,47,46,46,46,46,46,45,45,45,45,45,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44,44
Jam_subuh_nov: db 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
Menit_subuh_nov: db 57,57,56,56,56,56,56,55,55,55,55,55,54,54,54,54,54,54,4,54,54,54,54,54,54,54,54,54,54,54
Jam_dzuhur_nov: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_nov: db 26,26,26,26,26,26,26,27,27,27,27,27,27,27,27,27,27,28,28,28,28,28,30,30,30,30,30,31,31,31
Jam_ashar_nov: db 14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14
Menit_ashar_nov: db 40,40,44,44,44,44,44,45,45,45,45,45,47,47,47,47,47,50,50,50,50,50,53,53,53,53,53,55,55,55
Jam_maghrib_nov: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17
Menit_maghrib_nov:db 37,37,38,38,38,38,38,40,40,40,40,40,41,41,41,41,41,43,43,43,43,43,45,45,45,45,45,47,47,47
Jam_isya_nov: db 18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,18,19,19,19
Menit_isya_nov: db 47,47,48,48,48,48,48,53,53,53,53,53,54,54,54,54,54,56,56,56,56,56,59,59,59,59,59,01,01,01
;================================================================================================================;
; Data Waktu Sholat desember=31 alhamdulillah
; 01,02,03,04,05,06,07,08,09,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31
;================================================================================================================;
Jam_imsya_des: db 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03
Menit_imsya_des: db 44,45,45,45,45,45,46,46,46,46,46,47,47,47,47,47,48,48,48,48,48,51,51,51,51,51,53,53,53,53,53
Jam_subuh_des: db 03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,03,04,04,04,04,04,04,04,04,04,04
Menit_subuh_des: db 54,55,55,55,55,55,56,56,56,56,56,57,57,57,57,57,58,58,58,58,58,01,01,01,01,01,03,03,03,03,03
Jam_dzuhur_des: db 11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11,11
Menit_dzuhur_des: db 31,33,33,33,33,33,35,35,35,35,35,37,37,37,37,37,39,39,39,39,39,42,42,42,42,42,44,44,44,44,44
Jam_ashar_des: db 14,14,14,14,14,14,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15
Menit_ashar_des: db 55,58,58,58,58,58,00,00,00,00,00,03,03,03,03,03,05,05,05,05,05,08,08,08,08,08,10,10,10,10,10
Jam_maghrib_des: db 17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,17,18,18,18,18,18
Menit_maghrib_des:db 47,49,49,49,49,49,51,51,51,51,51,54,54,54,54,54,55,55,55,55,55,59,59,59,59,59,01,01,01,01,01
Jam_isya_des: db 19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19,19
Menit_isya_des: db 01,04,04,04,04,04,07,07,07,07,07,09,09,09,09,09,11,11,11,11,11,14,14,14,14,14,16,16,16,16,16
end

 

 

 

 

II. Master Penampil Jadwal Sholat P10 at89C55

;#define Output_Enable PORTD.0 //Output
;#define Data_A PORTD.1 //Data Merah = 0
;#define Data_B PORTD.2 //Data Merah = 0

;#define HC595_SH_CP PORTD.3 //Shift Clock (SH_CP) pin location
;#define HC595_ST_CP PORTD.4 //Store Clock (ST_CP) pin location
;#define HC595_DS PORTD.5 //Data pin (DS)
;#########################################################################;
O_E bit p2.0
D_A bit p2.1
D_B bit p2.2

S_H bit p2.3
S_T bit p2.4
D_S bit p2.5

I2C_SCL BIT P3.0
I2C_SDA BIT P3.1

KbdData bit P3.3
KbdClock bit P3.2

Up bit P1.3
Menu bit p1.2
Down bit p1.1

BUZZER bit p1.0
;#########################################################################;
; alamat Ram
Flag_waktu_sholat bit 21h.0
flag_interupsi bit 21h.1
flag_keyboard bit 21h.2
Flag_tombol bit 21h.3
Flag_T_iqomah bit 21h.4
Flag_T_Jadwal bit 21h.5
Flag_T_EEPROM bit 21h.6
Flag_SHOLAT EQU 1BH
TMP EQU 1CH
Flag_adzan EQU 1DH
IQOMAH_MENIT EQU 1EH
IQOMAH_DETIK EQU 1FH

DETIKAN EQU 22H
RTCDetik DATA 23h ;00
RTCMenit DATA 24h ;01
RTCjam DATA 25h ;02
RTCHari DATA 26h ;03
RTCTanggal DATA 27h ;04
RTCBulan DATA 28h ;05
RTCTahun DATA 29h ;06

DPTR_HIGH equ 2ah
DPTR_LOW equ 2bh
Free_1 equ 2ch
Free_2 equ 2dh
Free_3 equ 2eh
Hexa_keyboard equ 2fh
Data_keyboard equ 30h
Puluhan equ 31h
;#########################################################################;
; alamat RAM
; Mulai Jam
rm01 equ 50 ; = 32H
rm02 equ 64
ram_t2 equ 78 ; Titik 2
rm03 equ 86
rm04 equ 100

rm01_a equ 60 ; =
rm02_a equ 74
; Mulai Running text
rm05 equ 116
rm06 equ 130
rm07 equ 144
rm08 equ 158
rm09 equ 172
rm10 equ 186
rm11 equ 200
rm12 equ 214
rm13 equ 228
rm14 equ 242
rm15 equ 241
;#########################################################################;
RTC_cs bit p3.5
; Memori RTC
;#########################################################################;
Isya_Jam EQU 40h
Isya_menit EQU 41h
Maghrib_Jam EQU 42h
Maghrib_menit EQU 43h
Ashar_Jam EQU 44h
Ashar_menit EQU 45h
Dzuhur_Jam EQU 46h
Dzuhur_menit EQU 47h
Subuh_Jam EQU 48h
Subuh_menit EQU 49h
imsya_Jam EQU 4ah
imsya_menit EQU 4bh

Led_1a equ 50h
Led_2a equ 51h
Led_3a equ 52h
Led_4a equ 53h
Led_1b equ 54h
Led_2b equ 55h
Led_3b equ 56h
Led_4b equ 57h
Led_1c equ 58h
Led_2c equ 59h
Led_3c equ 5ah
Led_4c equ 5bh
Led_1d equ 5ch
Led_2d equ 5dh
Led_3d equ 5eh
Led_4d equ 5fh
;#########################################################################;
Led_5a equ 60h
Led_6a equ 61h
Led_7a equ 62h
Led_8a equ 63h
Led_5b equ 64h
Led_6b equ 65h
Led_7b equ 66h
Led_8b equ 67h
Led_5c equ 68h
Led_6c equ 69h
Led_7c equ 6ah
Led_8c equ 6bh
Led_5d equ 6ch
Led_6d equ 6dh
Led_7d equ 6eh
Led_8d equ 6fh
;#########################################################################;
Led_9a equ 70h
Led_10a equ 71h
Led_11a equ 72h
Led_12a equ 73h
Led_9b equ 74h
Led_10b equ 75h
Led_11b equ 76h
Led_12b equ 77h
Led_9c equ 78h
Led_10c equ 79h
Led_11c equ 7ah
Led_12c equ 7bh
Led_9d equ 7ch
Led_10d equ 7dh
Led_11d equ 7eh
Led_12d equ 7fh
;##########################################################################
; Alamat eeprom
;##########################################################################
Shift equ 12h
Caps equ 58h
enter equ 5ah
Ctrl equ 14h

esc equ 76h
f1 equ 05h
f2 equ 06h
f3 equ 04h
f4 equ 0ch
f5 equ 03h
f12 equ 07h

data_huruf equ 5600
data_huruf_2 equ 6600
data_JADWAL equ 7600
;#########################################################################;
ORG 0

JMP MULAI ;Lompati Interupt Vector Table

ORG 13h
jmp Rutin_keyboard

;—– Program Utama mulai dari sini
ORG 30h

mulai: CLR O_E
CALL HAPUS_RAM
mov hexa_keyboard,#0ffh
clr flag_interupsi
setb Flag_waktu_sholat
setb Flag_tombol
setb flag_T_iqomah
setb flag_T_jadwal
clr buzzer

MOV R1,#10h
MOV A,#11010000b
MOV B,#07 ;address For Control DS1307
Call I2C_WriteByte

;call tulis_rtc_detik
;call Tulis_rtc_tgl
;call Tulis_rtc_bln

call readallrtc
mov DPTR,#Restart
call tampil_14_huruf
CALL StreamRTC

mov free_2,#100
looP_restart: call display_5
djnz free_2,looP_restart
MOV IE,#10000001b ;Hidupkan Interupsi INT0
mov DPTR,#Keyboard
call tampil_14_huruf
CALL StreamRTC

mov free_2,#150
looP_tungguk: call display_5
djnz free_2,looP_tungguk
MOV IE,#00000000b ;matikan Interupsi INT0
jmp ProgramLoop

Display_5: jb menu,scan_T_iqomah
jnb menu,$
clr flag_tombol
ret
scan_T_iqomah: jb up,scan_T_Jadwal
jnb up,$
clr flag_T_iqomah
ret
scan_T_Jadwal: jb Down,lanjut_4
jnb down,$
clr flag_T_Jadwal
ret

lanjut_4 : call Konversi_d
call tampil_d
call Konversi_c
call tampil_c
call Konversi_b
call tampil_b
call Konversi_a
call tampil_a
ret
;##########################################################################
; Program Utama
;##########################################################################
StreamRTC: MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL

call readallrtc
MOV A,rtcJAM
call swapa
CALL K_M_1
MOV A,rtcJAM
call Anl_A
CALL K_M_2
CALL TITIK_JAM
MOV A,rtcMENIT
call swapa
CALL K_M_3
MOV A,rtcMENIT
call Anl_A
CALL K_M_4

MOV DPH,DPTR_HIGH
MOV DPL,DPTR_LOW
Ret

StreamTGL: call readallrtc
MOV A,rtcTANGGAL
call swapa
CALL K_M_6
MOV A,rtcTANGGAL
call Anl_A
CALL K_M_7

MOV A,#’/’
CALL K_M_8

MOV A,rtcBULAN
call swapa
CALL K_M_9
MOV A,rtcBULAN
call Anl_A
CALL K_M_10

MOV A,#’/’
CALL K_M_11

MOV A,rtcTAHUN
call swapa
CALL K_M_12
MOV A,rtcTAHUN
call Anl_A
CALL K_M_13
Ret

;DB ‘ ‘,0FFH
Pesan3: db ‘ JAM : ‘,0ffh
Pesan4: db ‘ MENIT : ‘,0ffh
Pesan6: db ‘ TNGGAL: ‘,0ffh
Pesan7: db ‘ BULAN : ‘,0ffh
Pesan8: db ‘ TAHUN : ‘,0ffh

refresh_jame: call readallrtc
MOV A,rtcJAM
call swapa
CALL K_M_12
MOV A,rtcJAM
call Anl_A
CALL K_M_13
call display_5
ret

refresh_menite: call readallrtc
MOV A,rtcMENIT
call swapa
CALL K_M_12
MOV A,rtcMENIT
call Anl_A
CALL K_M_13
call display_5
ret

refresh_tanggale: call readallrtc
MOV A,rtcTANGGAL
call swapa
CALL K_M_12
MOV A,rtcTANGGAL
call Anl_A
CALL K_M_13
call display_5
ret

refresh_Bulane: call readallrtc
MOV A,rtcBULAN
call swapa
CALL K_M_12
MOV A,rtcBULAN
call Anl_A
CALL K_M_13
call display_5
ret

refresh_Tahune: call readallrtc
MOV A,rtcTAHUN
call swapa
CALL K_M_12
MOV A,rtcTAHUN
call Anl_A
CALL K_M_13
call display_5
ret

refresh_I_subuh: call baca_i_subuh
ret_refresh_I: MOV A,PULUHAN
call swapa
CALL K_M_12
MOV A,PULUHAN
call Anl_A
CALL K_M_13
call display_5
ret

refresh_I_dzuhur: call baca_i_DZUHUR
jmp ret_refresh_I
refresh_I_ashar: call baca_i_ASHAR
jmp ret_refresh_I
refresh_I_maghrib:call baca_i_MAGHRIB
jmp ret_refresh_I
refresh_I_isya: call baca_i_ISYA
jmp ret_refresh_I
refresh_I_alarm: call baca_ALARM
jmp ret_refresh_I
refresh_I_tambah: call baca_tambah
jmp ret_refresh_I
refresh_I_kurang: call baca_kurang
jmp ret_refresh_I
refresh_I_Stanby: call baca_Stanby
jmp ret_refresh_I

Anl_A: ANL A,#00Fh
Call GetLEDNum
ret
swapa: swap a
call Anl_A
ret

GetLEDNum: Inc A
MOVC A,@A+PC
Ret

CharLED1: DB ‘0’ ;0
DB ‘1’ ;1
DB ‘2’ ;2
DB ‘3’ ;3
DB ‘4’ ;4
DB ‘5’ ;5
DB ‘6’ ;6
DB ‘7’ ;7
DB ‘8’ ;8
DB ‘9’ ;9
;##########################################################################
ProgramLoop: call scanning_waktu_sholat
clr a
mov A,hexa_keyboard
cjne A,#f1,restart_0
clr flag_interupsi
jmp looping_keyboard

restart_0: cjne A,#f2,restart_awal
clr flag_interupsi
jmp looping_keyboard_2

restart_awal: jb Flag_waktu_sholat,GO_running_TEXT
setb flag_waktu_sholat
jmp Counting_iqomah
;#########################################################################
GO_running_TEXT: call hapus_ram
mov DPTR,#data_huruf
mov R3,dph
mov R4,dpl
call baca_eeprom
MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL
mov A,puluhan

L_kiri: call K_m_14
mov free_2,#7
jalan_kiri_L: call Scanning_waktu_sholat_isya_jam
call geser_KIRI_3
mov free_3,#2 ; kecepatan running
looP_Kiri: call display_5

cek_set_waktu_1: jb flag_tombol,Cek_iqomah_1
clr flag_interupsi
jmp Kybd_ctrl
Cek_Iqomah_1: jb flag_T_Iqomah,Cek_Jadwal_1
clr flag_interupsi
jmp Set_iqomah
Cek_Jadwal_1: jb flag_T_Jadwal,Selesai_1
clr flag_interupsi
jmp Set_Jadwal

Selesai_1: djnz free_3,looP_Kiri
djnz free_2,jalan_kiri_L
MOV DPH,DPTR_HIGH
MOV DPL,DPTR_LOW

inc dptr
mov R3,dph
mov R4,dpl
call baca_eeprom
mov A,puluhan

MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL
jb Flag_waktu_sholat,Lanjut_ff1
mov A,#0ffh
Lanjut_ff1: cjne a,#0ffh,L_kiri
clr O_E
CALL HAPUS_RAM

jb Flag_waktu_sholat,TAMPIL_KALENDER
setb flag_waktu_sholat
jmp Counting_iqomah
;##########################################################################
TAMPIL_KALENDER: CALL StreamRTC
CALL StreamTGL
CALL GESER

jb Flag_waktu_sholat,cek_set_waktu_2
setb flag_waktu_sholat
jmp Counting_iqomah

cek_set_waktu_2: jb flag_tombol,Cek_iqomah_2
clr flag_interupsi
jmp Kybd_ctrl
Cek_Iqomah_2: jb flag_T_Iqomah,Cek_Jadwal_2
clr flag_interupsi
jmp Set_iqomah
Cek_Jadwal_2: jb flag_T_Jadwal,Selesai_2
clr flag_interupsi
jmp Set_Jadwal
;##########################################################################
Selesai_2: call readallrtc
call scanning_waktu_sholat
call Konversi_JADWAL
TAMPIL_JADWAL: CALL StreamRTC
mov DPTR,#data_JADWAL
mov R3,dph
mov R4,dpl
call baca_eeprom
MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL
mov A,puluhan

L_JADWAL: call K_m_14
mov free_2,#7
jalan_JADWAL_L: call Scanning_waktu_sholat_isya_jam
call geser_KIRI_2
mov free_3,#2 ; kecepatan running
looP_JADWAL: call display_5

cek_set_waktu_3: jb flag_tombol,Cek_iqomah_3
clr flag_interupsi
jmp Kybd_ctrl
Cek_Iqomah_3: jb flag_T_Iqomah,Cek_Jadwal_3
clr flag_interupsi
jmp Set_iqomah
Cek_Jadwal_3: jb flag_T_Jadwal,Selesai_3
clr flag_interupsi
jmp Set_Jadwal

Selesai_3: djnz free_3,looP_JADWAL
djnz free_2,jalan_JADWAL_L

MOV DPH,DPTR_HIGH
MOV DPL,DPTR_LOW

inc dptr
mov R3,dph
mov R4,dpl
call baca_eeprom
mov A,puluhan

MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL

jb Flag_waktu_sholat,Lanjut_ff3
mov A,#0ffh
Lanjut_ff3: cjne a,#0ffh,L_JADWAL
clr O_E
CALL HAPUS_RAM
jb Flag_waktu_sholat,TAMPIL_JADWAL_2
setb flag_waktu_sholat
jmp Counting_iqomah

;##########################################################################
TAMPIL_JADWAL_2: clr O_E
call tunda_1_2_detik
CALL HAPUS_RAM
call readallrtc
call scanning_waktu_sholat
call Konversi_jws
call Konversi_Subuh
mov free_3,#0
u_jadwal: call display_5
call Scanning_waktu_sholat_isya_jam

cek_set_waktu_4: jb flag_tombol,Cek_iqomah_4
clr flag_interupsi
jmp Kybd_ctrl
Cek_Iqomah_4: jb flag_T_Iqomah,Cek_Jadwal_4
clr flag_interupsi
jmp Set_iqomah
Cek_Jadwal_4: jb flag_T_Jadwal,Selesai_4
clr flag_interupsi
jmp Set_Jadwal

Selesai_4: jb Flag_waktu_sholat,Lanjut_ff4
mov free_3,#1
Lanjut_ff4: djnz free_3,u_jadwal
CALL GESER_RAM

;#########################################################################
GO_running_TEXT_2:CALL HAPUS_RAM
mov DPTR,#data_huruf_2
mov R3,dph
mov R4,dpl
call baca_eeprom
MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL
mov A,puluhan

L_kiri_2: call K_m_14
mov free_2,#7
jalan_kiri_L_2: call Scanning_waktu_sholat_isya_jam
call geser_KIRI_3
mov free_3,#2 ; kecepatan running
looP_Kiri_2: call display_5

cek_set_waktu_5: jb flag_tombol,Cek_iqomah_5
clr flag_interupsi
jmp Kybd_ctrl
Cek_Iqomah_5: jb flag_T_Iqomah,Cek_Jadwal_5
clr flag_interupsi
jmp Set_iqomah
Cek_Jadwal_5: jb flag_T_Jadwal,Selesai_5
clr flag_interupsi
jmp Set_Jadwal

Selesai_5: djnz free_3,looP_Kiri_2
djnz free_2,jalan_kiri_L_2
MOV DPH,DPTR_HIGH
MOV DPL,DPTR_LOW

inc dptr
mov R3,dph
mov R4,dpl
call baca_eeprom
mov A,puluhan

MOV DPTR_HIGH,DPH
MOV DPTR_LOW,DPL
jb Flag_waktu_sholat,Lanjut_ff_2
mov A,#0ffh
Lanjut_ff_2: cjne a,#0ffh,L_kiri_2
clr O_E
CALL HAPUS_RAM

jb Flag_waktu_sholat,TAMPIL_JADWAL_3
setb flag_waktu_sholat
jmp Counting_iqomah

;##########################################################################
TAMPIL_JADWAL_3: clr O_E
call tunda_1_2_detik
CALL HAPUS_RAM
call readallrtc
call scanning_waktu_sholat
call Konversi_jws
call Konversi_Subuh
mov free_3,#0
u_jadwal_6: call display_5
call Scanning_waktu_sholat_isya_jam

cek_set_waktu_6: jb flag_tombol,Cek_iqomah_6
clr flag_interupsi
jmp Kybd_ctrl
Cek_Iqomah_6: jb flag_T_Iqomah,Cek_Jadwal_6
clr flag_interupsi
jmp Set_iqomah
Cek_Jadwal_6: jb flag_T_Jadwal,Selesai_6
clr flag_interupsi
jmp Set_Jadwal

Selesai_6: jb Flag_waktu_sholat,Lanjut_ff6
mov free_3,#1
Lanjut_ff6: djnz free_3,u_jadwal_6
CALL GESER_RAM

Super_loop: JMP ProgramLoop
;##########################################################################
GESER: mov R4,#0
u_jadwal_1: CALL StreamRTC
call display_5
djnz r4,u_jadwal_1

GESER_RAM: mov R3,#128
G_j: mov R4,#3
u2_jadwal: call display_5
djnz r4,u2_jadwal
call geser_KANAN
djnz R3,G_J
clr O_E
CALL HAPUS_RAM
RET
;##########################################################################
; jumlah huruf = 9
RESTART: DB ‘ RESTART ‘,0ffh
Keyboard: DB ‘ KYBORD F1′,0ffh

hapus_ram: mov R0,#rm01
mov R1,#192
U_hapus: mov @R0,#0ffh
inc r0
djnz R1,U_hapus
RET
;##########################################################################
Hps_A: clr a
movc A,@A+DPTR
ret

tampil_14_huruf: call Hps_A
call k_m_1
inc dptr
call Hps_A
call k_m_2
inc dptr

CALL TITIK_JAM

call Hps_A
call k_m_3
inc dptr
call Hps_A
call k_m_4
inc dptr

inc r0
mov @R0,#0ffh
inc r0
mov @R0,#0ffh

call Hps_A
call k_m_5
inc dptr
call Hps_A
call k_m_6
inc dptr
call Hps_A
call k_m_7
inc dptr
call Hps_A
call k_m_8
inc dptr
call Hps_A
call k_m_9
inc dptr
call Hps_A
call k_m_10
inc dptr
call Hps_A
call k_m_11
inc dptr
call Hps_A
call k_m_12
inc dptr
call Hps_A
call k_m_13
inc dptr
call Hps_A
call k_m_14
ret

TITIK_JAM: mov R0,#ram_t2
mov @R0,#0E3h
inc r0
mov @R0,#0c7h
inc r0
mov @R0,#0E3h
inc r0
mov @R0,#0c7h
inc r0
mov @R0,#0E3h
inc r0
mov @R0,#0c7h
inc r0
mov @R0,#0ffh
inc r0
mov @R0,#0ffh
RET

;##########################################################################
; KONVERSI 1 ASCII KE DATA DOT MATRIK
;##########################################################################
K_m_1: mov R0,#rm01
JMP sC_h
K_m_2: mov R0,#rm02
JMP sC_h
K_m_3: mov R0,#rm03
JMP sC_h
K_m_4: mov R0,#rm04
JMP sC_h
K_m_5: mov R0,#rm05
JMP sC_h
K_m_6: mov R0,#rm06
JMP sC_h
K_m_7: mov R0,#rm07
JMP sC_h
K_m_8: mov R0,#rm08
JMP sC_h
K_m_9: mov R0,#rm09
JMP sC_h
K_m_10: mov R0,#rm10
JMP sC_h
K_m_11: mov R0,#rm11
JMP sC_h
K_m_12: mov R0,#rm12
JMP sC_h
K_m_13: mov R0,#rm13
JMP sC_h
K_m_14: mov R0,#rm14
sC_h: call scan_huruf
ret
;##########################################################################
; Geser ke kiri
;##########################################################################
Geser_kiri_3: mov Free_1,#109
mov R1,#rm01
mov R0,#rm01+2
JMP Geser_kirii

Geser_kiri_2: mov Free_1,#76
mov R1,#rm05
mov R0,#rm05+2
JMP Geser_kirii

Geser_kiri: mov Free_1,#95
mov R1,#rm01
mov R0,#rm01+2

Geser_kirii: mov a,@r0
mov @R1,a
inc r0
inc r1
mov a,@r0
mov @R1,a
inc r0
inc r1
djnz Free_1,Geser_kirii
ret

Geser_kanan: MOV 30H,#0FFH
MOV 31H,#0FFH
mov Free_1,#96
mov R1,#rm15
mov R0,#rm15-2

Geser_kanaan: mov a,@r0
mov @R1,a
DEC r0
DEC r1
mov a,@r0
mov @R1,a
DEC r0
DEC r1
djnz Free_1,Geser_kanaan
ret
;##########################################################################
; Konversi Ascii ke Dot Matrix
; Dibuat oleh Sindhu Harimukti
; Jumat 03 agustus 2012
;##########################################################################
F_14x: mov free_3,#14
mov DPTR_high,dph
mov DPTR_low,dpl
ret

Scan_Huruf:
H_A: cjne a,#’A’,H_B
call F_14x
mov DPTR,#data_H_A
jmp A_d_m
H_B: cjne a,#’B’,H_C
call F_14x
mov DPTR,#data_H_B
jmp A_d_m
H_C: cjne a,#’C’,H_D
call F_14x
mov DPTR,#data_H_C
jmp A_d_m
H_D: cjne a,#’D’,H_E
call F_14x
mov DPTR,#data_H_D
jmp A_d_m
H_E: cjne a,#’E’,H_F
call F_14x
mov DPTR,#data_H_E
jmp A_d_m
H_F: cjne a,#’F’,H_G
call F_14x
mov DPTR,#data_H_F
jmp A_d_m
H_G: cjne a,#’G’,H_H
call F_14x
mov DPTR,#data_H_G
jmp A_d_m
H_H: cjne a,#’H’,H_I
call F_14x
mov DPTR,#data_H_H
jmp A_d_m
H_I: cjne a,#’I’,H_J
call F_14x
mov DPTR,#data_H_I
jmp A_d_m
H_J: cjne a,#’J’,H_K
call F_14x
mov DPTR,#data_H_J
jmp A_d_m
H_K: cjne a,#’K’,H_L
call F_14x
mov DPTR,#data_H_K
jmp A_d_m
H_L: cjne a,#’L’,H_M
call F_14x
mov DPTR,#data_H_L
jmp A_d_m
H_M: cjne a,#’M’,H_N
call F_14x
mov DPTR,#data_H_M
jmp A_d_m
H_N: cjne a,#’N’,H_O
call F_14x
mov DPTR,#data_H_N
jmp A_d_m
H_O: cjne a,#’O’,H_P
call F_14x
mov DPTR,#data_H_O
jmp A_d_m
H_P: cjne a,#’P’,H_Q
call F_14x
mov DPTR,#data_H_P
jmp A_d_m
H_Q: cjne a,#’Q’,H_R
call F_14x
mov DPTR,#data_H_Q
jmp A_d_m
H_R: cjne a,#’R’,H_S
call F_14x
mov DPTR,#data_H_R
jmp A_d_m
H_S: cjne a,#’S’,H_T
call F_14x
mov DPTR,#data_H_S
jmp A_d_m
H_T: cjne a,#’T’,H_U
call F_14x
mov DPTR,#data_H_T
jmp A_d_m
H_U: cjne a,#’U’,H_V
call F_14x
mov DPTR,#data_H_U
jmp A_d_m
H_V: cjne a,#’V’,H_W
call F_14x
mov DPTR,#data_H_V
jmp A_d_m
H_W: cjne a,#’W’,H_X
call F_14x
mov DPTR,#data_H_W
jmp A_d_m
H_X: cjne a,#’X’,H_Y
call F_14x
mov DPTR,#data_H_X
jmp A_d_m
H_Y: cjne a,#’Y’,H_Z
call F_14x
mov DPTR,#data_H_Y
jmp A_d_m
H_Z: cjne a,#’Z’,A_0
call F_14x
mov DPTR,#data_H_Z
jmp A_d_m
A_0: cjne a,#’0′,A_1
call F_14x
mov DPTR,#data_H_0
jmp A_d_m
A_1: cjne a,#’1′,A_2
call F_14x
mov DPTR,#data_H_1
jmp A_d_m
A_2: cjne a,#’2′,A_3
call F_14x
mov DPTR,#data_H_2
jmp A_d_m
A_3: cjne a,#’3′,A_4
call F_14x
mov DPTR,#data_H_3
jmp A_d_m
A_4: cjne a,#’4′,A_5
call F_14x
mov DPTR,#data_H_4
jmp A_d_m
A_5: cjne a,#’5′,A_6
call F_14x
mov DPTR,#data_H_5
jmp A_d_m
A_6: cjne a,#’6′,A_7
call F_14x
mov DPTR,#data_H_6
jmp A_d_m
A_7: cjne a,#’7′,A_8
call F_14x
mov DPTR,#data_H_7
jmp A_d_m
A_8: cjne a,#’8′,A_9
call F_14x
mov DPTR,#data_H_8
jmp A_d_m
A_9: cjne a,#’9′,spasi
call F_14x
mov DPTR,#data_H_9
jmp A_d_m
Spasi: cjne a,#’ ‘,titik
call F_14x
mov DPTR,#data_spasi
jmp A_d_m
Titik: cjne a,#’.’,koma
call F_14x
mov DPTR,#data_H_ti
jmp A_d_m
Koma: cjne a,#’,’,buka
call F_14x
mov DPTR,#data_H_ko
jmp A_d_m
Buka: cjne a,#'[‘,tutup
call F_14x
mov DPTR,#data_H_bu
jmp A_d_m
Tutup: cjne a,#’]’,strip
call F_14x
mov DPTR,#data_H_tu
jmp A_d_m
Strip: cjne a,#’-‘,garing
call F_14x
mov DPTR,#data_H_ST
jmp A_d_m
Garing: cjne a,#’/’,Ain
call F_14x
mov DPTR,#data_H_GA
jmp A_d_m
Ain: cjne a,#’`’,Sama
call F_14x
mov DPTR,#data_H_AI
jmp A_d_m
Sama: cjne a,#’=’,TITIK_2
call F_14x
mov DPTR,#data_H_SA
jmp A_d_m
TITIK_2: cjne a,#':’,keluar
call F_14x
mov DPTR,#data_H_T2
jmp A_d_m
keluar: ret
;##########################################################################
A_d_m : clr a
movc A,@A+DPTR
MOV @R0,A
inc r0
inc dptr
djnz free_3,A_d_m
mov Dph,DPTR_high
mov dpl,DPTR_low
ret
;##########################################################################
; Data Font Matrix 16×16
; Dibuat oleh Sindhu Harimukti
; sunday 03 feb 2013
;##########################################################################
data_H_A: db 0C0h,01h,080h,01h,0BFh,9Fh,0BFh,9Fh,080h,01h,0C0h,01h,0Ffh,0Ffh;OK
data_H_B: db 080h,01h,080h,01h,0BEh,7Dh,0BEh,7Dh,080h,01h,0C1h,83h,0Ffh,0Ffh;OK
data_H_C: db 0C0h,03h,080h,01h,09Fh,0F9h,0BFh,0FDh,09Fh,0F9h,0cFh,0F3h,0Ffh,0Ffh ;OK
data_H_D: db 080h,01h,080h,01h,0BFh,0FDh,0BFh,0FDh,080h,01h,0C0h,03h,0Ffh,0Ffh;OK
data_H_E: db 080h,01h,080h,01h,0BEh,7Dh,0BEh,7Dh,0BEh,7Dh,0BFh,0FDh,0Ffh,0Ffh ;OK
data_H_F: db 080h,01h,080h,01h,0BEh,7Fh,0BEh,7Fh,0BEh,7Fh,0BFh,0FFh,0Ffh,0Ffh ;OK
data_H_G: db 0C0h,03h,080h,01h,09Fh,0F9h,0BEh,7Dh,0BEh,3Dh,0CEh,03h,0Ffh,0Ffh ;OK
data_H_H: db 080h,01h,080h,01h,0FEh,7Fh,0FEh,7Fh,080h,01h,080h,01h,0Ffh,0Ffh ;OK
data_H_I: db 0BFh,0FDh,0BFh,0FDh,80h,01h,80h,01h,0BFh,0FDh,0BFh,0FDh,0Ffh,0Ffh ;OK
data_H_J: db 0FFh,0F7h,0BFh,0FBh,0BFh,0FDh,0BFh,0FDh,080h,01h,080h,03h,0Ffh,0Ffh ;OK
data_H_K: db 080h,01h,080h,01h,0F8h,3Fh,0E3h,8Fh,0CFh,0E3h,9Fh,0F9h,0Ffh,0Ffh ;OK
data_H_L: db 080h,01h,080h,01h,0FFh,0FDh,0FFh,0FDh,0FFh,0FDh,0FFh,0FDh,0Ffh,0Ffh ;OK
data_H_M: db 080h,01h,9Fh,0FFh,0E0h,0FFh,0E0h,0FFh,09Fh,0FFh,080h,01h,0Ffh,0Ffh ;OK
data_H_N: db 080h,01h,080h,01h,0F0h,7Fh,0FFh,1Fh,0FFh,8Fh,080h,01h,0Ffh,0Ffh ;OK
data_H_O: db 0C0h,03h,080h,01h,0BFh,0FDh,0BFh,0FDh,80h,01h,0C0h,03h,0Ffh,0Ffh ;OK
data_H_P: db 080h,01h,080h,01h,0BFh,0BFh,0BFh,0BFh,080h,03Fh,080h,7Fh,0Ffh,0Ffh ;OK
data_H_Q: db 0C0h,07h,080h,03h,0BFh,0FBh,0BFh,0E3h,080h,07h,0C0h,09h,0Ffh,0Ffh ;OK
data_H_R: db 080h,01h,080h,01h,0BEh,3Fh,0BEh,3Fh,080h,81h,0C1h,0C1h,0Ffh,0Ffh ;OK
data_H_S: db 0C1h,0F3h,080h,0F1h,0BCh,7Dh,0BEh,3Dh,08Fh,01h,0CFh,83h,0Ffh,0Ffh ;OK
data_H_T: db 0BFh,0FFh,0BFh,0FFh,080h,01h,080h,01h,0BFh,0FFh,0BFh,0FFh,0Ffh,0Ffh;OK
data_H_U: db 080h,03h,080h,01h,0FFh,0FDh,0FFh,0FDh,080h,01h,080h,03h,0Ffh,0Ffh ;OK
data_H_V: db 080h,0Fh,080h,07h,0FFh,0F9h,0FFh,0F9h,080h,07h,080h,0Fh,0Ffh,0Ffh ;OK
data_H_W: db 080h,03h,0FFh,0FDh,0FFh,83h,0FFh,83h,0FFh,0FDh,080h,03h,0Ffh,0Ffh ;OK
data_H_X: db 083h,0C1h,081h,81h,0FEh,7Fh,0FEh,7Fh,81h,81h,083h,0C1h,0Ffh,0Ffh ;OK
data_H_Y: db 080h,0FFh,080h,7Fh,0FEh,01h,0FEh,01h,080h,7Fh,80h,0FFh,0Ffh,0Ffh ;OK
data_H_Z: db 0BFh,81h,0BFh,01h,0BEh,7Dh,0BCh,0FDh,081h,0FDh,081h,0FDh,0Ffh,0Ffh ;OK

data_H_TI: db 0FFh,0FFh,0FFh,0FFh,0FFh,0F1h,0FFh,0F1h,0FFh,0F1h,0FFh,0FFh,0Ffh,0Ffh ;OK
data_H_KO: db 0FFh,0FFh,0FFh,0FFh,0FFh,0FDh,0FFh,0E9h,0FFh,0E1h,0FFh,0E3h,0Ffh,0Ffh ;OK
data_H_AI: db 0FFh,0FFh,0FFh,0FFh,0BFh,0FFh,09Bh,0FFh,083h,0FFH,0C7h,0FFh,0Ffh,0Ffh ;OK
data_H_BU: db 0C0h,003h,080h,001h,09Fh,0F9h,0BFh,0FDh,0BFh,0FDh,0BFh,0FDh,0Ffh,0Ffh ;OK
data_H_TU: db 0BFh,0FDh,0BFh,0FDh,0BFh,0FDH,09Fh,0F9h,080h,001h,0C0h,003h,0Ffh,0Ffh ;OK
data_H_ST: db 0FEh,07Fh,0FEh,07Fh,0FEh,07Fh,0FEh,07Fh,0FEh,07Fh,0FEh,07Fh,0Ffh,0Ffh ;OK
data_H_GA: db 0FFh,0FFh,0FFh,0F1h,0FFh,08Fh,0FCh,07Fh,0E3h,0FFh,09Fh,0FFh,0Ffh,0Ffh ;OK
data_H_SA: db 0F9h,09Fh,0F9h,09Fh,0F9h,09Fh,0F9h,09Fh,0F9h,09Fh,0F9h,09Fh,0Ffh,0Ffh ;OK

data_H_T2: db 0FFh,0FFh,0FFh,0FFh,0F1h,08Fh,0F1h,08Fh,0F1h,08Fh,0FFh,0FFh,0Ffh,0Ffh ;OK
;{0xe01f,0x8007,0x8007,0x1fe3,0x3ff3,0x1fe3,0x8007,0x8007,0xe01f,0xffff};
data_H_0: db 0C0h,03h,080h,01h,0BFh,0FDh,0BFh,0FDh,080h,01h,0C0h,03h,0ffh,0ffh ;OKE
data_H_1: db 0F7h,0F9h,0E7h,0F9h,080h,01h,080h,01h,0Ffh,0f9h,0FFh,0F9h,0ffh,0ffh ;OKE
data_H_2: db 0C7h,81h,087h,01h,0BEh,39h,0BCh,079h,080h,0F9h,0C1h,0F9h,0ffh,0ffh ;OKE
data_H_3: db 0C7h,0E3h,08Eh,71h,0BEh,7Dh,0BEh,7Dh,88h,11h,0C1h,83h,0ffh,0ffh ;OKE
data_H_4: db 0C0h,0FFh,080h,7Fh,0FEh,7Fh,0FEh,7Fh,080h,03h,0C0h,01h,0ffh,0ffh ;OKE
data_H_5: db 080h,0E3h,080h,0F1h,09Ch,7Dh,09Eh,7Dh,09Eh,01h,09Fh,03h,0ffh,0ffh ;OKE
data_H_6: db 0C0h,03h,080h,01h,09Ch,0FDh,0BCh,0FDh,0BCh,01h,0BEh,03h,0ffh,0ffh ;OKE
data_H_7: db 09Fh,0F1h,09Fh,0C1h,09Fh,01h,09Ch,7Fh,080h,0FFh,083h,0FFh,0ffh,0ffh ;OK
data_H_8: db 0C1h,83h,080h,01h,0BEh,07Dh,0BEh,07Dh,080h,01h,0C1h,83h,0ffh,0ffh ;OKE
data_H_9: db 0C1h,0F3h,080h,71h,0BEh,07Dh,0BEh,07Dh,080h,01h,0C0h,03h,0ffh,0ffh ;OKE
data_spasi: db 0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh,0ffh ;OKE
;##########################################################################

;##########################################################################
konvert_b1: clr a
mov 20h,@r0
jb 20h.0,C00
clr acc.7
jmp c1
c00: setb acc.7

c1: call T2_r0
mov 20h,@r0
jb 20h.0,C11
clr acc.6
jmp c2
c11: setb acc.6

c2: call T2_r0
mov 20h,@r0
jb 20h.0,C22
clr acc.5
jmp c3
c22: setb acc.5

c3: call T2_r0
mov 20h,@r0
jb 20h.0,C33
clr acc.4
jmp c4
c33: setb acc.4

c4: call T2_r0
mov 20h,@r0
jb 20h.0,C44
clr acc.3
jmp c5
c44: setb acc.3

c5: call T2_r0
mov 20h,@r0
jb 20h.0,C55
clr acc.2
jmp c6
c55: setb acc.2

c6: call T2_r0
mov 20h,@r0
jb 20h.0,C66
clr acc.1
jmp c7
c66: setb acc.1

c7: call T2_r0
mov 20h,@r0
jb 20h.0,C77
clr acc.0
jmp c8
c77: setb acc.0

c8: ret
;##########################################################################
konvert_b2: clr a
mov 20h,@r0
jb 20h.1,C00b
clr acc.7
jmp c1b
c00b: setb acc.7

c1b: call T2_r0
mov 20h,@r0
jb 20h.1,C11b
clr acc.6
jmp c2b
c11b: setb acc.6

c2b: call T2_r0
mov 20h,@r0
jb 20h.1,C22b
clr acc.5
jmp c3b
c22b: setb acc.5

c3b: call T2_r0
mov 20h,@r0
jb 20h.1,C33b
clr acc.4
jmp c4b
c33b: setb acc.4

c4b: call T2_r0
mov 20h,@r0
jb 20h.1,C44b
clr acc.3
jmp c5b
c44b: setb acc.3

c5b: call T2_r0
mov 20h,@r0
jb 20h.1,C55b
clr acc.2
jmp c6b
c55b: setb acc.2

c6b: call T2_r0
mov 20h,@r0
jb 20h.1,C66b
clr acc.1
jmp c7b
c66b: setb acc.1

c7b: call T2_r0
mov 20h,@r0
jb 20h.1,C77b
clr acc.0
jmp c8b
c77b: setb acc.0

c8b: ret

;##########################################################################
konvert_b3: clr a
mov 20h,@r0
jb 20h.2,C00c
clr acc.7
jmp c1c
c00c: setb acc.7

c1c: call T2_r0
mov 20h,@r0
jb 20h.2,C11c
clr acc.6
jmp c2c
c11c: setb acc.6

c2c: call T2_r0
mov 20h,@r0
jb 20h.2,C22c
clr acc.5
jmp c3c
c22c: setb acc.5

c3c: call T2_r0
mov 20h,@r0
jb 20h.2,C33c
clr acc.4
jmp c4c
c33c: setb acc.4

c4c: call T2_r0
mov 20h,@r0
jb 20h.2,C44c
clr acc.3
jmp c5c
c44c: setb acc.3

c5c: call T2_r0
mov 20h,@r0
jb 20h.2,C55c
clr acc.2
jmp c6c
c55c: setb acc.2

c6c: call T2_r0
mov 20h,@r0
jb 20h.2,C66c
clr acc.1
jmp c7c
c66c: setb acc.1

c7c: call T2_r0
mov 20h,@r0
jb 20h.2,C77c
clr acc.0
jmp c8c
c77c: setb acc.0

c8c: ret
;##########################################################################
konvert_b4: clr a
mov 20h,@r0
jb 20h.3,C00d
clr acc.7
jmp c1d
c00d: setb acc.7

c1d: call T2_r0
mov 20h,@r0
jb 20h.3,C11d
clr acc.6
jmp c2d
c11d: setb acc.6

c2d: call T2_r0
mov 20h,@r0
jb 20h.3,C22d
clr acc.5
jmp c3d
c22d: setb acc.5

c3d: call T2_r0
mov 20h,@r0
jb 20h.3,C33d
clr acc.4
jmp c4d
c33d: setb acc.4

c4d: call T2_r0
mov 20h,@r0
jb 20h.3,C44d
clr acc.3
jmp c5d
c44d: setb acc.3

c5d: call T2_r0
mov 20h,@r0
jb 20h.3,C55d
clr acc.2
jmp c6d
c55d: setb acc.2

c6d: call T2_r0
mov 20h,@r0
jb 20h.3,C66d
clr acc.1
jmp c7d
c66d: setb acc.1

c7d: call T2_r0
mov 20h,@r0
jb 20h.3,C77d
clr acc.0
jmp c8d
c77d: setb acc.0

c8d: ret
;##########################################################################
konvert_b5: clr a
mov 20h,@r0
jb 20h.4,C00e
clr acc.7
jmp c1e
c00e: setb acc.7

c1e: call T2_r0
mov 20h,@r0
jb 20h.4,C11e
clr acc.6
jmp c2e
c11e: setb acc.6

c2e: call T2_r0
mov 20h,@r0
jb 20h.4,C22e
clr acc.5
jmp c3e
c22e: setb acc.5

c3e: call T2_r0
mov 20h,@r0
jb 20h.4,C33e
clr acc.4
jmp c4e
c33e: setb acc.4

c4e: call T2_r0
mov 20h,@r0
jb 20h.4,C44e
clr acc.3
jmp c5e
c44e: setb acc.3

c5e: call T2_r0
mov 20h,@r0
jb 20h.4,C55e
clr acc.2
jmp c6e
c55e: setb acc.2

c6e: call T2_r0
mov 20h,@r0
jb 20h.4,C66e
clr acc.1
jmp c7e
c66e: setb acc.1

c7e: call T2_r0
mov 20h,@r0
jb 20h.4,C77e
clr acc.0
jmp c8e
c77e: setb acc.0

c8e: ret
;##########################################################################
konvert_b6: clr a
mov 20h,@r0
jb 20h.5,C00f
clr acc.7
jmp c1f
c00f: setb acc.7

c1f: call T2_r0
mov 20h,@r0
jb 20h.5,C11f
clr acc.6
jmp c2f
c11f: setb acc.6

c2f: call T2_r0
mov 20h,@r0
jb 20h.5,C22f
clr acc.5
jmp c3f
c22f: setb acc.5

c3f: call T2_r0
mov 20h,@r0
jb 20h.5,C33f
clr acc.4
jmp c4f
c33f: setb acc.4

c4f: call T2_r0
mov 20h,@r0
jb 20h.5,C44f
clr acc.3
jmp c5f
c44f: setb acc.3

c5f: call T2_r0
mov 20h,@r0
jb 20h.5,C55f
clr acc.2
jmp c6f
c55f: setb acc.2

c6f: call T2_r0
mov 20h,@r0
jb 20h.5,C66f
clr acc.1
jmp c7f
c66f: setb acc.1

c7f: call T2_r0
mov 20h,@r0
jb 20h.5,C77f
clr acc.0
jmp c8f
c77f: setb acc.0

c8f: ret
;##########################################################################
konvert_b7: clr a
mov 20h,@r0
jb 20h.6,C00g
clr acc.7
jmp c1g
c00g: setb acc.7

c1g: call T2_r0
mov 20h,@r0
jb 20h.6,C11g
clr acc.6
jmp c2g
c11g: setb acc.6

c2g: call T2_r0
mov 20h,@r0
jb 20h.6,C22g
clr acc.5
jmp c3g
c22g: setb acc.5

c3g: call T2_r0
mov 20h,@r0
jb 20h.6,C33g
clr acc.4
jmp c4g
c33g: setb acc.4

c4g: call T2_r0
mov 20h,@r0
jb 20h.6,C44g
clr acc.3
jmp c5g
c44g: setb acc.3

c5g: call T2_r0
mov 20h,@r0
jb 20h.6,C55g
clr acc.2
jmp c6g
c55g: setb acc.2

c6g: call T2_r0
mov 20h,@r0
jb 20h.6,C66g
clr acc.1
jmp c7g
c66g: setb acc.1

c7g: call T2_r0
mov 20h,@r0
jb 20h.6,C77g
clr acc.0
jmp c8g
c77g: setb acc.0

c8g: ret
;##########################################################################
konvert_b8: clr a
mov 20h,@r0
jb 20h.7,C00H
clr acc.7
jmp c1H
c00H: setb acc.7

c1H: call T2_r0
mov 20h,@r0
jb 20h.7,C11H
clr acc.6
jmp c2H
c11H: setb acc.6

c2H: call T2_r0
mov 20h,@r0
jb 20h.7,C22H
clr acc.5
jmp c3H
c22H: setb acc.5

c3H: call T2_r0
mov 20h,@r0
jb 20h.7,C33H
clr acc.4
jmp c4H
c33H: setb acc.4

c4H: call T2_r0
mov 20h,@r0
jb 20h.7,C44H
clr acc.3
jmp c5H
c44H: setb acc.3

c5H: call T2_r0
mov 20h,@r0
jb 20h.7,C55H
clr acc.2
jmp c6H
c55H: setb acc.2

c6H: call T2_r0
mov 20h,@r0
jb 20h.7,C66H
clr acc.1
jmp c7H
c66H: setb acc.1

c7H: call T2_r0
mov 20h,@r0
jb 20h.7,C77H
clr acc.0
jmp c8H
c77H: setb acc.0

c8H: ret

;#########################################################################;
;tulis_ke_eeprom: mov r3,dptr_high
; mov r4,DPTR_low
; mov dptr_high,dph
; mov DPTR_low,dpl
; call Tulis_eeprom

;Baca_ke_eeprom: mov r3,dptr_high
; mov r4,DPTR_low
; mov dptr_high,dph
; mov DPTR_low,dpl
; call baca_eeprom

Konversi_JADWAL: clr a
MOV DPTR,#DATA_JADWAL

CALL COPY_R3_R4
MOV R1,#’J’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’D’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’W’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’L’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’S’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’H’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’O’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’L’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’T’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’H’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’R’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’I’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’I’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’N’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’I’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’I’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’M’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’S’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’K’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

MOV R1,#IMSYA_JAM
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#IMSYA_JAM
call E_ANL
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#':’
CALL T_NENG_EEPROM
MOV R1,#IMSYA_MENIT
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#IMSYA_MENIT
call E_ANL
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’,’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
;##########################################################################
CALL COPY_R3_R4
MOV R1,#’S’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’U’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’B’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’U’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’H’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

MOV R1,#SUBUH_JAM
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#SUBUH_JAM
call E_ANL
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#':’
CALL T_NENG_EEPROM
MOV R1,#SUBUH_MENIT
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#SUBUH_MENIT
call E_ANL
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’,’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
;##########################################################################
CALL COPY_R3_R4
MOV R1,#’D’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’Z’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’U’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’H’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’U’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’R’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

MOV R1,#DZUHUR_JAM
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#DZUHUR_JAM
call E_ANL
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#':’
CALL T_NENG_EEPROM
MOV R1,#DZUHUR_MENIT
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#DZUHUR_MENIT
call E_ANL
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’,’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
;##########################################################################
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’S’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’H’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’R’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

MOV R1,#ASHAR_JAM
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#ASHAR_JAM
call E_ANL
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#':’
CALL T_NENG_EEPROM
MOV R1,#ASHAR_MENIT
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#ASHAR_MENIT
call E_ANL
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’,’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
;##########################################################################
CALL COPY_R3_R4
MOV R1,#’M’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’G’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’H’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’R’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’I’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’B’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

MOV R1,#MAGHRIB_JAM
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#MAGHRIB_JAM
call E_ANL
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#':’
CALL T_NENG_EEPROM
MOV R1,#MAGHRIB_MENIT
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#MAGHRIB_MENIT
call E_ANL
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’,’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
;##########################################################################
CALL COPY_R3_R4
MOV R1,#’I’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’S’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’Y’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’A’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM

MOV R1,#ISYA_JAM
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#ISYA_JAM
call E_ANL
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#':’
CALL T_NENG_EEPROM
MOV R1,#ISYA_MENIT
call E_SWAP
CALL T_NENG_EEPROM
MOV R1,#ISYA_MENIT
call E_ANL
CALL T_NENG_EEPROM

CALL COPY_R3_R4
MOV R1,#’.’
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
;##########################################################################
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#’ ‘
CALL T_NENG_EEPROM
CALL COPY_R3_R4
MOV R1,#0FFH
CALL T_NENG_EEPROM
RET

E_SWAP: CLR RTC_CS
MOVX A,@R1
SETB RTC_CS
call swapa
CALL COPY_R3_R4
MOV R1,A
RET

E_ANL: CLR RTC_CS
MOVX A,@R1
SETB RTC_CS
call Anl_A
CALL COPY_R3_R4
MOV R1,A
RET

T_NENG_EEPROM: call Tulis_eeprom
CALL Tunda_1_Detik
INC DPTR
RET

COPY_R3_R4: MOV R3,DPH
MOV R4,DPL
RET

Tunda_1_Detik: MOV R7,#6
Tunda1DetikL2a: MOV R6,#50
Tunda1DetikL1a: MOV R5,#50
DJNZ R5,$
DJNZ R6,Tunda1DetikL1a
DJNZ R7,Tunda1DetikL2a
Ret

Tunda_1_2_Detik: MOV R7,#12
Tunda1DetikL2B: MOV R6,#100
Tunda1DetikL1B: MOV R5,#230
DJNZ R5,$
DJNZ R6,Tunda1DetikL1B
DJNZ R7,Tunda1DetikL2B
Ret
;##########################################################################
; Tampilan Dotmatrix
;##########################################################################
T2_r0: inc r0
inc r0
ret

T2_R0_B8: call T2_r0
call konvert_b8
ret
T2_R0_B7: call T2_r0
call konvert_b7
ret
T2_R0_B6: call T2_r0
call konvert_b6
ret
T2_R0_B5: call T2_r0
call konvert_b5
ret
T2_R0_B4: call T2_r0
call konvert_b4
ret
T2_R0_B3: call T2_r0
call konvert_b3
ret
T2_R0_B2: call T2_r0
call konvert_b2
ret
T2_R0_B1: call T2_r0
call konvert_b1
ret
;##########################################################################
L_1a: mov R1,#Led_1a
jmp A_ke_R1
L_2a: mov R1,#Led_2a
jmp A_ke_R1
L_3a: mov R1,#Led_3a
jmp A_ke_R1
L_4a: mov R1,#Led_4a
jmp A_ke_R1
L_5a: mov R1,#Led_5a
jmp A_ke_R1
L_6a: mov R1,#Led_6a
jmp A_ke_R1
L_7a: mov R1,#Led_7a
jmp A_ke_R1
L_8a: mov R1,#Led_8a
jmp A_ke_R1
L_9a: mov R1,#Led_9a
jmp A_ke_R1
L_10a: mov R1,#Led_10a
jmp A_ke_R1
L_11a: mov R1,#Led_11a
jmp A_ke_R1
L_12a: mov R1,#Led_12a
jmp A_ke_R1
;##########################################################################
L_1b: mov R1,#Led_1b
jmp A_ke_R1
L_2b: mov R1,#Led_2b
jmp A_ke_R1
L_3b: mov R1,#Led_3b
jmp A_ke_R1
L_4b: mov R1,#Led_4b
jmp A_ke_R1
L_5b: mov R1,#Led_5b
jmp A_ke_R1
L_6b: mov R1,#Led_6b
jmp A_ke_R1
L_7b: mov R1,#Led_7b
jmp A_ke_R1
L_8b: mov R1,#Led_8b
jmp A_ke_R1
L_9b: mov R1,#Led_9b
jmp A_ke_R1
L_10b: mov R1,#Led_10b
jmp A_ke_R1
L_11b: mov R1,#Led_11b
jmp A_ke_R1
L_12b: mov R1,#Led_12b
jmp A_ke_R1
;##########################################################################
L_1c: mov R1,#Led_1c
jmp A_ke_R1
L_2c: mov R1,#Led_2c
jmp A_ke_R1
L_3c: mov R1,#Led_3c
jmp A_ke_R1
L_4c: mov R1,#Led_4c
jmp A_ke_R1
L_5c: mov R1,#Led_5c
jmp A_ke_R1
L_6c: mov R1,#Led_6c
jmp A_ke_R1
L_7c: mov R1,#Led_7c
jmp A_ke_R1
L_8c: mov R1,#Led_8c
jmp A_ke_R1
L_9c: mov R1,#Led_9c
jmp A_ke_R1
L_10c: mov R1,#Led_10c
jmp A_ke_R1
L_11c: mov R1,#Led_11c
jmp A_ke_R1
L_12c: mov R1,#Led_12c
jmp A_ke_R1
;##########################################################################
L_1d: mov R1,#Led_1d
jmp A_ke_R1
L_2d: mov R1,#Led_2d
jmp A_ke_R1
L_3d: mov R1,#Led_3d
jmp A_ke_R1
L_4d: mov R1,#Led_4d
jmp A_ke_R1
L_5d: mov R1,#Led_5d
jmp A_ke_R1
L_6d: mov R1,#Led_6d
jmp A_ke_R1
L_7d: mov R1,#Led_7d
jmp A_ke_R1
L_8d: mov R1,#Led_8d
jmp A_ke_R1
L_9d: mov R1,#Led_9d
jmp A_ke_R1
L_10d: mov R1,#Led_10d
jmp A_ke_R1
L_11d: mov R1,#Led_11d
jmp A_ke_R1
L_12d: mov R1,#Led_12d
A_ke_R1: movx @R1,a
ret
;##########################################################################
; KOnversi Baris 1 sampai 16
;##########################################################################
Konversi_a: mov R0,#rm01
call konvert_b8
clr rtc_cs
call L_1a
call T2_R0_B8
call L_2a
call T2_R0_B8
call L_3a
call T2_R0_B8
call L_4a
call T2_R0_B8
call L_5a
call T2_R0_B8
call L_6a
call T2_R0_B8
call L_7a
call T2_R0_B8
call L_8a
call T2_R0_B8
call L_9a
call T2_R0_B8
call L_10a
call T2_R0_B8
call L_11a
call T2_R0_B8
call L_12a

mov R0,#rm01
call konvert_b4
call L_1b
call T2_R0_B4
call L_2b
call T2_R0_B4
call L_3b
call T2_R0_B4
call L_4b
call T2_R0_B4
call L_5b
call T2_R0_B4
call L_6b
call T2_R0_B4
call L_7b
call T2_R0_B4
call L_8b
call T2_R0_B4
call L_9b
call T2_R0_B4
call L_10b
call T2_R0_B4
call L_11b
call T2_R0_B4
call L_12b

mov R0,#rm01+1
call konvert_b8
call L_1c
call T2_R0_B8
call L_2c
call T2_R0_B8
call L_3c
call T2_R0_B8
call L_4c
call T2_R0_B8
call L_5c
call T2_R0_B8
call L_6c
call T2_R0_B8
call L_7c
call T2_R0_B8
call L_8c
call T2_R0_B8
call L_9c
call T2_R0_B8
call L_10c
call T2_R0_B8
call L_11c
call T2_R0_B8
call L_12c

mov R0,#rm01+1
call konvert_b4
call L_1d
call T2_R0_B4
call L_2d
call T2_R0_B4
call L_3d
call T2_R0_B4
call L_4d
call T2_R0_B4
call L_5d
call T2_R0_B4
call L_6d
call T2_R0_B4
call L_7d
call T2_R0_B4
call L_8d
call T2_R0_B4
call L_9d
call T2_R0_B4
call L_10d
call T2_R0_B4
call L_11d
call T2_R0_B4
call L_12d

setb rtc_cs
ret
;##########################################################################
Konversi_b: mov R0,#rm01
call konvert_b7
clr rtc_cs
call L_1a
call T2_R0_B7
call L_2a
call T2_R0_B7
call L_3a
call T2_R0_B7
call L_4a
call T2_R0_B7
call L_5a
call T2_R0_B7
call L_6a
call T2_R0_B7
call L_7a
call T2_R0_B7
call L_8a
call T2_R0_B7
call L_9a
call T2_R0_B7
call L_10a
call T2_R0_B7
call L_11a
call T2_R0_B7
call L_12a

mov R0,#rm01
call konvert_b3
call L_1b
call T2_R0_B3
call L_2b
call T2_R0_B3
call L_3b
call T2_R0_B3
call L_4b
call T2_R0_B3
call L_5b
call T2_R0_B3
call L_6b
call T2_R0_B3
call L_7b
call T2_R0_B3
call L_8b
call T2_R0_B3
call L_9b
call T2_R0_B3
call L_10b
call T2_R0_B3
call L_11b
call T2_R0_B3
call L_12b

mov R0,#rm01+1
call konvert_b7
call L_1c
call T2_R0_B7
call L_2c
call T2_R0_B7
call L_3c
call T2_R0_B7
call L_4c
call T2_R0_B7
call L_5c
call T2_R0_B7
call L_6c
call T2_R0_B7
call L_7c
call T2_R0_B7
call L_8c
call T2_R0_B7
call L_9c
call T2_R0_B7
call L_10c
call T2_R0_B7
call L_11c
call T2_R0_B7
call L_12c

mov R0,#rm01+1
call konvert_b3
call L_1d
call T2_R0_B3
call L_2d
call T2_R0_B3
call L_3d
call T2_R0_B3
call L_4d
call T2_R0_B3
call L_5d
call T2_R0_B3
call L_6d
call T2_R0_B3
call L_7d
call T2_R0_B3
call L_8d
call T2_R0_B3
call L_9d
call T2_R0_B3
call L_10d
call T2_R0_B3
call L_11d
call T2_R0_B3
call L_12d

setb rtc_cs
ret
;##########################################################################
Konversi_c: mov R0,#rm01
clr rtc_cs
call konvert_b6
call L_1a
call T2_R0_B6
call L_2a
call T2_R0_B6
call L_3a
call T2_R0_B6
call L_4a
call T2_R0_B6
call L_5a
call T2_R0_B6
call L_6a
call T2_R0_B6
call L_7a
call T2_R0_B6
call L_8a
call T2_R0_B6
call L_9a
call T2_R0_B6
call L_10a
call T2_R0_B6
call L_11a
call T2_R0_B6
call L_12a

mov R0,#rm01
call konvert_b2
call L_1b
call T2_R0_B2
call L_2b
call T2_R0_B2
call L_3b
call T2_R0_B2
call L_4b
call T2_R0_B2
call L_5b
call T2_R0_B2
call L_6b
call T2_R0_B2
call L_7b
call T2_R0_B2
call L_8b
call T2_R0_B2
call L_9b
call T2_R0_B2
call L_10b
call T2_R0_B2
call L_11b
call T2_R0_B2
call L_12b

mov R0,#rm01+1
call konvert_b6
call L_1c
call T2_R0_B6
call L_2c
call T2_R0_B6
call L_3c
call T2_R0_B6
call L_4c
call T2_R0_B6
call L_5c
call T2_R0_B6
call L_6c
call T2_R0_B6
call L_7c
call T2_R0_B6
call L_8c
call T2_R0_B6
call L_9c
call T2_R0_B6
call L_10c
call T2_R0_B6
call L_11c
call T2_R0_B6
call L_12c

mov R0,#rm01+1
call konvert_b2
call L_1d
call T2_R0_B2
call L_2d
call T2_R0_B2
call L_3d
call T2_R0_B2
call L_4d
call T2_R0_B2
call L_5d
call T2_R0_B2
call L_6d
call T2_R0_B2
call L_7d
call T2_R0_B2
call L_8d
call T2_R0_B2
call L_9d
call T2_R0_B2
call L_10d
call T2_R0_B2
call L_11d
call T2_R0_B2
call L_12d

setb rtc_cs
ret
;##########################################################################
Konversi_d: mov R0,#rm01
clr rtc_cs
call konvert_b5
call L_1a
call T2_R0_B5
call L_2a
call T2_R0_B5
call L_3a
call T2_R0_B5
call L_4a
call T2_R0_B5
call L_5a
call T2_R0_B5
call L_6a
call T2_R0_B5
call L_7a
call T2_R0_B5
call L_8a
call T2_R0_B5
call L_9a
call T2_R0_B5
call L_10a
call T2_R0_B5
call L_11a
call T2_R0_B5
call L_12a

mov R0,#rm01
call konvert_b1
call L_1b
call T2_R0_B1
call L_2b
call T2_R0_B1
call L_3b
call T2_R0_B1
call L_4b
call T2_R0_B1
call L_5b
call T2_R0_B1
call L_6b
call T2_R0_B1
call L_7b
call T2_R0_B1
call L_8b
call T2_R0_B1
call L_9b
call T2_R0_B1
call L_10b
call T2_R0_B1
call L_11b
call T2_R0_B1
call L_12b

mov R0,#rm01+1
call konvert_b5
call L_1c
call T2_R0_B5
call L_2c
call T2_R0_B5
call L_3c
call T2_R0_B5
call L_4c
call T2_R0_B5
call L_5c
call T2_R0_B5
call L_6c
call T2_R0_B5
call L_7c
call T2_R0_B5
call L_8c
call T2_R0_B5
call L_9c
call T2_R0_B5
call L_10c
call T2_R0_B5
call L_11c
call T2_R0_B5
call L_12c

mov R0,#rm01+1
call konvert_b1
call L_1d
call T2_R0_B1
call L_2d
call T2_R0_B1
call L_3d
call T2_R0_B1
call L_4d
call T2_R0_B1
call L_5d
call T2_R0_B1
call L_6d
call T2_R0_B1
call L_7d
call T2_R0_B1
call L_8d
call T2_R0_B1
call L_9d
call T2_R0_B1
call L_10d
call T2_R0_B1
call L_11d
call T2_R0_B1
call L_12d

setb rtc_cs
ret
;#########################################################################;
R1_ke_A: movx A,@r1
Call HC595_Shift
ret

C_data: CLR S_H
CLR S_H
Clr S_T
CLR S_T

clr rtc_cs
mov R1,#Led_1d
call R1_ke_A
mov R1,#Led_1c
call R1_ke_A
mov R1,#Led_1b
call R1_ke_A
mov R1,#Led_1a
call R1_ke_A

mov R1,#Led_2d
call R1_ke_A
mov R1,#Led_2c
call R1_ke_A
mov R1,#Led_2b
call R1_ke_A
mov R1,#Led_2a
call R1_ke_A

mov R1,#Led_3d
call R1_ke_A
mov R1,#Led_3c
call R1_ke_A
mov R1,#Led_3b
call R1_ke_A
mov R1,#Led_3a
call R1_ke_A

mov R1,#Led_4d
call R1_ke_A
mov R1,#Led_4c
call R1_ke_A
mov R1,#Led_4b
call R1_ke_A
mov R1,#Led_4a
call R1_ke_A

mov R1,#Led_5d
call R1_ke_A
mov R1,#Led_5c
call R1_ke_A
mov R1,#Led_5b
call R1_ke_A
mov R1,#Led_5a
call R1_ke_A

mov R1,#Led_6d
call R1_ke_A
mov R1,#Led_6c
call R1_ke_A
mov R1,#Led_6b
call R1_ke_A
mov R1,#Led_6a
call R1_ke_A

mov R1,#Led_7d
call R1_ke_A
mov R1,#Led_7c
call R1_ke_A
mov R1,#Led_7b
call R1_ke_A
mov R1,#Led_7a
call R1_ke_A

mov R1,#Led_8d
call R1_ke_A
mov R1,#Led_8c
call R1_ke_A
mov R1,#Led_8b
call R1_ke_A
mov R1,#Led_8a
call R1_ke_A

mov R1,#Led_9d
call R1_ke_A
mov R1,#Led_9c
call R1_ke_A
mov R1,#Led_9b
call R1_ke_A
mov R1,#Led_9a
call R1_ke_A

mov R1,#Led_10d
call R1_ke_A
mov R1,#Led_10c
call R1_ke_A
mov R1,#Led_10b
call R1_ke_A
mov R1,#Led_10a
call R1_ke_A

mov R1,#Led_11d
call R1_ke_A
mov R1,#Led_11c
call R1_ke_A
mov R1,#Led_11b
call R1_ke_A
mov R1,#Led_11a
call R1_ke_A

mov R1,#Led_12d
call R1_ke_A
mov R1,#Led_12c
call R1_ke_A
mov R1,#Led_12b
call R1_ke_A
mov R1,#Led_12a
call R1_ke_A

setb rtc_cs

Clr S_T
Clr S_T
SetB S_T
SetB S_T
Ret

HC595_Shift:MOV R2,#8
HC595_ShLop:RLC A
MOV D_S,C
SetB S_H
SetB S_H
CLR S_H
CLR S_H
DJNZ R2,HC595_ShLop
Ret
;#########################################################################;
Tampil_a: clr d_a
clr d_b
call C_data
setb o_e
call pwm
ret
Tampil_b: setb d_a
clr d_b
call C_data
setb o_e
call pwm
ret
Tampil_c: clr d_a
setb d_b
call C_data
setb o_e
call pwm
ret
Tampil_d: setb d_a
setb d_b
call C_data
setb o_e
call pwm
ret

pwm: call D_100us
clr o_e
;call D_2ms
ret
;#########################################################################;
D_100us: MOV R7,#2 ; waktu on
T1D: MOV R6,#100
DJNZ R6,$
DJNZ R7,T1D
Ret

D_2ms: MOV R7,#1 ; waktu off
T2D: MOV R6,#1
DJNZ R6,$
DJNZ R7,T2D
Ret

;##########################################################################
; huruf Besar kapital
;##########################################################################
TableKeyboard2: DB 00
DB 0F9H
DB 00
DB 0F5H,0F3H,0F1H,0F2H,0FCH
DB 00H
DB 0FAH,0F8H,0F6H,0F4H
DB 0C0H
DB ‘`’
DB 00H
DB 00H
DB 0C1H
DB 0C2H
DB 00H
DB 0C3H
DB ‘Q1′
DB 00H,00H,00H
DB ‘ZSAW2′
DB 00H,00H
DB ‘CXDE43′
DB 00H,00H
DB ‘ VFTR5′
DB 00H,00H
DB ‘NBHGY6′
DB 00H,00H,00H
DB ‘MJU78′
DB 00H,00H
DB ‘,KIO09′
DB 00H,00H
DB ‘./L:P-‘
DB 00H,00H,00H
DB 27H
DB 00H
DB ‘[=’
DB 00H,00H
DB 0C5H
DB 0C6H
DB 0AH
DB ‘]’
DB 00H
DB ‘\’
;##########################################################################
; THIS ROUTINE READS A BYTE OF DATA FROM EEPROM
; From EEPROM current address pointer.
; Returns the data byte in R1
;##########################################################################
;WRTCMD EQU 11010000b ;WRITE DATA COMMAND Note 3
;RRDCMD EQU 11010001b ;READ DATA COMMAND Note 3
;WTCMD EQU 10100000B ;WRITE DATA COMMAND Note 3
;RDCMD EQU 10100001B ;READ DATA COMMAND Note 3
;RDEND EQU 01000000B ;READ HIGH-ENDURANCE BLOCK NUMBER COMMAND
;BYTCNT EQU 8

CREAD: MOV A,#10100001B ;LOAD READ COMMAND
CALL OUTS ;SEND IT
CALL IN ;READ DATA
MOV puluhan,A ;STORE DATA
CALL STOP ;SEND STOP CONDITION
RET
;##########################################################################
; This routine writes a byte of data to EEPROM
; This routine is for the 24LC32 or 24LC65
; The EEPROM address is assumed to be in R3:R4
; The DATA to be written is assumed to be in R1
;##########################################################################
Tulis_eeprom: MOV A,#10100000B ;LOAD WRITE COMMAND
CALL OUTS ;SEND IT
MOV A,R3 ;GET HI BYTE ADDRESS
CALL OUT ;SEND IT
MOV A,R4 ;GET LOW BYTE ADDRESS
CALL OUT ;SEND IT
MOV A,R1 ;GET DATA
CALL OUT ;SEND IT
CALL STOP ;SEND STOP CONDITION
RET

;##########################################################################
; THIS ROUTINE READS A BYTE OF DATA FROM THE EEPROM
; This routine is for the 24CL32 or 24LC65
; The EEPROM address is in R3:R4
; Returns the data byte in R1
;##########################################################################
Baca_eeprom: call baca_eeprom_2
call baca_eeprom_2
call baca_eeprom_2
call baca_eeprom_2
call baca_eeprom_2
call baca_eeprom_2
call baca_eeprom_2
call baca_eeprom_2
ret

baca_eeprom_2: mov r3,dph
mov r4,dpl
MOV A,#10100000B ;LOAD WRITE COMMAND TO SEND ADDRESS
CALL OUTS ;SEND IT
MOV A,R3 ;GET HI BYTE ADDRESS
CALL OUT ;SEND IT
MOV A,R4 ;GET LOW BYTE ADDRESS
CALL OUT ;SEND IT
CALL CREAD ;GET DATA BYTE
RET
;##########################################################################
; THIS ROUTINE SENDS OUT CONTENTS OF THE ACCUMULATOR
; to the EEPROM and includes START condition. Refer to the data sheets
; for discussion of START and STOP conditions.
;##########################################################################
OUTS: MOV R2,#8 ;LOOP COUNT — EQUAL TO BIT COUNT
SETB I2C_SDA ;INSURE DATA IS HI
SETB I2C_SCL ;INSURE CLOCK IS HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SDA ;START CONDITION — DATA = 0
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL ;CLOCK = 0
OTSLP: RLC A ;SHIFT BIT
JNC BITLS
SETB I2C_SDA ;DATA = 1
JMP OTSL1 ;CONTINUE
BITLS: CLR I2C_SDA ;DATA = 0
OTSL1: SETB I2C_SCL ;CLOCK HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL ;CLOCK LOW
DJNZ R2,OTSLP ;DECREMENT COUNTER
SETB I2C_SDA ;TURN PIN INTO INPUT
NOP ;NOTE 1
NOP ;NOTE 2
NOP
SETB I2C_SCL ;CLOCK ACK
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL
RET
;##########################################################################
; THIS ROUTINE SENDS OUT CONTENTS OF ACCUMLATOR TO EEPROM
; without sending a START condition.
;##########################################################################
OUT: MOV R2,#8 ;LOOP COUNT — EQUAL TO BIT COUNT
OTLP: RLC A ;SHIFT BIT
JNC BITL
SETB I2C_SDA ;DATA = 1
JMP OTL1 ;CONTINUE
BITL: CLR I2C_SDA ;DATA = 0
OTL1: SETB I2C_SCL ;CLOCK HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL ;CLOCK LOW
DJNZ R2,OTLP ;DECREMENT COUNTER
SETB I2C_SDA ;TURN PIN INTO INPUT
NOP ;NOTE 1
NOP ;NOTE 2
NOP
SETB I2C_SCL ;CLOCK ACK
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
CLR I2C_SCL
RET
;##########################################################################
; THIS ROUTINE READS IN A BYTE FROM THE EEPROM
; and stores it in the accumulator
;##########################################################################
IN: MOV R2,#8 ;LOOP COUNT
SETB I2C_SDA ;SET DATA BIT HIGH FOR INPUT
INLP: CLR I2C_SCL ;CLOCK LOW
NOP ;NOTE 1
NOP
NOP
NOP
NOP ;NOTE 2
NOP
SETB I2C_SCL ;CLOCK HIGH
CLR C ;CLEAR CARRY
JNB I2C_SDA,INL1 ;JUMP IF DATA = 0
CPL C ;SET CARRY IF DATA = 1
INL1: RLC A ;ROTATE DATA INTO ACCUMULATOR
DJNZ R2,INLP ;DECREMENT COUNTER
CLR I2C_SCL ;CLOCK LOW
RET
STOP: CLR I2C_SDA ;STOP CONDITION SET DATA LOW
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
SETB I2C_SCL ;SET CLOCK HI
NOP ;NOTE 1
NOP
NOP
NOP ;NOTE 2
NOP
SETB I2C_SDA ;SET DATA HIGH
RET
;##########################################################################
; Subrutine Konversi_ScanCode
;##########################################################################
Rutin_keyboard: setb flag_interupsi
MOV IE,#00000000b ;matikan Interupsi INT0
push acc

push 2
push dpl
push dph
forever: JB KbdClock,$
call ambilKeyboard
jnc Forever
pop dph
pop dpl
pop 2

pop acc
clr C
MOV IE,#10000001b ;hidupkan Interupsi INT0
setb flag_interupsi
reti

AmbilKeyboard: call ambil_scancode
cjne a,#0F0h,kybd_tidakLepas
JB KbdClock,$
call ambil_Scancode
Setb C
call Konversi_Scancode
ret
Kybd_tidakLepas: Clr C
ret

Ambil_scanCode: clr A ; hapus a
Jnb KbdClock,$ ; tunggu kbdclock = 1
mov R2,#08h ; isi R0 dengan nilai 8
Ambil_ScanCode2: Jb KbdClock,$ ; tunggu kbdclock = 0
Mov C,KbdData ; kopi kbd data ke bit C
Rr A ; putar ke kanan isi akumulator
mov acc.7,C ; kopi isi bit C ke accumulator bit ke 7
Jnb KbdClock,$ ; tunggu kbdclock = 1
Djnz R2,Ambil_ScanCode2
Jb KbdClock,$
Jnb KbdClock,$
Jb KbdClock,$
Jnb KbdClock,$
mov hexa_keyboard,a
ret
Konversi_ScanCode:Mov DPTR,#TableKeyboard2
movc A,@A+DPTR
mov data_keyboard,A
ret
;##########################################################################
; Subrutine AmbilKeyboard
;##########################################################################
looping_keyboard: MOV IE,#10000001b ;hidupkan Interupsi INT0
mov DPTR,#data_huruf
jmp Mulai_keyboard
looping_keyboard_2:
MOV IE,#10000001b ;hidupkan Interupsi INT0
mov DPTR,#data_huruf_2
jmp Mulai_keyboard
;##########################################################################
Mulai_keyboard: mov DPTR_high,dph
mov DPTR_low,dpl
call hapus_ram
;##########################################################################
Kybd_huruf_besar: call display_5
mov A,hexa_keyboard

cek_interupsi_2b: cjne a,#enter,cek_interupsi_3b
jmp Kybd_enter
cek_interupsi_3b: cjne a,#esc,cek_interupsi_4b
jmp Mulai
cek_interupsi_4b: jnb flag_interupsi,Kybd_huruf_besar
clr flag_interupsi
CLR A
mov A,hexa_keyboard
Mov DPTR,#TableKeyboard2
movc A,@A+DPTR
mov data_keyboard,A
mov r1,data_keyboard

MOV DPH,DPTR_HIGH
MOV DPL,DPTR_LOW
CALL tulis_ke_eeprom
jmp Kybd_huruf_besar
;##########################################################################
tulis_ke_eeprom: mov r3,dptr_high
mov r4,DPTR_low
mov dptr_high,dph
mov DPTR_low,dpl
call Tulis_eeprom

Baca_ke_eeprom: mov r3,dptr_high
mov r4,DPTR_low
mov dptr_high,dph
mov DPTR_low,dpl
call baca_eeprom

mov A,Puluhan
call K_m_14
call geser_KIRI_3
call display_5
call geser_KIRI_3
call display_5
call geser_KIRI_3
call display_5
call geser_KIRI_3
call display_5
call geser_KIRI_3
call display_5
call geser_KIRI_3
call display_5
call geser_KIRI_3
call display_5

inc dptr
mov dptr_high,dph
mov DPTR_low,dpl
RET

;##########################################################################
Kybd_enter: MOV DPH,DPTR_HIGH
MOV DPL,DPTR_LOW
mov r1,#0ffh
call tulis_ke_eeprom
selesai: mov DPTR,#Finish
call tampil_14_huruf
mov free_2,#50
tunggu_selesai: call display_5
djnz free_2,tunggu_selesai
clr flag_interupsi
clr flag_tombol
clr flag_T_iqomah
clr flag_T_jadwal
jmp MULAI

Finish: db ‘ FINISH ‘
;##########################################################################
; Hexa X desimal
; Dibuat oleh Sindhu Harimukti
; Jumat 03 agustus 2012
;##########################################################################
tabel_hex:
db 00h,01h,02h,03h,04h,05h,06h,07h,08h,09h,10h
db 11h,12h,13h,14h,15h,16h,17h,18h,19h,20h
db 21h,22h,23h,24h,25h,26h,27h,28h,29h,30h
db 31h,32h,33h,34h,35h,36h,37h,38h,39h,40h
db 41h,42h,43h,44h,45h,46h,47h,48h,49h,50h
db 51h,52h,53h,54h,55h,56h,57h,58h,59h,60h
db 61h,62h,63h,64h,65h,66h,67h,68h,69h,70h
db 71h,72h,73h,74h,75h,76h,77h,78h,79h,80h
db 81h,82h,83h,84h,85h,86h,87h,88h,89h,90h
db 91h,82h,93h,94h,95h,96h,97h,98h,99h
tabel_dec:
db 00,01,02,03,04,05,06,07,08,09,00,00,00,00,00,00
db 10,11,12,13,14,15,16,17,18,19,00,00,00,00,00,00
db 20,21,22,23,24,25,26,27,28,29,00,00,00,00,00,00
db 30,31,32,33,34,35,36,37,38,39,00,00,00,00,00,00
db 40,41,42,43,44,45,46,47,48,49,00,00,00,00,00,00
db 50,51,52,53,54,55,56,57,58,59,00,00,00,00,00,00
db 60,61,62,63,64,65,66,67,68,69,00,00,00,00,00,00
db 70,71,72,73,74,75,76,77,78,79,00,00,00,00,00,00
db 80,81,82,83,84,85,86,87,88,89,00,00,00,00,00,00
db 90,91,82,93,94,95,96,97,98,99,00,00,00,00,00,00

konvert_dec: mov DPTR,#tabel_dec
movc A,@A+DPTR
ret
konvert_hex: mov DPTR,#tabel_hex
movc A,@A+DPTR
ret
;==============================================================;
; pengendali Bus IIC disusun oleh
; Dhanny Dhuzell 2008 Bandar Lampung
; Single Master Sudah diuji-coba dan sangat baik
; Bandwidth sekitar 80 kHz (Mode-Normal-Speed)
; Modul ini butuh “ErrorsEqu.inc”
;==============================================================;
I2C_Start: SetB I2C_SDA
SetB I2C_SCL
JNB I2C_SDA, I2C_BusBusy
JNB I2C_SCL, I2C_BusBusy
Clr I2C_SDA
Push ACC
POP ACC
Clr I2C_SCL
Push ACC
POP ACC
Clr C
Ret
I2C_BusBusy: SetB C
Ret
;==============================================================;
I2C_Stop: Clr I2C_SDA
SETB I2C_SCL
JNB I2C_SCL,$
NOP
NOP
NOP
SetB I2C_SDA
Ret
;==============================================================;
I2C_SendByte: PUSH B
MOV B,#8

I2C_SendByteL: RLC A ;1MC |
MOV I2C_SDA,C ;2MC |
SETB I2C_SCL
JNB I2C_SCL,$
NOP
NOP
NOP
Clr I2C_SCL ;1MC +-+
DJNZ B,I2C_SendByteL ;2MC |
SETB I2C_SCL
JNB I2C_SCL,$
NOP
NOP
NOP
NOP
MOV C,I2C_SDA ;1MC | read ACK/NOACK
Clr I2C_SCL ;1MC +-+
NOP
NOP
NOP
POP B ;2MC |
RET
; Low = 6MC High = 5MC
;==============================================================;
I2C_GetByte: PUSH B
PUSH PSW ;Save CY
MOV B,#8
SetB I2C_SDA ;1MC |
I2C_GetByteL: SETB I2C_SCL
JNB I2C_SCL,$
NOP
NOP
NOP
MOV C,I2C_SDA ;1MC |
RLC A ;1MC |
Clr I2C_SCL ;1MC +-+
NOP
NOP
NOP
DJNZ B,I2C_GetByteL ;2MC |
POP PSW ;1MC | Load CY
MOV I2C_SDA,C ;2MC |
SETB I2C_SCL
JNB I2C_SCL,$
NOP
NOP
NOP
Clr I2C_SCL ;1MC +-+
SetB I2C_SDA ;1MC |
NOP
NOP
POP B ;1MC | Load CY
RET
; Low = 6MC High = 5MC
;==============================================================;
I2C_WriteByte: Call I2C_Start
JC l_ERROR1
Clr ACC.0
Call I2C_SendByte ;Send SlaveAddress
JC l_ERROR2
MOV A,B
Call I2C_SendByte ;Send Word Address
JC l_ERROR3
MOV A,R1
Call I2C_SendByte ;Send Data Byte
JC l_ERROR4
Call I2C_Stop
Clr C
Call I2C_WriteDelay
Clr A
MOV B,A ;max 5mS
I2C_WriteByteL: DJNZ ACC,I2C_WriteByteL
DJNZ B,I2C_WriteByteL
Ret
; ACC = SlaveAddress, B = WordAddress, R1 = Data byte
;==============================================================;
I2C_ReadByte: Call I2C_Start
JC l_ERROR1
MOV DPL,A ;Save SlaveAddress
Clr ACC.0
Call I2C_SendByte ;Send SlaveAddress
JC l_ERROR2
MOV A,B
Call I2C_SendByte ;Send Word Address
JC l_ERROR3
Call I2C_Start
JC l_ERROR1
MOV A,DPL ;Load SlaveAddress again
SetB ACC.0
Call I2C_SendByte ;Send SlaveAddress
JC l_ERROR2
SetB C ;Set to NOACK
Call I2C_GetByte ;Get Data Byte
Call I2C_Stop
Clr C
Ret
; ACC = SlaveAddress, B = WordAddress
;==============================================================;
I2C_WriteData: Call I2C_Start
JC l_ERROR1
Clr ACC.0
Call I2C_SendByte ;Send SlaveAddress
JC l_ERROR2
MOV A,B
Call I2C_SendByte ;Send Word Address
JC l_ERROR3
I2C_WriteDataL: MOV A,@R1
call I2C_SendByte ;Send Data Byte
INC R1
JC l_ERROR4
DJNZ R2,I2C_WriteDataL
I2C_WriteDataE: Call I2C_Stop
Clr C
Call I2C_WriteDelay
I2C_WriteDelay: Clr A
MOV B,A ;max 5mS (( 2 *256 ) * 256 )
I2C_WriteDataF: DJNZ ACC,I2C_WriteDataF
DJNZ B,I2C_WriteDataF
Ret
; ACC = SlaveAddress, B = WordAddress, R1 = DataMemoryOffset, R2 = Counter,
;==============================================================;
l_ERROR1: MOV A,#11
Call I2C_Stop
Ret
l_ERROR2: MOV A,#12
Call I2C_Stop
Ret
l_ERROR3: MOV A,#13
Call I2C_Stop
Ret
l_ERROR4: MOV A,#14
Call I2C_Stop
Ret
;==============================================================;
I2C_ReadData: Call I2C_Start
JC l_ERROR1
MOV DPL,A ;Save SlaveAddress
Clr ACC.0
Call I2C_SendByte ;Send SlaveAddress
JC l_ERROR2
MOV A,B
Call I2C_SendByte ;Send Word Address
JC l_ERROR3
Call I2C_Start
JC l_ERROR1
MOV A,DPL ;Load SlaveAddress again
SetB ACC.0
Call I2C_SendByte ;Send SlaveAddress
JC l_ERROR2
DEC R2
I2C_ReadDataL: Clr C ;Set to ACK
Call I2C_GetByte ;Get Data Byte
MOV @R1,A
INC R1
DJNZ R2,I2C_ReadDataL
SetB C ;Set to NOACK
Call I2C_GetByte ;Get Data Byte
MOV @R1,A
Call I2C_Stop
Clr C
Ret
; ACC = SlaveAddress, B = WordAddress, R1 = DataMemoryOffset, R2 = Counter
;##########################################################################
; Tulis / baca rtc
;##########################################################################
ReadAllRTC: MOV A,#11010001b ;SlaveAddress
MOV B,#0
MOV R1,#RTCDetik
MOV R2,#7
Call I2C_ReadData ; ACC = SlaveAddress, B = WordAddress, R1 = DataMemoryOffset, R2 = Counter
ret

Tulis_rtc_hari: MOV A,#11010000b
mov B,#03h ;Alamat
mov R1,rtchari ;datanya
JMP I2C_W
Tulis_rtc_jam: MOV A,#11010000b
mov B,#02h ;Alamat
mov R1,rtcjam ;datanya
JMP I2C_W
Tulis_rtc_menit: MOV A,#11010000b
mov B,#01h
mov R1,rtcmenit
JMP I2C_W

Tulis_rtc_Detik: MOV A,#11010000b
mov B,#00h
mov R1,#00h
JMP I2C_W

Tulis_rtc_tgl: MOV A,#11010000b
mov B,#04h
mov R1,RTCTANGGAL ;diganti
JMP I2C_W

Tulis_rtc_bln: MOV A,#11010000b
mov B,#05h
mov R1,rtcBULAN ;digant
JMP I2C_W

Tulis_rtc_thn: MOV A,#11010000b
mov B,#06h
mov R1,rtctahun
I2C_W: Call I2C_WriteByte
ret
;##########################################################################
; Simpan di eeprom
;##########################################################################
Baca_I_subuh: mov dptr,#100
Call baca_eeprom
ret
Tulis_I_subuh: mov dptr,#100
mov R1,PULUHAN
jmp T_eeprom

Baca_I_dzuhur: mov dptr,#101
Call baca_eeprom
ret
Tulis_I_dzuhur: mov dptr,#101
mov R1,PULUHAN
jmp T_eeprom

Baca_I_ashar: mov dptr,#102
Call baca_eeprom
ret
Tulis_I_ashar: mov dptr,#102
mov R1,PULUHAN
jmp T_eeprom

Baca_I_maghrib: mov dptr,#103
Call baca_eeprom
ret
Tulis_I_maghrib: mov dptr,#103
mov R1,PULUHAN
jmp T_eeprom

Baca_I_isya: mov dptr,#104
Call baca_eeprom
ret
Tulis_I_isya: mov dptr,#104
mov R1,PULUHAN
jmp T_eeprom

Baca_ALARM: mov dptr,#105
Call baca_eeprom
ret
Tulis_alarm: mov dptr,#105
mov R1,PULUHAN
jmp T_eeprom

Baca_tambah: mov dptr,#106
Call baca_eeprom
ret
Tulis_tambah: mov dptr,#106
mov R1,PULUHAN
jmp T_eeprom

Baca_kurang: mov dptr,#107
Call baca_eeprom
ret
Tulis_kurang: mov dptr,#107
mov R1,PULUHAN
jmp T_eeprom

Baca_Stanby: mov dptr,#108
Call baca_eeprom
ret
Tulis_Stanby: mov dptr,#108
mov R1,PULUHAN
jmp T_eeprom
;##########################################################################
T_eeprom: mov r3,dph
mov r4,dpl
call Tulis_eeprom
ret
;##########################################################################
scanning_waktu_sholat: mov a,rtcbulan
scanning_sholat_jan: cjne a,#1h,scanning_sholat_feb
jmp scan_jan
scanning_sholat_feb: cjne a,#2h,scanning_sholat_mar
jmp scan_feb
scanning_sholat_mar: cjne a,#3h,scanning_sholat_apr
jmp scan_mar
scanning_sholat_apr: cjne a,#4h,scanning_sholat_mei
jmp scan_apr
scanning_sholat_mei: cjne a,#5h,scanning_sholat_jun
jmp scan_mei
scanning_sholat_jun: cjne a,#6h,scanning_sholat_jul
jmp scan_jun
scanning_sholat_jul: cjne a,#7h,scanning_sholat_agu
jmp scan_jul
scanning_sholat_agu: cjne a,#8h,scanning_sholat_sep
jmp scan_agu
scanning_sholat_sep: cjne a,#9h,scanning_sholat_okt
jmp scan_sep
scanning_sholat_okt: cjne a,#10h,scanning_sholat_nov
jmp scan_okt
scanning_sholat_nov: cjne a,#11h,scanning_sholat_des
jmp scan_nov
scanning_sholat_des: cjne a,#12h,scanning_sholat_end
jmp scan_des

scanning_sholat_end: call baca_tambah
call konvert_dec
cjne A,#00h,scanning_tambahi
jmp scanning_kurang

scanning_tambahi: mov R7,a
scan_tambahi: call Tambahi_1_menit
djnz R7,scan_tambahi
jmp scanning_finish

scanning_kurang: call baca_kurang
call konvert_dec
cjne A,#00h,scanning_kurangi
jmp scanning_finish
scanning_kurangi: mov R7,a
scan_kurangi: call kurangi_1_menit
djnz R7,scan_kurangi
jmp scanning_finish

scanning_finish: jmp Scanning_waktu_sholat_isya_jam

Kurangi_1_menit: call Kurangi_jadwal_imsya
call Kurangi_jadwal_subuh
call Kurangi_jadwal_dzuhur
call Kurangi_jadwal_ashar
call Kurangi_jadwal_maghrib
call Kurangi_jadwal_isya
ret

Tambahi_1_menit: call Tambahi_jadwal_imsya
call Tambahi_jadwal_subuh
call Tambahi_jadwal_dzuhur
call Tambahi_jadwal_ashar
call Tambahi_jadwal_maghrib
call Tambahi_jadwal_isya
ret
;#########################################################################;
; rutin kurangi 1 menit
;#########################################################################;
Kurangi_jadwal_imsya: MOV A,imsya_menit
cjne A,#00h,kurangi_m_imsya
mov A,#59h
mov imsya_menit,a
kurangi_j_imsya: MOV A,imsya_jam
call konversi_kurangi
mov imsya_jam,a
ret
kurangi_m_imsya: call konversi_kurangi
mov imsya_menit,a
ret

Kurangi_jadwal_subuh: MOV A,subuh_menit
cjne A,#00h,kurangi_m_subuh
mov A,#59h
mov subuh_menit,a
kurangi_j_subuh: MOV A,subuh_jam
call konversi_kurangi
mov subuh_jam,a
ret
kurangi_m_subuh: call konversi_kurangi
mov subuh_menit,a
ret

Kurangi_jadwal_dzuhur: MOV A,dzuhur_menit
cjne A,#00h,kurangi_m_dzuhur
mov A,#59h
mov dzuhur_menit,a
kurangi_j_dzuhur: MOV A,dzuhur_jam
call konversi_kurangi
mov dzuhur_jam,a
ret
kurangi_m_dzuhur: call konversi_kurangi
mov dzuhur_menit,a
ret

Kurangi_jadwal_Ashar: MOV A,Ashar_menit
cjne A,#00h,kurangi_m_Ashar
mov A,#59h
mov Ashar_menit,a
kurangi_j_Ashar: MOV A,Ashar_jam
call konversi_kurangi
mov Ashar_jam,a
ret
kurangi_m_Ashar: call konversi_kurangi
mov Ashar_menit,a
ret

Kurangi_jadwal_Maghrib: MOV A,Maghrib_menit
cjne A,#00h,kurangi_m_Maghrib
mov A,#59h
mov Maghrib_menit,a
kurangi_j_Maghrib: MOV A,Maghrib_jam
call konversi_kurangi
mov Maghrib_jam,a
ret
kurangi_m_Maghrib: call konversi_kurangi
mov Maghrib_menit,a
ret

Kurangi_jadwal_Isya: MOV A,Isya_menit
cjne A,#00h,kurangi_m_Isya
mov A,#59h
mov Isya_menit,a
kurangi_j_Isya: MOV A,Isya_jam
call konversi_kurangi
mov Isya_jam,a
ret
kurangi_m_Isya: call konversi_kurangi
mov Isya_menit,a
ret
konversi_kurangi: call konvert_dec
dec a
call konvert_hex
ret

;#########################################################################;
; rutin tambahi 1 menit
;#########################################################################;
Tambahi_jadwal_imsya: MOV A,imsya_menit
cjne A,#59h,Tambahi_m_imsya
mov A,#00h
mov imsya_menit,a
Tambahi_j_imsya: MOV A,imsya_jam
call konversi_Tambahi
mov imsya_jam,a
ret
Tambahi_m_imsya: call konversi_Tambahi
mov imsya_menit,a
ret

Tambahi_jadwal_subuh: MOV A,subuh_menit
cjne A,#59h,Tambahi_m_subuh
mov A,#00h
mov subuh_menit,a
Tambahi_j_subuh: MOV A,subuh_jam
call konversi_Tambahi
mov subuh_jam,a
ret
Tambahi_m_subuh: call konversi_Tambahi
mov subuh_menit,a
ret

Tambahi_jadwal_dzuhur: MOV A,dzuhur_menit
cjne A,#59h,Tambahi_m_dzuhur
mov A,#00h
mov dzuhur_menit,a
Tambahi_j_dzuhur: MOV A,dzuhur_jam
call konversi_Tambahi
mov dzuhur_jam,a
ret
Tambahi_m_dzuhur: call konversi_Tambahi
mov dzuhur_menit,a
ret

Tambahi_jadwal_Ashar: MOV A,Ashar_menit
cjne A,#59h,Tambahi_m_Ashar
mov A,#00h
mov Ashar_menit,a
Tambahi_j_Ashar: MOV A,Ashar_jam
call konversi_Tambahi
mov Ashar_jam,a
ret
Tambahi_m_Ashar: call konversi_Tambahi
mov Ashar_menit,a
ret

Tambahi_jadwal_Maghrib: MOV A,Maghrib_menit
cjne A,#59h,Tambahi_m_Maghrib
mov A,#00h
mov Maghrib_menit,a
Tambahi_j_Maghrib: MOV A,Maghrib_jam
call konversi_Tambahi
mov Maghrib_jam,a
ret
Tambahi_m_Maghrib: call konversi_Tambahi
mov Maghrib_menit,a
ret

Tambahi_jadwal_Isya: MOV A,Isya_menit
cjne A,#59h,Tambahi_m_Isya
mov A,#00h
mov Isya_menit,a
Tambahi_j_Isya: MOV A,Isya_jam
call konversi_Tambahi
mov Isya_jam,a
ret
Tambahi_m_Isya: call konversi_Tambahi
mov Isya_menit,a
ret

konversi_Tambahi: call konvert_dec
inc a
call konvert_hex
ret
;##########################################################################
; scanning jadwal sholat
;##########################################################################
Scanning_waktu_sholat_isya_jam: call ReadAllRTC
MOV R1,#ISYA_JAM
CALL AMBIL_RTC
cjne a,rtcjam,Scanning_waktu_sholat_subuh_jam
Scanning_waktu_sholat_isya_menit: MOV R1,#ISYA_MENIT
CALL AMBIL_RTC
cjne a,rtcmenit,Scanning_waktu_sholat_Subuh_jam
mov flag_sholat,#5
jmp Scanning_waktu_sholat_end

Scanning_waktu_sholat_subuh_jam: MOV R1,#SUBUH_JAM
CALL AMBIL_RTC
cjne a,rtcjam,Scanning_waktu_sholat_Dzuhur_jam
Scanning_waktu_sholat_subuh_menit: MOV R1,#SUBUH_MENIT
CALL AMBIL_RTC
cjne a,rtcmenit,Scanning_waktu_sholat_Dzuhur_jam
mov flag_sholat,#1
jmp Scanning_waktu_sholat_end

Scanning_waktu_sholat_Dzuhur_jam: MOV R1,#DZUHUR_JAM
CALL AMBIL_RTC
cjne a,rtcjam,Scanning_waktu_sholat_Ashar_jam
Scanning_waktu_sholat_Dzuhur_menit: MOV R1,#DZUHUR_MENIT
CALL AMBIL_RTC
cjne a,rtcmenit,Scanning_waktu_sholat_Ashar_jam
mov flag_sholat,#2
jmp Scanning_waktu_sholat_end

Scanning_waktu_sholat_Ashar_jam: MOV R1,#ASHAR_JAM
CALL AMBIL_RTC
cjne a,rtcjam,Scanning_waktu_sholat_Maghrib_jam
Scanning_waktu_sholat_Ashar_menit: MOV R1,#ASHAR_MENIT
CALL AMBIL_RTC
cjne a,rtcmenit,Scanning_waktu_sholat_Maghrib_jam
mov flag_sholat,#3
jmp Scanning_waktu_sholat_end

Scanning_waktu_sholat_Maghrib_jam: MOV R1,#MAGHRIB_JAM
CALL AMBIL_RTC
cjne a,rtcjam,Scanning_waktu_sholat_Imsya_jam
Scanning_waktu_sholat_Maghrib_menit:MOV R1,#MAGHRIB_MENIT
CALL AMBIL_RTC
cjne a,rtcmenit,Scanning_waktu_sholat_Imsya_jam
mov flag_sholat,#4
jmp Scanning_waktu_sholat_end

Scanning_waktu_sholat_Imsya_jam: MOV R1,#IMSYA_JAM
CALL AMBIL_RTC
cjne a,rtcjam,Scanning_waktu_sholat_end_1
Scanning_waktu_sholat_Imsya_menit: MOV R1,#IMSYA_MENIT
CALL AMBIL_RTC
cjne a,rtcmenit,Scanning_waktu_sholat_end_1
mov flag_sholat,#6
jmp Scanning_waktu_sholat_end

Scanning_waktu_sholat_end: clr Flag_waktu_sholat
Scanning_waktu_sholat_end_1: ret

;##########################################################################
; Baca Memori waktu sholat di eeprom
;##########################################################################
scan_jan: call baca_tanggal
call Baca_memori_jan
jmp scanning_sholat_end
scan_feb: call baca_tanggal
call Baca_memori_feb
jmp scanning_sholat_end
scan_mar: call baca_tanggal
call Baca_memori_mar
jmp scanning_sholat_end
scan_apr: call baca_tanggal
call Baca_memori_apr
jmp scanning_sholat_end
scan_mei: call baca_tanggal
call Baca_memori_mei
jmp scanning_sholat_end
scan_jun: call baca_tanggal
call Baca_memori_jun
jmp scanning_sholat_end
scan_jul: call baca_tanggal
call Baca_memori_jul
jmp scanning_sholat_end
scan_agu: call baca_tanggal
call Baca_memori_agu
jmp scanning_sholat_end
scan_sep: call baca_tanggal
call Baca_memori_sep
jmp scanning_sholat_end
scan_okt: call baca_tanggal
call Baca_memori_okt
jmp scanning_sholat_end
scan_nov: call baca_tanggal
call Baca_memori_nov
jmp scanning_sholat_end
scan_des: call baca_tanggal
call Baca_memori_des
jmp scanning_sholat_end
;##########################################################################
; Baca Memori
;##########################################################################
Baca_memori_jan: call baca_tanggal
mov dptr,#500
call imsya_j
mov dptr,#535
call imsya_m
mov dptr,#570
call subuh_j
mov dptr,#605
call subuh_m
mov dptr,#640
call dhuhur_j
mov dptr,#675
call dhuhur_m
mov dptr,#710
call ashar_j
mov dptr,#745
call ashar_m
mov dptr,#780
call maghrib_j
mov dptr,#815
call maghrib_m
mov dptr,#850
call Isya_j
mov dptr,#885
jmp Isya_m
;##########################################################################
Baca_memori_feb: call baca_tanggal
mov dptr,#920
call imsya_j
mov dptr,#955
call imsya_m
mov dptr,#990
call subuh_j
mov dptr,#1025
call subuh_m
mov dptr,#1060
call dhuhur_j
mov dptr,#1095
call dhuhur_m
mov dptr,#1130
call ashar_j
mov dptr,#1165
call ashar_m
mov dptr,#1200
call maghrib_j
mov dptr,#1230
call maghrib_m
mov dptr,#1270
call Isya_j
mov dptr,#1305
jmp Isya_m
;##########################################################################
Baca_memori_mar: call baca_tanggal
mov dptr,#1340
call imsya_j
mov dptr,#1375
call imsya_m
mov dptr,#1410
call subuh_j
mov dptr,#1445
call subuh_m
mov dptr,#1480
call dhuhur_j
mov dptr,#1515
call dhuhur_m
mov dptr,#1550
call ashar_j
mov dptr,#1585
call ashar_m
mov dptr,#1620
call maghrib_j
mov dptr,#1655
call maghrib_m
mov dptr,#1690
call Isya_j
mov dptr,#1725
jmp Isya_m
;##########################################################################
Baca_memori_apr: call baca_tanggal
mov dptr,#1760
call imsya_j
mov dptr,#1795
call imsya_m
mov dptr,#1830
call subuh_j
mov dptr,#1865
call subuh_m
mov dptr,#1900
call dhuhur_j
mov dptr,#1935
call dhuhur_m
mov dptr,#1970
call ashar_j
mov dptr,#2005
call ashar_m
mov dptr,#2040
call maghrib_j
mov dptr,#2075
call maghrib_m
mov dptr,#2110
call Isya_j
mov dptr,#2145
jmp Isya_m
;##########################################################################
Baca_memori_mei: call baca_tanggal
mov dptr,#2180
call imsya_j
mov dptr,#2215
call imsya_m
mov dptr,#2250
call subuh_j
mov dptr,#2285
call subuh_m
mov dptr,#2320
call dhuhur_j
mov dptr,#2355
call dhuhur_m
mov dptr,#2390
call ashar_j
mov dptr,#2425
call ashar_m
mov dptr,#2460
call maghrib_j
mov dptr,#2495
call maghrib_m
mov dptr,#2530
call Isya_j
mov dptr,#2565
jmp Isya_m
;##########################################################################
Baca_memori_jun: call baca_tanggal
mov dptr,#2600
call imsya_j
mov dptr,#2635
call imsya_m
mov dptr,#2670
call subuh_j
mov dptr,#2705
call subuh_m
mov dptr,#2740
call dhuhur_j
mov dptr,#2775
call dhuhur_m
mov dptr,#2810
call ashar_j
mov dptr,#2845
call ashar_m
mov dptr,#2880
call maghrib_j
mov dptr,#2915
call maghrib_m
mov dptr,#2950
call Isya_j
mov dptr,#2985
jmp Isya_m
;##########################################################################
Baca_memori_jul: call baca_tanggal
mov dptr,#3020
call imsya_j
mov dptr,#3055
call imsya_m
mov dptr,#3090
call subuh_j
mov dptr,#3125
call subuh_m
mov dptr,#3160
call dhuhur_j
mov dptr,#3195
call dhuhur_m
mov dptr,#3230
call ashar_j
mov dptr,#3265
call ashar_m
mov dptr,#3300
call maghrib_j
mov dptr,#3335
call maghrib_m
mov dptr,#3370
call Isya_j
mov dptr,#3405
jmp Isya_m
;##########################################################################
Baca_memori_agu: call baca_tanggal
mov dptr,#3440
call imsya_j
mov dptr,#3475
call imsya_m
mov dptr,#3510
call subuh_j
mov dptr,#3545
call subuh_m
mov dptr,#3580
call dhuhur_j
mov dptr,#3615
call dhuhur_m
mov dptr,#3650
call ashar_j
mov dptr,#3685
call ashar_m
mov dptr,#3720
call maghrib_j
mov dptr,#3755
call maghrib_m
mov dptr,#3790
call Isya_j
mov dptr,#3825
jmp Isya_m
;##########################################################################
Baca_memori_sep: call baca_tanggal
mov dptr,#3860
call imsya_j
mov dptr,#3895
call imsya_m
mov dptr,#3930
call subuh_j
mov dptr,#3965
call subuh_m
mov dptr,#4000
call dhuhur_j
mov dptr,#4035
call dhuhur_m
mov dptr,#4070
call ashar_j
mov dptr,#4105
call ashar_m
mov dptr,#4140
call maghrib_j
mov dptr,#4175
call maghrib_m
mov dptr,#4210
call Isya_j
mov dptr,#4245
jmp Isya_m
;##########################################################################
Baca_memori_okt: call baca_tanggal
mov dptr,#4280
call imsya_j
mov dptr,#4315
call imsya_m
mov dptr,#4350
call subuh_j
mov dptr,#4385
call subuh_m
mov dptr,#4420
call dhuhur_j
mov dptr,#4455
call dhuhur_m
mov dptr,#4490
call ashar_j
mov dptr,#4525
call ashar_m
mov dptr,#4560
call maghrib_j
mov dptr,#4595
call maghrib_m
mov dptr,#4630
call Isya_j
mov dptr,#4665
jmp Isya_m
;##########################################################################
Baca_memori_nov: call baca_tanggal
mov dptr,#4700
call imsya_j
mov dptr,#4735
call imsya_m
mov dptr,#4770
call subuh_j
mov dptr,#4805
call subuh_m
mov dptr,#4840
call dhuhur_j
mov dptr,#4875
call dhuhur_m
mov dptr,#4910
call ashar_j
mov dptr,#4945
call ashar_m
mov dptr,#4980
call maghrib_j
mov dptr,#5015
call maghrib_m
mov dptr,#5050
call Isya_j
mov dptr,#5085
jmp Isya_m
;##########################################################################
Baca_memori_des: call baca_tanggal
mov dptr,#5120
call imsya_j
mov dptr,#5155
call imsya_m
mov dptr,#5190
call subuh_j
mov dptr,#5225
call subuh_m
mov dptr,#5260
call dhuhur_j
mov dptr,#5295
call dhuhur_m
mov dptr,#5330
call ashar_j
mov dptr,#5365
call ashar_m
mov dptr,#5400
call maghrib_j
mov dptr,#5435
call maghrib_m
mov dptr,#5470
call Isya_j
mov dptr,#5505
jmp Isya_m
;==============================================================;
imsya_j: call loop_dptr
MOV R0,#IMSYA_JAM
CALL AMBIL_RAM
call baca_tanggal
ret

imsya_m: call loop_dptr
MOV R0,#IMSYA_MENIT
CALL AMBIL_RAM
call baca_tanggal
ret

subuh_j: call loop_dptr
MOV R0,#SUBUH_JAM
CALL AMBIL_RAM
call baca_tanggal
ret

Subuh_m: call loop_dptr
MOV R0,#SUBUH_MENIT
CALL AMBIL_RAM
call baca_tanggal
ret

Dhuhur_j: call loop_dptr
MOV R0,#DZUHUR_JAM
CALL AMBIL_RAM
call baca_tanggal
ret

Dhuhur_m: call loop_dptr
MOV R0,#DZUHUR_MENIT
CALL AMBIL_RAM
call baca_tanggal
ret

Ashar_j: call loop_dptr
MOV R0,#ASHAR_JAM
CALL AMBIL_RAM
call baca_tanggal
ret

Ashar_m: call loop_dptr
MOV R0,#ASHAR_MENIT
CALL AMBIL_RAM
call baca_tanggal
ret

Maghrib_j: call loop_dptr
MOV R0,#MAGHRIB_JAM
CALL AMBIL_RAM
call baca_tanggal
ret

Maghrib_m: call loop_dptr
MOV R0,#MAGHRIB_MENIT
CALL AMBIL_RAM
call baca_tanggal
ret

Isya_j: call loop_dptr
MOV R0,#ISYA_JAM
CALL AMBIL_RAM
B_T: call baca_tanggal
ret

Isya_m: call loop_dptr
MOV R0,#ISYA_MENIT
CALL AMBIL_RAM
ret

Loop_1: inc dptr
Loop_dptr: djnz r0,loop_1
call baca_eeprom
ret

baca_tanggal: mov a,rtctanggal
call konvert_dec
mov r0,a
ret

AMBIL_RAM: CLR RTC_CS
MOV A,PULUHAN
MOVX @R0,A
SETB RTC_CS
RET
;##########################################################################
; Subrutine Setting Waktu
;##########################################################################
Kybd_ctrl: mov DPTR,#pesan3
call tampil_14_huruf
call display_5
Loop_jam: call refresh_jame
Jb up,kurang_jam
jnb up,$
call up_jam
jmp loop_jam
Kurang_jam: jb down,cek_out_j
jnb down,$
call down_jam
jmp loop_jam
cek_out_j: jb menu,Loop_jam
jnb menu,$

mov DPTR,#pesan4
call tampil_14_huruf
call display_5
Loop_Mnt: call refresh_menite
Jb up,kurang_Mnt
jnb up,$
call up_Menit
jmp loop_Mnt
Kurang_Mnt: Jb down,cek_out_m
jnb down,$
call down_Menit
jmp loop_Mnt

cek_out_m: Jb menu,Loop_Mnt
jnb menu,$
call tulis_rtc_detik

mov DPTR,#pesan6
call tampil_14_huruf
call display_5
Loop_tgl: call refresh_tanggale
Jb up,kurang_tgl
jnb up,$
call up_tgl
jmp loop_tgl
Kurang_tgl: Jb down,cek_out_t
jnb down,$
call down_tgl
jmp loop_tgl
cek_out_t: Jb menu,Loop_tgl
jnb menu,$

mov DPTR,#pesan7
call tampil_14_huruf
call display_5
Loop_bln: call refresh_bulane
Jb up,kurang_bln
jnb up,$
call up_bln
jmp loop_bln
Kurang_bln: Jb down,cek_out_b
jnb down,$
call down_bln
jmp loop_bln
cek_out_b: Jb menu,Loop_bln
jnb menu,$

mov DPTR,#pesan8
call tampil_14_huruf
call display_5
Loop_thn: call refresh_tahune
Jb up,kurang_thn
jnb up,$
call up_thn
jmp loop_thn
Kurang_thn: Jb down,cek_out_n
jnb down,$
call down_thn
jmp loop_thn
cek_out_n: Jb menu,Loop_thn
jnb menu,$
jmp Selesai_edit

Set_iqomah: mov DPTR,#pesan9
call tampil_14_huruf
call display_5
Loop_I_S: call refresh_I_SUBUH
Jb up,kurang_I_S
jnb up,$
call up_I_S
jmp loop_I_S
Kurang_I_S: Jb down,cek_out_I_S
jnb down,$
call down_I_S
jmp loop_I_S
cek_out_I_S: Jb menu,Loop_I_S
jnb menu,$

mov DPTR,#pesanA
call tampil_14_huruf
call display_5
Loop_I_D: call refresh_I_DZUHUR
Jb up,kurang_I_D
jnb up,$
call up_I_D
jmp loop_I_D
Kurang_I_D: Jb down,cek_out_I_D
jnb down,$
call down_I_D
jmp loop_I_D
cek_out_I_D: Jb menu,Loop_I_D
jnb menu,$

mov DPTR,#pesanB
call tampil_14_huruf
call display_5
Loop_I_A: call refresh_I_ASHAR
Jb up,kurang_I_A
jnb up,$
call up_I_A
jmp loop_I_A
Kurang_I_A: Jb down,cek_out_I_A
jnb down,$
call down_I_A
jmp loop_I_A
cek_out_I_A: Jb menu,Loop_I_A
jnb menu,$

mov DPTR,#pesanC
call tampil_14_huruf
call display_5
Loop_I_M: call refresh_I_MAGHRIB
Jb up,kurang_I_M
jnb up,$
call up_I_M
jmp loop_I_M
Kurang_I_M: Jb down,cek_out_I_M
jnb down,$
call down_I_M
jmp loop_I_M
cek_out_I_M: Jb menu,Loop_I_M
jnb menu,$

mov DPTR,#pesanD
call tampil_14_huruf
call display_5
Loop_I_I: call refresh_I_ISYA
Jb up,kurang_I_I
jnb up,$
call up_I_I
jmp loop_I_I
Kurang_I_I: Jb down,cek_out_I_I
jnb down,$
call down_I_I
jmp loop_I_I
cek_out_I_I: Jb menu,Loop_I_I
jnb menu,$

mov DPTR,#pesanE
call tampil_14_huruf
call display_5
Loop_I_AL: call refresh_I_ALARM
Jb up,kurang_I_AL
jnb up,$
call up_I_AL
jmp loop_I_AL
Kurang_I_AL: Jb down,cek_out_I_AL
jnb down,$
call down_I_AL
jmp loop_I_AL
cek_out_I_AL: Jb menu,Loop_I_AL
jnb menu,$

mov DPTR,#pesanH
call tampil_14_huruf
call display_5
Loop_I_SY: call refresh_I_Stanby
Jb up,kurang_I_SY
jnb up,$
call up_I_SY
jmp loop_I_SY
Kurang_I_SY: Jb down,cek_out_I_SY
jnb down,$
call down_I_SY
jmp loop_I_SY
cek_out_I_SY: Jb menu,Loop_I_SY
jnb menu,$

jmp selesai_edit

Set_jadwal: mov DPTR,#pesanF
call tampil_14_huruf
call display_5
Loop_I_TA: call refresh_I_TAMBAH
Jb up,kurang_I_TA
jnb up,$
call up_I_TA
jmp loop_I_TA
Kurang_I_TA: Jb down,cek_out_I_TA
jnb down,$
call down_I_TA
jmp loop_I_TA
cek_out_I_TA: Jb menu,Loop_I_TA
jnb menu,$

mov DPTR,#pesanG
call tampil_14_huruf
call display_5
Loop_I_KU: call refresh_I_KURANG
Jb up,kurang_I_KU
jnb up,$
call up_I_KU
jmp loop_I_KU
Kurang_I_KU: Jb down,cek_out_I_KU
jnb down,$
call down_I_KU
jmp loop_I_KU
cek_out_I_KU: Jb menu,Loop_I_KU
jnb menu,$

Selesai_edit: jmp selesai

Pesan9: db ‘ SUBUH: ‘,0ffh ; iqomah huruf ke 15 dan 16
Pesana: db ‘ DZUHUR: ‘,0ffh
Pesanb: db ‘ ASHAR: ‘,0ffh
Pesanc: db ‘ MGHRIB: ‘,0ffh
Pesand: db ‘ ISYA`: ‘,0ffh
Pesane: db ‘ ALARM : ‘,0ffh
Pesanf: db ‘ TAMBAH: ‘,0ffh
Pesang: db ‘ KURANG: ‘,0ffh
Pesanh: db ‘ ST-BY : ‘,0ffh

Jeda_iqomah: db ‘ IQO- : ‘,0ffh ; iqomah huruf ke-10
Subuh: db ‘ SHUBUH ‘,0ffh
Dhuhur: db ‘ DZUHUR ‘,0ffh
Ashar: db ‘ ASHAR ‘,0ffh
Maghrib: db ‘ MAGHRIB ‘,0ffh
Isya: db ‘ `ISYA` ‘,0ffh
Standby: db ‘ .. ‘,0ffh
IMSAK: db ‘ IMSAK ‘,0ffh
;##########################################################################
; Edit RTC
;########################################################################
up_jam: MOV A,RTCJam
CJNE A,#23h,Up_jam2
MOV A,#0
Jmp Up_jam3
Up_jam2: add a,#1
Up_jam3: da a
MOV RTCJam,A
call tulis_rtc_jam
ret

down_jam: MOV A,rtcjam
call konvert_dec
dec a
CJNE A,#0ffh,down_jam2
MOV A,#23
down_jam2: call konvert_hex
MOV RTCJam,A
call tulis_rtc_jam
ret

up_menit: MOV A,RTCmenit
CJNE A,#59h,Up_menit2
MOV A,#0
Jmp Up_menit3
Up_menit2: add a,#1
Up_menit3: da a
MOV RTCmenit,A
call tulis_rtc_menit
ret

down_menit: MOV A,rtcmenit
call konvert_dec
dec a
CJNE A,#0ffh,down_menit2
MOV A,#59
down_menit2: call konvert_hex
MOV RTCmenit,A
call tulis_rtc_menit
ret

up_tgl: MOV A,RTCtanggal
CJNE A,#31h,Up_tgl2
MOV A,#1
Jmp Up_tgl3
Up_tgl2: add a,#1
Up_tgl3: da a
MOV RTCtanggal,A
call tulis_rtc_tgl
ret

down_tgl: MOV A,rtctanggal
call konvert_dec
dec a
CJNE A,#00h,down_tgl2
MOV A,#31
down_tgl2: call konvert_hex
MOV RTCtanggal,A
call tulis_rtc_tgl
ret

up_hari: MOV A,RTChari
CJNE A,#7h,Up_hari2
MOV A,#1
Jmp Up_hari3
Up_hari2: add a,#1
Up_hari3: da a
MOV RTChari,A
call tulis_rtc_hari
ret

down_hari: MOV A,rtchari
call konvert_dec
dec a
CJNE A,#00h,down_hari2
MOV A,#7
down_hari2: call konvert_hex
MOV RTChari,A
call tulis_rtc_hari
ret

up_bln: MOV A,RTCbulan
CJNE A,#12h,Up_bln2
MOV A,#1
Jmp Up_bln3
Up_bln2: add a,#1
Up_bln3: da a
MOV RTCbulan,A
call tulis_rtc_bln
ret

down_bln: MOV A,rtcbulan
call konvert_dec
dec a
CJNE A,#00h,down_bln2
MOV A,#12
down_bln2: call konvert_hex
MOV RTCbulan,A
call tulis_rtc_bln
ret

up_thn: MOV A,RTCtahun
call up_99
MOV RTCtahun,A
call tulis_rtc_thn
ret

down_thn: MOV A,rtctahun
call down_99
MOV RTCtahun,A
call tulis_rtc_thn
ret

up_I_S: CALL BACA_I_SUBUH
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_I_subuh
ret

down_I_S: CALL BACA_I_SUBUH
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_i_subuh
ret

up_I_D: CALL BACA_I_DZUHUR
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_I_dzuhur
ret

down_I_D: CALL BACA_I_DZUHUR
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_I_dzuhur
ret

up_I_A: CALL BACA_I_ASHAR
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_I_ashar
ret

down_I_A: CALL BACA_I_ASHAR
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_I_ashar
ret

up_I_M: CALL BACA_I_MAGHRIB
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_I_maghrib
ret

down_I_M: CALL BACA_I_MAGHRIB
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_I_maghrib
ret

up_I_I: CALL BACA_I_ISYA
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_I_isya
ret

down_I_I: CALL BACA_I_ISYA
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_I_isya
ret

up_I_AL: CALL BACA_ALARM
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_alarm
ret

down_I_AL: CALL BACA_ALARM
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_alarm
ret

up_I_SY: CALL BACA_STANBY
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_stanby
ret

down_I_SY: CALL BACA_STANBY
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_stanby
ret

up_I_TA: CALL BACA_TAMBAH
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_tambah
ret

down_I_TA: CALL BACA_TAMBAH
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_tambah
ret

up_I_KU: CALL BACA_KURANG
MOV A,PULUHAN
call up_99
MOV PULUHAN,A
call tulis_kurang
ret

down_I_KU: CALL BACA_KURANG
MOV A,PULUHAN
call down_99
MOV PULUHAN,A
call tulis_kurang
ret
;##########################################################################
down_99: call konvert_dec
dec a
CJNE A,#0ffh,down_thn2
MOV A,#99
down_thn2: call konvert_hex
ret

up_99: CJNE A,#99h,Up_thn2
MOV A,#0
Jmp Up_thn3
Up_thn2: add a,#1
Up_thn3: da a
ret

;##########################################################################
; Tampilan counting down setelah adzan
;##########################################################################
Counting_iqomah: mov A,flag_sholat
cjne A,#1,cek_sholat_2
CALL BACA_I_SUBUH
mov iqomah_menit,PULUHAN
mov DPTR,#subuh
jmp lanjut_alarm
cek_sholat_2: cjne A,#2,cek_sholat_3
CALL BACA_I_DZUHUR
mov iqomah_menit,PULUHAN
mov DPTR,#dhuhur
jmp lanjut_alarm
cek_sholat_3: cjne A,#3,cek_sholat_4
CALL BACA_I_ASHAR
mov iqomah_menit,PULUHAN
mov DPTR,#ashar
jmp lanjut_alarm
cek_sholat_4: cjne A,#4,cek_sholat_5
CALL BACA_I_MAGHRIB
mov iqomah_menit,PULUHAN
mov DPTR,#maghrib
jmp lanjut_alarm
cek_sholat_5: cjne A,#5,cek_sholat_6
CALL BACA_I_ISYA
mov iqomah_menit,PULUHAN
mov DPTR,#isya
jmp lanjut_alarm
cek_sholat_6: cjne A,#6,lanjut_alarm
mov iqomah_menit,#00h
mov DPTR,#IMSAK
jmp lanjut_alarm

lanjut_alarm: call tampil_14_huruf
call display_5
CALL BACA_ALARM
MOV A,PULUHAN
mov DPTR,#tabel_dec
movc A,@A+DPTR
mov detikan,a
Bunyi_alarm_awal: mov free_2,#2
Alarm_awal: CPL buzzer
call tunda_1_2_detik
djnz free_2,Alarm_awal
djnz detikan,Bunyi_alarm_awal
clr buzzer

mov Flag_adzan,#1 ;menit
call ReadAllRTC
mov a,rtcdetik
mov detikan,a
lanjut_adzan_0: mov Free_2,#60
lanjut_adzan_1: call ReadAllRTC
CALL STREAMRTC
mov a,rtcdetik
cjne A,detikan,lanjut_adzan_2
call display_5
jmp lanjut_adzan_1

lanjut_adzan_2: mov detikan,a
call display_5
CLR O_E
call tunda_1_2_detik
djnz Free_2,lanjut_adzan_1
djnz Flag_adzan,lanjut_adzan_0

mov A,Iqomah_menit
cjne A,#00h,Isi_iqomah_detik
jmp mulai
Isi_iqomah_detik: mov Iqomah_detik,#00h
call ReadAllRTC
mov a,rtcdetik ; buzzer 10 x
mov detikan,a ; buzzer 10 x
CLR O_E
CALL HAPUS_RAM

Ulangi_Counting: MOV A,#’-‘
CALL K_M_8

MOV A,Iqomah_detik
SWAP A
call Anl_A
CALL K_M_12
MOV A,Iqomah_detik
call Anl_A
CALL K_M_13

MOV A,#':’
CALL K_M_11

MOV A,Iqomah_menit
SWAP A
call Anl_A
CALL K_M_9
MOV A,Iqomah_menit
call Anl_A
CALL K_M_10

call display_5
call ReadAllRTC
CALL STREAMRTC
mov a,rtcdetik
cjne a,detikan,Counting_down_3
jmp Ulangi_Counting

Counting_down_3: mov detikan,a
MOV A,Iqomah_detik
mov DPTR,#tabel_dec
movc A,@A+DPTR
dec a
CJNE A,#0ffh,kurangi_detik2
MOV A,#59
mov DPTR,#tabel_hex
movc A,@A+DPTR
MOV Iqomah_detik,A

MOV A,Iqomah_Menit
mov DPTR,#tabel_dec
movc A,@A+DPTR
dec a
CJNE A,#0ffh,kurangi_menit2
MOV A,#00
mov DPTR,#tabel_hex
movc A,@A+DPTR
MOV Iqomah_Menit,A

rampung_iqomah: CALL BACA_ALARM
MOV A,PULUHAN
mov DPTR,#tabel_dec
movc A,@A+DPTR
mov detikan,a
Alarm_iqomah: mov free_2,#2
Alarm_awal_i: CPL buzzer
call Tunda_1_2_Detik
djnz free_2,Alarm_awal_i
djnz detikan,Alarm_iqomah
CLR BUZZER
setb flag_waktu_sholat
jmp lanjut_stanby

kurangi_detik2: mov DPTR,#tabel_hex
movc A,@A+DPTR
MOV Iqomah_detik,A
clr buzzer
count_buzzer: jmp Ulangi_Counting

kurangi_menit2: mov DPTR,#tabel_hex
movc A,@A+DPTR
MOV Iqomah_menit,A
jmp Ulangi_Counting

lanjut_stanby: mov DPTR,#standby
call tampil_14_huruf
call display_5

CALL BACA_Stanby
MOV A,PULUHAN
mov DPTR,#tabel_dec
movc A,@A+DPTR
mov Flag_adzan,a

call ReadAllRTC
mov a,rtcdetik
mov detikan,a
lanjut_stanby_0: mov Free_2,#60
lanjut_stanby_1: call ReadAllRTC
mov a,rtcdetik
cjne A,detikan,lanjut_stanby_2
call display_5
jmp lanjut_stanby_1

lanjut_stanby_2: mov detikan,a
CLR O_E
call tunda_1_2_detik
djnz Free_2,lanjut_stanby_1
djnz Flag_adzan,lanjut_stanby_0
jmp MULAI

;#########################################################################;
; tampilan jadwal 2 baris
;##########################################################################
T_R0_8x: mov @R0,#0ffH
call T2_r0
mov @R0,#0ffH
call T2_r0
mov @R0,#0ffH
call T2_r0
mov @R0,#0ffH
call T2_r0
ret

AMBIL_RTC: CLR RTC_CS
MOVX A,@R1
SETB RTC_CS
RET

Konversi_jws: mov R0,#RM01+1
clr a
MOV R1,#SUBUH_JAM
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#SUBUH_JAM
CALL AMBIL_RTC
call Anl_A
CALL K_A
MOV R1,#SUBUH_MENIT
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#SUBUH_MENIT
CALL AMBIL_RTC
call Anl_A
CALL K_A
call T_R0_8x

MOV R1,#DZUHUR_JAM
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#DZUHUR_JAM
CALL AMBIL_RTC
call Anl_A
CALL K_A
MOV R1,#DZUHUR_MENIT
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#DZUHUR_MENIT
CALL AMBIL_RTC
call Anl_A
CALL K_A
call T_R0_8x

MOV R1,#ASHAR_JAM
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#ASHAR_JAM
CALL AMBIL_RTC
call Anl_A
CALL K_A
MOV R1,#ASHAR_MENIT
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#ASHAR_MENIT
CALL AMBIL_RTC
call Anl_A
CALL K_A
call T_R0_8x

MOV R1,#MAGHRIB_JAM
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#MAGHRIB_JAM
CALL AMBIL_RTC
call Anl_A
CALL K_A
MOV R1,#MAGHRIB_MENIT
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#MAGHRIB_MENIT
CALL AMBIL_RTC
call Anl_A
CALL K_A
call T_R0_8x

MOV R1,#ISYA_JAM
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#ISYA_JAM
CALL AMBIL_RTC
call Anl_A
CALL K_A
MOV R1,#ISYA_MENIT
CALL AMBIL_RTC
call swapa
CALL K_A
MOV R1,#ISYA_MENIT
CALL AMBIL_RTC
call Anl_A
CALL K_A
ret

Konversi_Subuh: mov R0,#RM01
clr a
mov A,#’S’
call k_S
mov A,#’U’
call k_S
mov A,#’B’
call k_S
mov A,#’H’
call k_S
call T_R0_8x

mov A,#’D’
call k_S
mov A,#’Z’
call k_S
mov A,#’H’
call k_S
mov A,#’R’
call k_S
call T_R0_8x

mov A,#’A’
call k_S
mov A,#’S’
call k_S
mov A,#’H’
call k_S
mov A,#’R’
call k_S
call T_R0_8x

mov A,#’M’
call k_S
mov A,#’G’
call k_S
mov A,#’R’
call k_S
mov A,#’B’
call k_S
call T_R0_8x

mov A,#’I’
call k_S
mov A,#’S’
call k_S
mov A,#’Y’
call k_S
mov A,#’A’
call k_S
ret
;#########################################################################;
k_a: cjne A,#’0′,k_a_1 ; ok
mov @R0,#0C1H
call T2_R0
mov @R0,#0BEH
call T2_R0
mov @R0,#0C1H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_1: cjne A,#’1′,k_a_2 ; ok
mov @R0,#0DEh
call T2_R0
mov @R0,#080H
call T2_R0
mov @R0,#0fEH
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_2: cjne A,#’2′,k_a_3 ;ok
mov @R0,#0D8H
call T2_R0
mov @R0,#0B6H
call T2_R0
mov @R0,#0CEH
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_3: cjne A,#’3′,k_a_4 ;ok
mov @R0,#0B6H
call T2_R0
mov @R0,#0B6H
call T2_R0
mov @R0,#0C9H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_4: cjne A,#’4′,k_a_5 ; ok
mov @R0,#0E7H
call T2_R0
mov @R0,#0D7H
call T2_R0
mov @R0,#080H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_5: cjne A,#’5′,k_a_6 ;ok
mov @R0,#086H
call T2_R0
mov @R0,#0B6H
call T2_R0
mov @R0,#0B1H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_6: cjne A,#’6′,k_a_7 ;ok
mov @R0,#0C1H
call T2_R0
mov @R0,#0B6H
call T2_R0
mov @R0,#0B8H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_7: cjne A,#’7′,k_a_8 ; ok
mov @R0,#0BCH
call T2_R0
mov @R0,#0B3H
call T2_R0
mov @R0,#08FH
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_a_8: cjne A,#’8′,k_a_9;ok
mov @R0,#0C9H
call T2_r0
mov @R0,#0B6H
call T2_r0
mov @R0,#0C9H
call T2_r0
mov @R0,#0ffh
call T2_r0
ret
k_a_9: cjne A,#’9′,k_a_10;ok
mov @R0,#0CEH
call T2_R0
mov @R0,#0B6H
call T2_R0
mov @R0,#0C1H
call T2_R0
mov @R0,#0ffh
call T2_R0
k_a_10: ret
;#########################################################################;
k_S: cjne A,#’A’,k_S_1;oke
mov @R0,#81H
call T2_R0
mov @R0,#77H
call T2_R0
mov @R0,#81H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_1: cjne A,#’B’,k_S_2 ; oke
mov @R0,#01h
call T2_R0
mov @R0,#6dH
call T2_R0
mov @R0,#93H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_2: cjne A,#’D’,k_S_3;oke
mov @R0,#01H
call T2_R0
mov @R0,#7dH
call T2_R0
mov @R0,#83H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_3: cjne A,#’G’,k_S_4;oke
mov @R0,#83H
call T2_R0
mov @R0,#7dH
call T2_R0
mov @R0,#61H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_4: cjne A,#’H’,k_S_5 ; oke
mov @R0,#01H
call T2_R0
mov @R0,#0efH
call T2_R0
mov @R0,#01H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_5: cjne A,#’I’,k_S_6;OKe
mov @R0,#7dH
call T2_R0
mov @R0,#01H
call T2_R0
mov @R0,#7dH
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_6: cjne A,#’M’,k_S_7;OKe
mov @R0,#01H
call T2_R0
mov @R0,#9fH
call T2_R0
mov @R0,#01H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_7: cjne A,#’R’,k_S_8;OKe
mov @R0,#01H
call T2_R0
mov @R0,#6fH
call T2_R0
mov @R0,#91H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_8: cjne A,#’S’,k_S_9 ;oke
mov @R0,#9bH
call T2_r0
mov @R0,#6dH
call T2_r0
mov @R0,#0b3H
call T2_r0
mov @R0,#0ffh
call T2_r0
ret
k_S_9: cjne A,#’U’,k_S_10 ;oke
mov @R0,#03H
call T2_R0
mov @R0,#0fdH
call T2_R0
mov @R0,#03H
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_10: cjne A,#’Y’,k_S_11;OK
mov @R0,#0fH
call T2_R0
mov @R0,#0e1H
call T2_R0
mov @R0,#0fH
call T2_R0
mov @R0,#0ffh
call T2_R0
ret
k_S_11: cjne A,#’Z’,k_S_12
mov @R0,#71H
call T2_R0
mov @R0,#6dH
call T2_R0
mov @R0,#1dH
call T2_R0
mov @R0,#0ffh
call T2_R0
k_S_12: ret

end