Home
Untitled - Universiti Teknologi Malaysia
Contents
1. 29 V cc VIO Reference Voltage TCK GND TDO TMS debugac KE TDI debugreq Figure 4 3 JTAG connector If the Nios II processor is part of a chain of JTAG devices whether all on the same physical chip or on separate chips the devices should be connected in a daisy chain with TCK and TMS common to all devices and TDO from one device leading to TDI of the next For targets that include the off chip Trace Port FS2 provides the System Navigator Original Edition OE T probe with a high speed ribbonized coax connection to the target Trace data is compressed then multiplexed onto this cable The probe demultiplexes the trace data and stores it in high speed SRAM Off chip trace is typically much deeper than on chip trace but requires use of several chip I O pads 30 4 5 Detail Design Before the Prayer Time constructed some of the reguirements need to know first This is because to do that successfully it works without any error The reguirements need to know are year month day time minute and location The Prayer Time developed is based on flow chart in Figure 4 4 to works correctly whereas we wanted that it did Based on the flow chart below year month day hour minute and location need to insert manually Once you push the Mode button it will loop until the location inserted After all reguirements inserted the time and the prayer time will exhibit i
2. A ends Twilight begins Midnight Figure 2 1 Position of prayer times 2 3 Calculation of Solat Times To calculate the prayer times for a certain place we need to know the latitude B and longitude L of the location and its reference longitude R B and L may be obtained from an atlas and R may be calculated by multiplying 15 by the reference between local time and GMT One also need to know two astronomical measures called the declination angle of the sun D and the real time mean time difference also known as the equation of time T Declination is the angular distance between a celestial object and the celestial equator The Declination and the Right Ascension are used together to give the position of a star with reference to the celestial equator and the vernal equinox respectively The equation of the time is a correction to be added to apparent solar time as read on a sundial to obtain means solar time as commonly used This difference is a consequence of the elasticity and tilt of the Earth s orbit causing the irregular apparent movement of the Sun across the sky D and T vary according to the time of year and can be obtained accurately from The Star Almanec or approximate Figure 2 2 Graph of Declination angle D versus Month Figure 2 3 Graph of Equation of Time T versus Month The following equation may be used to calculate the prayer times
3. E2Disable7Seg D D Di DE2Disable7Seg Di DE2Disable7Seg Di Di E2Disable7Seg DE2 SDRAM SDRAM DE2WriteSDRAM 0x000004 DE2SDRAMDriver amp SDRAM minit minit return to main if button 0xB return void location void int i SDRAM float lon lat int button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE while 1 next button while button 0xE if i gt 6 i 0 if i 0 DE2 LCD LINE line line hex2ascii O C A TG I O N sp sp sp sp sp sp P A Q H A T blank_line lt 152 DE2LCDDriver line else lat 1 83333333 lon 102 93333333 if i 1 DE2 LCD LINE line line hex2ascii DE2LCDDriver line else lat 1 46666667 lon 103 76666667 if i 2 DE2_LCD_LINE line sp spese co sp sp GS Q E ATA sp o C9 Ad Td I QORN sp sp sp sp J O Q HQ O E sp B A H R QU blank_line lt 152 60 memory lt minit display location L R 61 line hex2ascii sp sp S EG T sp LG O C A Q T I O Q N amp sp sp sp sp K R O T A sp 6 T I N G G I blank_line lt 152 DE2LCDDriver line lat 1 73333333 lon 103 88333333 else if i 3 i DE2 LCD LINE line line hex2ascii sp sp AS EG T sp T I O G N sp sp sp sp s
4. GND mu R15 680 3 3 05 2 2 X 16 DIGITAL 112 Figure 3 5 Schematic diagram of the LCD module 20 Table 3 1 Pin assignments for the LCD module Signal Name FPGA Pin No Description LCD_DATA 0 PIN_J1 LCD Data 0 LCD_DATA 1 PIN_J2 LCD Data 1 LCD_DATA 2 PIN HI LCD Data 2 LCD DATA 3 PIN H2 LCD Data 3 LCD DATA 4 PIN J4 LCD Data 4 LCD DATA 5 PIN J3 LCD Data 5 LCD DATA 6 PIN H4 LCD Data 6 LCD DATA 7 PIN H3 LCD Data 7 RU PIN KA LCD Read Write Select 0 Write 1 read LCD EN PIN K3 LCD Enable LCD RS PIN Ki LCD Command Data Select 0 Command 1 Data LCD_ON PIN 14 LCD Power ON OFF LCD BLON PIN K2 LCD Back Light ON OFF 3 4 Software Development process The development process of the software was done using The Spiral Model The model originally proposed by Boehm BOE88 is an evolutionary software process model that couples the iterative nature of prototyping with the controlled and systematic aspects of the linear seguential model A Spiral Model is divided into a number of framework activities also called as task regions The Development phases are as following 21 Phase 1 Conceptualization and Planning Phase This phase is where the planning of the project is done The specifications that are being taken are the main objective the project scope time frame of the
5. amp SDRAM jam SDRAM line hex2ascii sp sp sp sp AS Q E T sp E sp sp sp sp sp sp sp sp sp sp R blank_line lt 152 DE2LCDDriver line 58 e TAI H O G jam lt memory memory lt memory lt jam jam if button 0xB return void minit void int a0 al int minit display minutes 59 int button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE DE2 LCD LINE line line hex2ascii sp sp sp sp S EG T sp T I H x E blank line lt 152 DE2LCDDriver line while 1 DE2 SDRAM SDRAM DE2ReadSDRAM 0x000004 DE2SDRAMDriver amp SDRAM next button while button 0xE 1 if minit gt 59 minit 0 al minit 10 a0 minit al 10 al display a1 a0 display a0 DE2Set7SegDigit 5 a1 DE2Set7SegDigit 4 a0 DE2Disable7Seg 7 DE2Disable7Seg 6 DE2Disable7Seg 3 DE2Disable7Seg 2 DE2Disable7Seg 1 DE2Disable7Seg 0 DE2 SDRAM SDRAM DE2WriteSDRAM 0x000004 DE2SDRAMDriver amp SDRAM minit previous button while button 0xD if minit lt 0O minit 59 al minit 10 Q E sp sp sp sp sp sp sp sp spa M I N EU minit lt memory memory lt minit a0 minit al 10 al display al a0 display a0 E2Set7SegDigit 5 al1 E2Set7SegDigit 4 a0 E2Disable7Seg 7 E2Disable7Seg
6. cosD cosB cosD cosB d sin farccot 1 tan B D sinD sinB cosD cosB X l arccos Sin farccot 2 tan B D sinD sinB cosD cosB 10 Where B latitude of place D longitude of place R reference longitude i e TIME BAND x 15 H height above sea level in metres D declination angle of sun from celestial equator negative in southern hemisphere T equation of time G twilight angle e Subuh Z V e Sunrise Z U e Zuhur Z e Asarl Shafi Z W e Asar Hanafi Z X e Maghrib Sunset Z U e Isyak Z V The algorithm to calculate T and D are not shown here Zuhur time is calculated using Equation 1 The time for sunrise and sunset Maghrib may be calculated by subtracting or adding U obtained from Equation 2 to the Zuhur time respectively Subuh and Isyak times may be calculated by subtraction or adding V obtained from Equation 3 to the Zuhur time respectively The term G twilight angle in Equation 3 is usually set to 18 degrees For a location with extreme latitude days in summer may be so long that twilight persists between sunset and the next sunrise Under these circumstances V is undefined and Subuh and Isyak have to be determined using agreed principles of Figh 11 The start of Asar time Shafi may be obtained by adding W obtained from Equation 4 to Zuhur Asar time Hanafi is calculated by adding X obtained from Equation 5 to Zuh
7. tahun SDRAM tahun SDRAM memory lt tahun memory lt tahun void bulan void Qe mH i i i i D all D int if button 0xB return nt nt nt bulan a0 al day display month E2 LCD LINE ine line hex2ascii blank line lt 152 E2LCDDriver line while 1 DE2 SDRAM SDRAM E2ReadSDRAM 0x000001 DE2SDRAMDriver amp SDRAM O next button while button 0xE if bulan gt 12 bulan 1 L2 al bulan 10 a0 bulan al 10 al displ a0 displ ay al ay a0 DE2Set7SegDigit 5 a1 DE2Set7SegDigit 4 a0 DE2Disable7Seg 7 DE2Disabl DE2Disabl Di Di Di E2Disabl E2Disabl E2Disabl DE2 DE2 SDRAM SDRAM bulan previous button while button 0xD if bulan lt 1 bulan VriteSDRAM 0x000001 DE2SDRAMDriver amp SDRAM SDRAM bulan SDRAM 55 mon 13 1 0 31 28 31 30 31 30 31 31 30 31 30 31 button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE Q sp sp sp sp P S bd T sp ED A E sp sp sp sp G sp sp sp sp spa M 09 N T bulan lt memory memory lt bulan void hari void gt O DH bulan 12 al bulan 10 a0 bulan al 10 al display al a0 display a0 DI DI DE2Disable7Seg 7 DE2Disable7Seg Di Di Di Di 6 F2Disable7Seg 3 F2Dis
8. R blank line lt 152 DE2LCDDriver line GA E G T A G while 1 DE2 SDRAM SDRAM DE2ReadSDRAM 0x000000 tahun SDRAM tahun lt memory DE2SDRAMDriver amp SDRAM next button while button 0xE if tahu 54 n gt 2060 tahun 2010 a3 tahu a2 tahun a3 1000 n 1000 100 al tahun a3 1000 a2 100 10 a0 tahun a3 1000 a2 100 a1 10 a3 display a2 display al display a0 display F2Set7SegDigit 3 a3 E2Set7SegDigit 2 a2 E2Set7SegDigit 1 a1 E2Set7SegDigit 0 a0 E2Disabl E2Disabl E2Disabl D D D D DE2Disabl D D D e7Seg 7 e7Seg e7Seg e7Seg 7 6 9 4 DE2_SDRAM SDRAM DE2WriteSDRAM 0x000000 DE2SDRAMDriver amp SDRAM tahun previous button while button 0xD if tahun lt 2010 tahun 2060 a3 tahun 1000 a2 tahun a3 1000 100 al tahun a3 1000 a2 100 10 a0 tahun a3 1000 a2 100 a1 10 a3 display a a2 display a al display a a0 display a E2Set7SegDigit E2Set7SegDigit F2Set7SegDigit F2Set7SegDigit F2Disable7Seg F2Disable7Seg E2Disable7Seg E2Disable7Seg E oe eS 4 6 2 4 3 27 1 0 a0 DE2 SDRAM SDRAM DE2WriteSDRAM 0x000000 DE2SDRAMDriver amp SDRAM tahun return to main
9. and software development In main process it contains how to choose device can be used in this project implement the hardware testing and verification The second process is hardware development that will be discussed about the specification of device that was choosing in main process Finally software development process will discuss the conceptual and planning phase development process troubleshooting testing and verification 3 2 Main Process Figure 3 1 below shows the main process of the Prayer Time Device Literature review were done to study all devices related followed by selecting device 15 needed The device that was selected based on the software that must used to develop this project Literature Review Select Device Software Programming Troubleshoot and repair bugs End product Figure 3 1 Flow chart of Main Process DE2 board was used in designing and implement the hardware before programming the codes in software Testing and verifications need to be carried out to ensure the results are reliable and achieves the objectives of the project 16 3 3 Hardware Development process The device choosen is Altera DE2 board The purpose of this board is to provide the ideal vehicle for learning about digital logic computer organization and FPGAs It uses the state of the art technology in both hardware and CAD tools to expose to a wide range of topics The board offers a rich set of features that ma
10. development process and sources needed in accomplishing the projects Phase 2 Development process After deciding the concepts and the prerequisites of the projects this implementation phase is done The software design was carried out by coding the program and this phase is very time consuming Phase 3 Troubleshooting The software and the hardware are implemented together Debugging is carried out to overcome any logical flaws in algorithm implementation Phase 4 Testing and Verification Testing and verification have to be made to ensure the softwares are reliable Data comparisons with the standard output from other sources are applied CHAPTER 4 SOFTWARE DESIGN AND DEVELOPMENT 4 1 Introduction This chapter discusses the embedded C coding the assembly language software development environment and detail design A part of the declaration of the hardware is the same reason of the assembly language of the use For the software development environment Quartus and Nios was chooses It is because for the Altera hardware need to use Altera software tool to make it will program successfully For the software development environment Quartus and Nios were chooses It is because so that the necessity of the Altera hardware it uses the tool of the Altera software to do will program successfully it In detail design it will demonstrate that the design has become and to elaborate the function for that product 23 4 2 Embe
11. hl display h0 display E2Set7SegDigit 3 h3 E2Set7SegDigit 2 h2 F2Set 7SegDigit 1 h1 E2Set7SegDigit 0 h0 D D D D else if time gt syu display zho D E2 LCD LINE line lin sp T CI M H O R blank ti e hex2ascii sp sp PG R A Y d E sp sp sp sp sp sp sp sp Z line lt 152 DE 2 CDDriver line h3 zho 1000 h2 zho h3 1000 100 hl zho h3 1000 h2 100 10 h0 zho h3 1000 h2 100 hl 10 49 h3 display h3 h2 display h2 hl display hl h0 display h0 E2Set7SegDigit 3 h3 E2Set7SegDigit 2 h2 F2Set7SegDigit 1 h1 E2Set7SegDigit 0 h0 D D D D else if time gt zho display asr DE2 LCD LINE line line hex2ascii sp sp P R AG Y E sp T I CM EG sp sp sp sp sp sp sp sp CA A R blank_line lt 152 DE2LCDDriver line h3 asr 1000 h2 asr h3 1000 100 hl asr h3 1000 h2 100 10 h0 asr h3 1000 h2 100 h1 10 h3 display h2 display hl display h0 display E2Set7SegDigit 3 h3 E2Set7SegDigit 2 h2 F2Set 7SegDigit 1 h1 E2Set7SegDigit 0 h0 D D D D else if time gt asr display mag DE2_LCD_LINE line line hex2ascii sp sp P R A Y A sp T I M E sp sp sp sp sp 6
12. l tan B D d2r sin D d2r sin B d2r cos D d2r cos B d2r r2d 15 prayer time declaration sub syu Z U 0 0666666666 Z V 1 2833333333 DE S E T E Ad zho Z asr Z W 0 7 mag Z V 1 25 isy Z U convert to degrees and minites subl sub sub2 sub sub1 60 sub sub1 100 sub2 syul syu syu2 syu syul 60 syu syul 100 syu2 zhol zho zho2 zho zhol 60 zho zhol 100 zho2 asrl asr asr2 asr asr1 60 asr asr1 100 asr2 magl mag mag2 mag mag1 60 mag mag1 100 mag2 isyl isy isy2 isy isyl 60 isy isy1 100 isy2 E2 SDRAM SDRAM E2WriteSDRAM 0x000005 E2WriteSDRAM 0x000006 E2WriteSDRAM 0x000007 E2WriteSDRAM 0x000008 E2WriteSDRAM 0x000009 E2WriteSDRAM 0x00000A E2SDRAMDriver amp SDRAM NIN return sub syu zho asr mag isy memory lt sub memory lt syu memory zho memory lt asr memory lt mag memory lt isy 64
13. sp sp CM CA H R IG B blank_line lt 152 DE2LCDDriver line H h3 mag 1000 h2 mag h3 1000 100 h1 mag h3 1000 h2 100 10 h0 mag h3 1000 h2 100 h1 10 h3 display h3 h2 display h2 hl display h1 hO display h0 DE2Set7SegDigit 3 h3 DE2Set 7SegDigit 2 h2 DE2Set7SegDigit 1 h1 DE2Set7SegDigit 0 h0 sp T I C M EG sp sp sp sp sp sp sp sp al 50 else if time gt mag display isy DE2 LCD LINE line line hex2ascii sp sp P R A Y Q A K blank_line lt 152 DE2LCDDriver line h3 isy 1000 h2 isy h3 1000 100 h1 isy h3 1000 h2 100 10 h0 isy h3 1000 h2 100 h1 10 h3 display h2 display hl display h0 display E2Set7SegDigit 3 h3 E2Set7SegDigit 2 h2 F2Set 7SegDigit 1 h1 E2Set7SegDigit 0 h0 D D D D if time sub time zho time asr time mag time isy LON PIO DATA LED RED BASE OxFFFF LON PIO DATA LED RED BASE 0x0000 else LON PIO DATA LED RED BASE 0x8000 LON PIO DATA LED RED BASE 0x0000 h3 time 1000 h2 time h3 1000 100 hl time h3 1000 h2 100 10 h0 time h3 1000 h2 100 h1 10 h3 display h3 h2 display h2 hl display hl h0 display h0 DE2Set 7SegDigit 7 h3 DE2Set7SegDigit 6 h2 D
14. 2002 Stephen Brown Fundamental of Digital Logic with VHDL Design ond Edition Toronto Mc Graw Hill APPENDIX A Hardware schematic diagram LELELELELELELELELELELELELELLL CELL ARA A ARA AAA AAA AAA AAA AAA AAA ARA AAA AAA AAA AAA AAR LALA AAA AAA A AAA AA AAA A zs addr from the sdram 0 11 0 zs ba from the sdram 0 1 0 zs cas n from the sdram 0 zs cke from the sdram 0 zs cs n from the sdram 0 zs dg to and from the sdram 0 15 0 zs dam from the sdram 0 1 0 zs ras n from the sdram 0 i inst TT gt gt gt gt gt gt MSS S aaa 45 APPENDIX B Programming In C Language a prayer c Top level file include include include include include include include void mai int int int int DE 2 line H Km QA DE2L DE2 DE2R DE2R DE2S time whil lt stdio h gt lt math h gt lt unistd h gt altera avalon pio regs h system h DE2 hch header h n void i time sub syu zho asr mag isy h3 h2 h1 h0 day min hour lat lon button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE LCD LINE line 47 hex2ascii 8 sp sp sp P QO R A Y E R sp N blank_line lt 152 CDDriver line SDRAM SDRAM eadSDRAM 0x000003 hour SDRAM eadSDRAM 0x000004 min SDRAM DRAMDriver amp SDRAM hour 100 min e l t DE2 SDRAM SDRAM DE2ReadSDRAM 0x000005 sub SDRAM DE2ReadSDRAM 0x000006 syu SDRAM DE2Re
15. E2Set 7SegDigit 5 h1 DE2Set 7SegDigit 4 h0 i if min gt 59 min 0 hour if hour gt 23 D D D D t 51 hour 0 day D D D E2 SDRAM SDRAM E2WriteSDRAM 0x000002 day SDRAM E2SDRAMDriver amp SDRAM calc E2 SDRAM E2WriteSDRAM 0x000004 min SDRAM E2WriteSDRAM 0x000003 hour SDRAM E2SDRAMDriver amp SDRAM SDRAM ime hour 100 min b header h ifndef HEADER H define HEADER H int display int void tahun void void bulan void void hari void void jam void void minit void void location void void calc void endif HEADER H 53 c header c include altera_avalon_pio_regs h include system h include DE2 hch include lt math h gt define d2r 0 01745329251994329576923690768489 degrees to radians define r2d 57 295779513082320876798154814105 radians to degrees int display int a display seven segment int h if a 0 h 0x0 if a 1 h 0x1 if a 2 h 0x2 if a 3 h 0x3 if a 4 h 0x4 if a 5 h 0x5 if a 6 h 0x6 if a 7 h 0x7 if a 8 h 0x8 if a 9 h 0x9 return h void tahun void display year int a0 al a2 a3 int tahun int button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE DF2 LCD LINE line line hex2ascii sp sp sp sp S Q E T sp D E sp sp sp sp sp sp G sp sp sp sp Y
16. II environment Detail Design RESULT AND DISCUSSION 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 8 Introduction The Device Working The Device Seeing The Prayer Times Fits the Date Fits the Time Fits the Location Discussion CONCLUSION AND FURTHER WORK 6 1 6 2 Conclusion Further Work 14 14 16 20 22 23 23 24 24 27 30 32 32 33 34 35 37 38 40 41 42 TABLE 2 1 3 1 4 1 LIST OF TABLES TITLE Twilight angle of different Organization Pin assignments for the LCD module Pinout of the target connector xi PAGE 11 20 28 FIGURES 2 1 22 2 3 2 4 3 1 3 2 3 3 3 4 3 5 4 1 4 2 4 3 4 4 5 1 5 2 5 3 5 4 5 5 5 6 5 7 5 8 5 9 LIST OF FIGURES TITLE Position of prayer times Graph of Declination angle D versus Month Graph of Equation of Time T versus Month Malaysia latitude and longitude Flow chart of Main Process The DE2 board Schematic diagram of the 7 segment displays Position and index of each segment in a 7 segment displays Schematic diagram of the LCD module Typical CAD flow chart Nios Hardware and Software interface JTAG connector Prayer Time flow chart I O configuration on DE2 board Begin Operation Prayer Time displayed Setting year Setting month Setting day Setting hour Setting minute Location displayed xii PAGE 13 15 16 18 18 19 25 27 29 31 33 34 35 36 36 36 37 37 39 AC DC DIP FSR GND GPR
17. LCD WDT EEPROM PWM RISC CPU SSP ICSP IO PC DIY xiii LIST OF ABBREVIATIONS Alternating Current Direct Current Dual Inline Package File Select Register Ground General Purpose Register Liguid Crystal Display Watch Dog Timer Electronically Erasable Read only Memory Pulse Width Modulation Reduce Instruction Set Computer Central Processing Unit Synchronous Serial Port In Circuit Serial Port Input Output Personal Computer Do It Yourself CHAPTER 1 INTRODUCTION 1 1 Times of Solat Solat times are set in such a way that there is continuous communication with the creator There are times in which Solat cannot be offered Prayer is not allowed at sunrise and sunset to avoid confusion with worshippers of the sun The obligatory prayers need to be performed during their times Currently specific astronomical theories based Quran and Hadith are being used on deciding each time prayer It is said in Quran which means When ye have performed the act of worship remember Allah standing sitting and reclining And when ye are in safety observe proper worship Worship at fixed times hath been enjoined on the believers Surah al Nisaa 103 1 2 Problem Statements It is hard to know the prayer of each prayer times In the old days people use stick and sees is shadow to know the prayer times Nowadays astronomical researches and findings are used in computing t
18. PSZ 19 16 Pind 1 07 UNIVERSITI TEKNOLOGI MALAYSIA DECLARATION OF THESIS UNDERGRADUATE PROJECT PAPER AND COPYRIGHT Author s full name NORAZMAN BIN HUSSIN Date of birth 9H MAY 1985 Title PRAYER TIME BY USING ALTERA DE2 BOARD Academic Session 2009 2010 I declare that this thesis is classified as CONFIDENTIAL Contains confidential information under the Official Secret Act 1972 RESTRICTED Contains restricted information as specified by the organisation where research was done OPEN ACCESS agree that my thesis to be published as online open access full text acknowledged that Universiti Teknologi Malaysia reserves the right as follows The thesis is the property of Universiti Teknologi Malaysia The Library of Universiti Teknologi Malaysia has the right to make copies for the purpose of research only The Library has the right to make copies of the thesis for academic exchange Certified by O Ua re SIGNATURE OF SUPERVISOR Dr Muhammad Nadzir Marsono NEW IC NO PASSPORT NO NAME OF SUPERVISOR Date 30 April 2010 Date 30 April 2010 NOTES If the thesis is CONFIDENTIAL or RESTRICTED please attach with the letter from the organisation with period and reasons for confidentiality or restriction I declare that I have read this thesis and in my opinion it is suitable in term of scope and guality for the purpose of the degree of Bachelor Degree of Engineering Comp
19. When ye have performed the act of worship remember Allah standing sitting and reclining And when ye are in safety observe proper worship Worship at fixed times hath been enjoined on the believers Surah al Nisaa 103 Therefore be patient with what they say and celebrate constantly the praises of thy Lord before the rising of the sun and before its setting yea celebrate them for part of the hours of the night and at the sides of the day that thou mayest have spiritual Surah Toha 130 Hadith related that verify the prayer time which means Ibn Abbas said The Messenger of Allah peace and blessings of Allah be on him said Gabriel acted as imam for me twice in the Sacred House so he said the Zuhur prayer with me when the sun had declined from the meridian and the shadow was the measure of a thong and he said the Asar prayer with me when the shadow of everything was the like of it and he said the Maghrib prayer with me when one who fasts breaks at fast and he said the Isyak prayer with me when redness in the horizon had disappeared and he said the Subuh prayer with me when food and drink are prohibited to one who fasts When it was the next day he said with me the Zuhur prayer when the shadow of a thing was the like of it and he said with me the Asar prayer when the shadow of a thing was its double and he said with me the Maghrib prayer when one who fasts breaks the fast and he said with me the Isy
20. able7Seg 2 1 0 E2Disable7Seg E2Disable7Seg DE2 SDRAM SDRAM bulan go to hari day mon bulan return to main if button 0xB return int a0 al day int hari E2Set7SegDigit 5 al1 E2Set7SegDigit 4 a0 DE2WriteSDRAM 0x000001 DE2SDRAMDriver amp SDRAM bulan SDRAM display day 56 memory lt bulan int button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE DE2 LCD LINE line line hex2ascii sp sp sp sp P S Ead T sp D A Q EG sp sp sp sp sp sp sp G sp sp sp sp D 6 Y blank line lt 152 DE2LCDDriver line while 1 DE2 SDRAM SDRAM DE2ReadSDRAM 0x000002 DE2SDRAMDriver amp SDRAM next button while button 0xE if day gt hari day 1 al day 10 a0 day a1 10 SDRAM day lt memory al display al a0 display a0 DE2Set7SegDigit 7 a1 DE2Set7SegDigit 6 a0 DE2Disable7Seg 5 DE2Disable7Seg Di Di Di Di 4 F2Disable7Seg 3 F2Disable7Seg 2 1 0 E2Disable7Seg E2Disable7Seg DE2 SDRAM SDRAM DE2WriteSDRAM 0x000002 DE2SDRAMDriver amp SDRAM day day SDRAM previous button while button 0xD if day lt 1 day hari al day 10 a0 day a1 10 al display al a0 display a0 DE2Set7SegDigit 7 a1 DE2Set7SegDigit 6 a0 DE2Disable7Seg 5 DE2Disable7Seg 4 Di Di D
21. adSDRAM 0x000007 zho SDRAM DE2ReadSDRAM 0x000008 asr SDRAM DE2ReadSDRAM 0x000009 mag SDRA DE2ReadSDRAM 0x00000A isy SDRA DE2ReadSDRAM 0x00000B lat SDRAM DE2ReadSDRAM 0x00000C lon SDRAM DE2SDRAMDriver amp SDRAM real time prayer while i lt 60 if button 0x7 tahun bulan hari j jam minit location calel if time gt isy t display sub DE2_LCD_LINE line ZE HS IG MG E sp sp sp sp sp CB Ay sp M No Ne Ne Ne Ne No me esp A Z sp ET CI M U H blank B sp T CI M A UGK 8 blank R 48 line hex2ascii sp sp P R AG Y E E sp sp sp sp sp sp sp sp S _line lt 152 CDDriver line DE2 h3 sub 1000 h2 sub h3 1000 100 h1 sub h3 1000 h2 100 10 h0 sub h3 1000 h2 100 h1 10 h3 display h3 h2 display h2 hl display hl h0 display h0 E2Set7SegDigit 3 h3 E2Set7SegDigit 2 h2 E2Set7SegDigit 1 h1l E2Set7SegDigit 0 h0 D D D D else if time gt sub display syu DE2_LCD_LINE line line hex2ascii sp sp PG R A Y E E sp sp sp sp sp G sp G sp G S Y line lt 152 CDDriver line DE2 h3 syu 1000 h2 syu h3 1000 100 hi syu h3 1000 h2 100 10 hO syu h3 1000 h2 100 h1 10 h3 display h2 display
22. ak prayer when one third of the night had passed and he said with me the Subuh prayer when the dawn was bright Then he turned to me and said O Muhammad This is the time of the prophets before thee and the time is between these two times Ad Tr Msh 4 1 Each prayer must be made in its specified time The definition of hourly of the prayer based on al Quran and Hadith is follows e SUBUH starts with the dawn or morning twilight Subuh ends just before sunrise e ZUHUR begins after midday when the trailing limb of the sun has passed the meridian For convenience many published prayer timetables add five minutes to mid day zawal to obtain the start of Zuhur Zuhur ends at the start of Asar time e The timing of ASAR depends on the length of the shadow cast by an object According to the Shafi School of jurisprudence Asar begins when the length of the shadow of an object exceeds the length of the object According to the Hanafi School of jurisprudence Asar begins when the length of the shadow exceeds TWICE the length of the object In both cases the minimum length of shadow which occurs when the sun passed the meridian is subtracted from the length of the shadow before comparing it with the length of the object e MAGHRIB begins at sunset and ends at the start of Isyak e ISYAK starts after dusk when the evening twilight disappears Shadow length noon shadow Shadow 2 x length noon shadow Sunset Sunrise
23. atures and software CAD tools needed to implement designs on these boards but very little material has been offered that could be used directly for teaching purposes The DE2 Board has eight 7 segment displays These displays are arranged into two pairs and a group of four with the intent of displaying numbers of various sizes As indicated in the schematic in Figure 3 3 the seven segments are connected to pins on the Cyclone II FPGA Applying a low logic level to a segment causes it to light up and applying a high logic level turns it off Each segment in a display is identified by an index from O to 6 with the positions given in Figure 3 4 Note that the dot in each display is unconnected and cannot be used 18 Ha AA aaa L PETI i FIIZTiZB jwa aa Figure 3 4 Position and index of each segment in a 7 segment display The LCD module has built in fonts and can be used to display text by sending appropriate commands to the display controller which is called HD44780 Detailed information for using the display is available in its datasheet which can be found on the manufacturer s web site and from the Datasheet folder on the DE2 System CD ROM A schematic diagram of the LCD module showing connections to the Cyclone II FPGA is given in Figure 3 5 The associated pin assignments appear in Table 3 1 19 Q1 8050 Q2 8550 NS R14 680 L VCC43 04 8550
24. d guidelines in this project are listed to ensure the project is conducted within its intended boundary This is ensuring the project is leading in the right direction to achieve the objectives of this project The first scope of this project is to implement a device that can find time prayer based on date time and location Secondly using an end product device such as DE2 board and programmed it to make it works like as planning The development of the application is made using C programming code where it builds at Nios2 to program into FPGA inside the DE2 board By the way Quartus is used to declare the hardware at DE2 board CHAPTER 2 BASIC CONCEPT AND THEORY 2 1 Introduction The five Islamic prayers name Subuh Zuhur Asar Maghrib and Isyak The synchronization of these five prayers varies from a site to another one and day per day It is obligatory so that the Muslims make these prayers at the correct time The prayer times for any location given in the Earth can mathematically be determined if the latitude and the longitude of the location are known Nevertheless the theoretical determination of the prayer times is a very long process Of this tediousness it can much be alleviated using computer programs 22 Definition of prayer times There are the guotations of Ouran that define the importance of making prayer in the specific moment and to be obligatory to follow the time of the prayer which means
25. dded C programming The software part presented is written in C high level language C that it programs provides really more convenience for the new users reducing to the minimum the necessity to understand the architecture of the microcontroller itself of the detail and to stress more in the programming algorithms This means that the C programming can help the user to focus of how making a routine functional to smoothly work the code rather that spends the time that thinks about where to put the data and the code With C high level programming the users they will only need to know how to write the code rather than to knowing how the microcontroller executes codes to the wished result Inevitable which it continues being a necessity to understand the architectonic structures of registries and the file of data of the microcontroller the users can make use the structure of C programming language save more hour studying the codes for LCD seven segments microcontroller and the ways to integrate them together 4 3 Assembly language Apart from the complexity of assemble code assembly language is important in the microcontroller where it allows users to supervise each aspect of the program Another advantage of the assembly language is the resources available in the Internet where one can just download most of the demo and example code in this language format The disadvantage of the C code language is that the compiled size is generally more leng
26. he prayer time There are several applications on the Internet that calculate prayer times They have to insert information on current location and prayer information will be given As the technologies grow various mobile companies gives prayer time services The problem is that the applications itself are not portable self generated but rely on the service itself Services from websites need the user to have internet connections making it not practical for daily use People exchange the daily change from a place to another one and they needs to know the time of the prayer in the present place that they goes By the way people somehow need to ask which lives in that place The problem is when somebody moves to a place that it has rarely Muslim It can be that it does them that they confused and that they vacillated to request in there 13 Objectives This project is prepared to reach some objectives that are to identify the given entrance and later to exhibit the exit depending of entrance It will recognize four push buttons like Mode Select Back and Next Secondly to discover an advisable algorithm that use to write the C or C code programming in Quartus II and Nios II to obtain the real hardware made by using DE2 board This method will need software to turn it Finally to learn more on Quartus IT and Nios II that program more popular is used to solve a problem in directing the field for FPGA 1 4 Work Scope The scopes an
27. i Di E2Disable7Seg E2Disable7Seg E2Disable7Seg E2Disable7Seg DE2 SDRAM SDRAM DE2WriteSDRAM 0x000002 DE2SDRAMDriver amp SDRAM day day SDRAM return to main if button 0xB return void jam void display hours int a0 al int jam memory lt day memory lt day int button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE DE2 LCD LINE line 57 while 1 next button while button 0x if jam gt 23 jam 0 DE2 SDRAM SDRAM DE2ReadSDRAM 0x000003 DE2SDRAMDriver amp SDRAM jam SDRAM Gl yA al jam 1 a0 jam al displ a0 displ E2set7s E2Set7S E2Disabl 0 al 10 ay a1 ay a0 egDigit 7 a1 egDigit 6 a0 e7Seg 5 E2Disabl E2Disabl E2Disabl D D Di DE2Disabl Di Di Di Di DE2 DE2 Write jam previous b while button if jam lt 0 jam al jam 1 a0 jam al displ a0 displ E2Set7S E2Set7S E2Disabl E2Disabl SDRAM SDRAM SDRAM 0x000003 jam SDRAM DE2SDRAMDriver amp SDRAM utton 0xD 235 0 al 10 ay a1 ay a0 egDigit 7 a1 egDigit 6 a0 e7Seg 5 E2Disabl E2Disabl E2Disabl D D Di DE2Disabl Di Di Di Di E2Disabl DE2 SDRA DE2Write DE2SDRAM jam M SDRAM SDRAM 0x000003 Driver
28. if i 2 DE2 LCD LINE line line hex2ascii sp sp S E TG sp LG I GOAN sp sp sp sp P K R O Q TG A sp G I blank_line lt 152 DE2LCDDriver line T Q IANAGA lat 1 73333333 lon 103 88333333 else if i 3 DE2 LCD LINE line line hex2ascii sp sp S Q EQ T sp T I O N sp sp sp sp sp sp M E I AN G blank_line lt 152 DE2LCDDriver line D D E lat 2 41666667 lon 103 83333333 else if i 4 DE2 LCD LINE line line hex2ascii sp sp S 6 C A TG I GO NG sp sp sp sp sp UG A R blank line lt 152 DE2LCDDriver line El ET sp LG sp sp sp D lat 2 05000000 lon 102 56666667 else if i 5 DE2_LCD_LINE line line hex2ascii sp sp S T I O G 0 N sp sp sp sp sp ET I A NG blank_line lt 152 DE2LCDDriver line E ET sp LG sp sp P O D lat 1 48333333 lon 103 38333333 else DE2 LCD LINE line line hex2ascii sp sp S I 0 0 N sp sp sp sp sp T blank_line lt 152 DE2LCDDriver line o H Q c D H n v c D Me T M A e lat 2 50000000 lon 102 83333333 go to calculation DE2_SDRAM SDRAM DE2WriteSDRAM 0x00000B lat SDRAM memory lt lat DE2WriteSDRAM 0x00000C lon SDRAM memory lt lon DE2SDRAMDriver amp SDRAM 63 return
29. ion and will blind the human right or illegal A familiar of the organization in Malaysia is Jabatan Kemajuan Islam Malaysia JAKIM Any things who want to build dependent on religion Islam mostly need to use their procedure Return back to the Prayer Time device it is need to use JAKIM guide if it want to market widely It is because to valid that time for prayer especially during Ramadhan also known as fasting month for sure to eat after fasting a whole day For this situation we used JAKIM as our reference prayer time Unfortunately this end product is not accurately like JAKIM s prayer time It is rounded about more or less 2 minutes for Subuh Maghrib and Isyak although used twilight angle are 20 and 18 for Subuh and Isyak respectively CHAPTER 6 CONCLUSION AND FURTHER WORK 6 1 Conclusion This project offers simple and efficient way to find the Prayer Time based on knowing the location of that area The portable and automated design make it as a device that be used in any places bulky and some needs Internet connection to get this service The user friendly interface and simple instruction will help people in getting fast result in any places at any time without having using other resources It is also using the same calculation method with Jabatan Kemajuan Islam Malaysia JAKIM where as 20 and 18 twilight angle for Subuh and Isyak respectively Unfortunately this Prayer Time Device uses only 9V DC Wall mount power
30. it easy to use again 10 11 12 REFERENCES Rais Ayop Analisa waktu solat global Bachelor Degree in Science Land Administration amp Development Universiti Teknologi Malaysia 1998 Nurunnuha Md Hatta Panduan waktu solat interaktif Bachelor Degree in Computer Science Universiti Teknologi Malaysia 2001 Nuradzi Ahmad Pembangunan perisian perhitungan waktu solat mudah pengguna Bachelor Degree in Science Land Administration amp Development Universiti Teknologi Malaysia 1997 Mohd Azharis Md Suhrie Rekabentuk sistem jam waktu solatl Bachelor Degree in Engineering Geomatic Universiti Teknologi Malaysia 2002 Zamri Seman Waktu solat interaktif Bachelor Degree in Engineering Geomatic Universiti Teknologi Malaysia 2004 Mohd Izwan Bin Ismail Chess Clock in Hardware Description Language Bachelor Degree in Electronic Engineering Universiti Teknologi Malaysia 2007 Zulfakar Aspar Digital IC Design using Altera FPGA 1 Edition Malaysia Pearson Prentice Hall 2007 Mohamed Khalil Hani Digital Systems VHDL amp Verilog Design 2 Edition Malaysia Pearson Prentice Hall July 2009 Nasly Mohamed Ali and Haniisah Abu Azam Structured Programming Using C in simple steps with Engineering Applications 1 Edition Malaysia Desktop Publisher 2010 Norazah Yusof Programming Technigue II 24 Edition Malysia Desktop Publisher 2009 Mariani Abu Bakar Pengaturcaraan C 1 Edition Malaysia Prentice Hall
31. ke it suitable for and a variety of design projects as well as for the development of sophisticated digital systems The DE2 board features a state of the art Cyclone II 2C35 FPGA in a 672 pin package All important components on the board are connected to pins of this chip following the user to control all aspects of the board s operation The DE2 board includes a sufficient number of robust switches of both toggle and push button type LEDs and 7 segment displays For more advanced experiments there are SRAM SDRAM and Flash memory chips as well as a 16 x 2 character display Enemet Pot Pot M h Pon SV DC Power 27 MHz Oscilator 24 08 Audio Codec Power ONOFF Switch T dp PSN Keyboard Mouse Port VGA TOBE DAC Ethernet 101004 Controller USB Host Slave Controber TV Decoder NTSCPAL Expansion Header 2 JP2 Altera USB Blaster Controller Chipset Altera EPCS16 Configuration Device Expansion Header 1 UP1 Altera Cyclone I FPGA RUNPROG Switch for JTAG AS Modes t x LCD Module SD Card Sot 8 48 SORAM 512 KB SRAM 4 08 Flash Memory Figure 3 2 The DE2 board 17 Software provided with the DE2 board features the Quartus II Web Edition CAD system and the Nios II Embedded Processor Also included are several aids to help userd with features of the board such as tutorials and example applications Traditionally manufacturers of educational FPGA boards have provided a variety of hardware fe
32. my parents for their concerns and prayer in accomplishing this project I am grateful that I have received help and support from friends My special thanks to Mr Jeffri Bin Ismail and Mr Khomarudden Bin Mohd Khair Juhari who are technicians for given me using any eguipment inside ECAD laboratory for this project It is my greatest thanks and joy that I have met with these people Thank you vii ABSTRACT It is an obligation on Muslims to perform the obligatory prayers whenever they are at specific times of the day The prerequisite of prayers knows the time for that prayer times Traditionally this has been based on position of the sun and stars at night However the science and mathematics of astronomy have advanced in part due to above requirements Precise algorithms based on geographical position latitude and longitude are established to determined the exact prayer times This project utilities these algorithms and implement it on a Field Programmable Gates Array FPGA based system The FPGA is using C programming code to determine the prayer time This is an alternative to keying in geographical position to determine the prayers times viii ABSTRAK Tanggungjawab seorang Muslim adalah untuk mengerjakan Ibadah Solat di mana sahaja mereka berada dan pada masa yang telah ditetapkan Untuk melakukan Ibadah Solat seorang itu perlu mengetahui waktu sembahyang tersebut Sebelum ini penetapan waktu sembahyang telah dibuat berdasarka
33. n kedudukan matahari dan bintang pada malam hari Bagaimanapun peningkatan dalam ilmu sains dan matematik telah membantu dalam menentukan kedua dua prasyarat tersebut Algoritma yang tepat berdasarkan kedudukan geografi latitud dan longitud telah dihasilkan untuk menentukan waktu solat Projek ini dilaksanakan menggunakan algoritma tersebut dan diimplimenkan menggunakan sistem Lapangan Aturcara Get Logik FPGA Lapangan Aturcara ini diintegrasikan menggunakan pengaturcaraan C untuk menentukan waktu solat Ini merupakan satu cara alternatif untuk menggunakan kedudukan geografi dalam menentukan waktu solat CHAPTER TABLE OF CONTENTS TITLE DECLARATION DEDICATION ACKNOWLEDGEMENT ABSTRACT ABSTRAK TABLE OF CONTENTS LIST OF TABLES LIST OF FIGURES LIST OF ABBREVIATIONS INTRODUCTION 1 1 Times of Solat 1 2 Problems Statement 1 3 Objectives 1 4 Work Scope BASIC CONCEPT AND THEORY 2 1 Introduction 2 2 Definition of prayer times 2 3 Calculation of Solat Times 2 4 Related work ix PAGE iv vi vii viii ix xi xii xiii DN N N 12 REFERENCES APPENDIXES DESIGN AND DEVELOPMENT 3 1 3 2 3 3 3 4 Introduction Main Process Hardware Development process Software Development process SOFTWARE DESIGN AND DEVELOPMENT 4 1 4 2 4 3 4 4 4 5 Introduction Embedded C programming Assembly Language Software Development environment 4 4 1 Altera Quartus II environment 4 4 2 Altera Nios
34. n seven segments in DE2 board One of 16 LEDs will blink as second indicator If the time and the prayer time are egual 16 LEDs blinking in 60 seconds together After that the next prayer time will exhibit like Subuh Zohor Asar Maghrib and Isyak respectively Continuously direct operation until it is the energy unplugs LOCATION N yes TIME amp PRAYER TIME Figure 4 4 Prayer Time flow chart 31 CHAPTER 5 RESULT AND DISCUSSION 5 1 Introduction This chapter discusses on the device working the device seeing the prayer times fits the date location and time For the device it mainly discussed the component in DE2 board are used In the operation of the device it discusses how to know that the device begins In seeing the prayer time it will discuss how the time of the prayer can be recognized According to adjustment the date time and location it is demonstrations like user manual 5 2 The Device The device in Figure 5 1 shows the DE2 board where use LCD red LEDs seven segments and push button are The LCD will display the prayer time which are 33 Subuh Zohor Asar Maghrib and Isyak The seven segments will display number for year month day hour minute time and prayer time Furthermore all sixteen red LEDs are used to indicate the time for pray Besides that all four push buttons are used as input which are Mode Select Back and Next The figure below shows the specification was discussed abo
35. ns If users press Back the seven segments will count down until the user stop to press it For press Next the seven segments will count up until the user stop to press it too 38 After the hour was set user needs to press Select at push button again to display at Figure 5 8 for set the day The procedures are same like before where user need to press Back or Next at push buttons If users press Back the seven segments will count down until the user stop to press it For press Next the seven segments will count up until the user stop to press it too 5 7 Fits the Location In this prayer time locations are important too like time This is because without location prayer time is nothing use because it is also depending on location too For this project there are seven locations are programmed to DE2 board which are Batu Pahat Johore Bahru Kota Tinggi Mersing Muar Pontian and Segamat For the default location is Batu Pahat If users press Back the location displayed will reverse alphabet respectively until the user stop to press it For press Next the location displayed will forward alphabet respectively until the user stop to press it too The Figure was discussed above will displayed below as reference Figure 5 9 Location displayed 39 40 5 8 Discussion In Malaysia most of the Malaysians are Muslim That why some of the organization exists to guide and protecting human right from some human want to divers
36. ort Souce level debugger FS2 Probe Hardware Nios 2 OCI Figure 4 2 Nios Hardware and Software interface 28 The CLI can be used as both a user interface and as a means of automating sequences of tasks It is based on TCL TK a widely used command language and GUI builder A number of command primitives and Tcl procedures have been added to customize Tcl for this application Commands are included for system configuration emulation control memory access including an assembler and disassembler register access trace and trigger access file download and status indication The probe uses a 10 position flat ribbon cable with standard 0 100 square post headers A connector with an orientation key such as 3M 2510 6002UB is recommended The pinout of the target connector is described in the Table 4 1 below Table 4 1 Pinout of the target connector TCK 1 2 GND TDD 3 4 VCC TMS 5 6 VIO Debugack 7 8 Debugreq TDI 19 10 GND Pin Signal YO Active Comments 2 10 GND Signal reference 4 VCC N Power source for debugger Not used by System Navigator 6 VIO 4 Used by debugger to determine target power on state 1 TCK O H JTAG test clock 3 TDO H JTAG test data output 5 TMS e H JTAG test mode select 9 TDI e H JTAG test data input 7 Debugack H Optional signal indicating CPU is in debug mode 8 Debugreg O H Debug interrupt reguest optional
37. p E S I AN G blank_line lt 152 DE2LCDDriver line e u Lo cy lat 2 41666667 lon 103 83333333 else if i 4 DE2 LCD LINE line line hex2ascii sp sp S O C A T I GO N sp sp sp sp sp M UG AG R blank line lt 152 DE2LCDDriver line Ed ET sp LG sp sp sp D lat 2 05000000 lon 102 56666667 else if i 5 DE2 LCD LINE line line hex2ascii sp sp S 6 T 1 O N sp sp sp sp sp N T T A EN blank_line lt 152 DE2LCDDriver line El ET sp LG sp sp P O D lat 1 48333333 lon 103 38333333 else DE2 LCD LINE line line hex2ascii sp sp AS Q EQ T sp 6 e I O NG sp sp sp sp sp sp es E T blank_line lt 152 DE2LCDDriver line T QAGMGAG lat 2 50000000 lon 102 83333333 i previous button while button 0xD if i O i 6 if i 0 DE2_LCD_LINE line line hex2ascii sp spa S Q EG T As O C A TG I O N sp sp sp sp Asp BE A T EU sp P A HG AG T blank_line lt 152 DE2LCDDriver line lat 1 83333333 lon 102 93333333 else if i 1 DE2 LCD LINE line H 62 line hex2ascii sp sp SQ EG T sp CEARLTREIROCERENEspespksp sp QO J ADA H AOA sp BGAQG HG RGU blank line lt 152 DE2LCDDriver line 59 sp co O lat 1 46666667 lon 103 76666667 else
38. supply makes it hard to use at any places without socket plug In another weakness of this device is date time andcurrent location have to be inserted manually by user every time to operate the system The recommendation part will discuss on how to improve the weakness and ways to make the device better 42 6 2 Further Work The project develop is functioning well with no error However the development of Prayer Time device can be improved to a more advanced and better application in further For further improvement several suggestions are proposed e Automatic Input By using the Global Positioning System GPS date time and location can be set automatically by connecting GPS with the DB 9 serial connector and interface with RS 232 to the DE2 board e Better Hardware used The device can be use smaller than DE2 board or build on their own but it is still using this concept In another way this project will build in with battery for easy used It will smaller pocket size and easier to bring the device anywhere e Addfunction This device can be multipurpose device not only determining the Prayer Time but also can show Hijrah Calendar It can also be a table watch with alarm function and so forth e Use memory to store data This device will need to insert date time and location for the first time used where all the first data will stored in temporary Read Only Memory ROM although the device doesn t have power to make
39. th than assembly language In this project verilog was used like assembly language 24 4 4 Software Development environment For this project there is development with two aspects that are development of hardware and software For the hardware development Ouartus of Altera s software is used with verilog language to declare the hardware By the way software development cannot the same software because it does not have equal like the hardware Nios also as Altera s software used for develops the software development that is using programming C code programming language 4 4 1 Altera Quartus II environment For Quartus environment Computer Aided Design CAD software makes it easy to implement a desired logic circuit by using a programmable logic device such as a field programmable gate array FPGA chip A typical FPGA CAD flow is illustrated in Figure 4 1 25 Design Entry Functional Simulation Design correct Yes Timing Analysis and Simulation Timing requirement met Yes Programming and Configuration Figure 4 1 Typical CAD flow chart It involves the following basic steps e Design Entry The desired circuit is specified either by using a hardware description language such as Verilog or VHDL or by means of a schematic diagram 26 Synthesis The CAD Synthesis tool synthesizes the circuit into a netlist that gives the logic elements LEs needed to realize the circuit and the connections between
40. the LEs Functional Simulation The synthesized circuit is tested to verify its functional correctness the simulation does not take into account any timing issues Fitting The CAD Fitter tool determines the placement of the LEs defined in the netlist into the LEs in an actual FPGA chip it also chooses routing wires in the chip to make the required connections between specific LEs Timing Analysis Propagation delays along the various paths in the fitted circuit are analyzed to provide an indication of the expected performance of the circuit Timing Simulation The fitted circuit is tested to verify both its functional correctness and timing Programming and Configuration The designed circuit is implemented in a physical FPGA chip by programming the configuration switches that configure the LEs and establish the reguired wiring connections 27 4 4 2 Altera Nios II environment For Nios environment have the System Navigator product which is supports JTAG based debugging of the Altera Nios II processor core By referring to the Figure 4 2 below the product consists of hardware and software The software consists of a host Application Binary Interface ABI Command Line Interface CLI optional source level debugger and the FS2 windows for supporting the product hardware features The hardware includes Nios II OCI On Chip Instrumentation and the FS2 System Navigator Family of probes FS2 GUI windows for hardware supp
41. the seven segments will count down until the user stop to press it For press Next the seven segments will count up until the user stop to press it too After the year was set user needs to press Select at push button to display at Figure 5 5 for set the month The procedures are same like before where user need to press Back or Next at push buttons If users press Back the seven segments will count down until the user stop to press it For press Next the seven segments will count up until the user stop to press it too After the month was set user needs to press Select at push button again to display at Figure 5 6 for set the day The procedures are same like before where user 37 need to press Back or Next at push buttons If users press Back the seven segments will count down until the user stop to press it For press Next the seven segments will count up until the user stop to press it too 5 6 Fits the Time Time is very important to in all devices are depending on clock In this case clock is needs to determine that time for prayer was past or not Without time this Prayer Time will not running properly as programmed For adjusting the time the figure below will display as user manual for that Figure 5 7 Setting hour Figure 5 8 Setting minute After Figure 5 7 displayed this mean it is time to set the time for hour The procedures are same like before where user need to press Back or Next at push butto
42. to main if button 0xB return void calc void float B L R 120 H 380 D T G 218 2 U V W JD I J K M N RA float sub syu zho asr mag isy int int int subl syul zhol asrl magl isyl sub2 syu2 zho2 asr2 mag2 isy2j a b c e f year mon day button IORD ALTERA AVALON PIO DATA BUTTON PIO BASE declare month and day DE2 SDRAM SDRAM DE2ReadSDRAM 0x00000B B SDRAM lat lt memory DF2ReadSDRAM 0x00000C L SDRAM lon lt memory DE2ReadSDRAM 0x000000 year SDRAM year lt memory DE2ReadSDRAM 0x000001 mon SDRAM mon lt memory DE2ReadSDRAM 0x000002 day SDRAM day lt memory DE2SDRAMDriver amp SDRAM calculation for Julian date H Q ov JD year 100 a 4 2 a b 365 25 year 4716 30 6001 mon 1 c day e f 1524 5 calculation for T and D L Julian date A A J Z ZZ CL Sun D 12 JD 2451545 0 jd is the given 357 529 0 98560028 I 280 459 0 98564736 I K 1 915 sin J d2r 0 020 sin 2 J d2r N r2d 23 439 0 00000036 I cos N d2r 15 RA r2d asin sin M d2r sin N d2r declination of the D r2d K 15 RA equation of time calculation for prayer time Z 12 R L 15 T 60 4 25 U acos sin 0 8333 d2r 0 0347 d2r pow H 0 5 sin D d2r sin B d2r cos D d2r cos B d2r r2d 15 V acos sin G d2r sin D d2r sin B d2r cos D d2r cos B d2r r2d 15 W acos sin
43. tude and longitude measurements Malaysia has tropical weather influenced by monsoonal climate because of its latitude and longitude Tropical climate here gives hot summer that is accompanied with high humidity level But the weather in general in Malaysia is without extremities Monsoon comes twice a year During the summer season and the other during winter Summer monsoon brings lots of downpour in Malaysia Winter monsoon does not cause that much rain and is generally dry Air Hitam Alor Setar Ampang Aur Pulau Babi Besar Pulau Bacuk Bagan Datoh Bagan Serai Baling Bandar Maharani Muar Bandar Penggaram Batu Pahat Bandar Sri Aman Banggi Batu Caves Batu Gajah Batu Pahat Bau Beaufort Bekok Beluran Bentung Betung Bidor Binatang Bintangor Bintangoe Bintulu Figure 2 4 Malaysia latitude and longitude 01 55 N 06 07 N 03 08 N 02 35 N 02 25 N 06 04 N 03 59 N 05 01T N 05 41N 02 03 N 01 50 N 01 15 N 07 17N 03 15 N 04 28 N 01 50 N 01 25 N 05 30 N 02 20 N 49 50 N 03 3T N 01 24 N 04 06 N 02 10 N 02 10 N 03 10 N 103 11E 100 22 E 101 45 E 104 10 E 103 59 E 102 25 E 100 47E 100 32 E 100 55 E 102 34 E 102 56 E 111 32 E FAZE 101 40 E 101 03 E 102 56 E 110 09 E 115 40 E 103 07E 86 50 E 101 55E 111 3TE 101 15 E 111 40 E 111 40 E 113 00 E 13 CHAPTER 3 DESIGN AND DEVELOPMENT 3 1 Introduction This chapter discusses the main process hardware development
44. ur Zuhur Asar Shafi and Hanafi and Maghrib times may be calculated unambiguously But Subuh and Isyak times depend on twilight and required the adoption of a suitable twilight angle Generally a twilight angle of 18 degrees may represent a safe upper limit although opinions and practices vary In locations at higher latitude twilight may persist throughout the night during some months of the year Table 2 1 Twilight angle of different Organization Subuh Isyak Organization Twilight Twilight Region angle angle Pakistan Bangladesh University of Islamic 18 18 India Afghanistan parts Sciences Karachi of Europe Islamic Society of North is i Parts of USA amp Canada America ISNA parts of UK Europe Far East parts World Islamic League 18 17 of USA 90 mins after Maghrib 120 Um Ul Oura Makkah 19 Arabian Peninsula mins during Ramadhan Egyptian General Africa Syria Iraq Organisation of 19 5 17 5 Lebanon Malaysia Surveying parts of USA 12 2 4 Related work Malaysia in the south east part of Asia has a geographic coordinate that reads 2 30 North latitude and 112 30 East longitude Kuala Lumpur which is the capital of Malaysia is located in between 3 10 North latitude and 101 42 East longitude As a result of its latitude and longitude Malaysia stays ahead by eight hours from the Greenwich Mean Time Malaysia has several types of landscapes for its certain lati
45. uter Signature Leuven itr HE ia Supervisor Dr Muhammad Nadzir Bin Marsono Date April 2010 iii PRAYER TIME BY USING ALTERA DE2 BOARD NORAZMAN BIN HUSSIN Submitted to the Faculty of Electrical Engineering in partial fulfilment of the requirement for the degree of Bachelor Degree of Engineering Computer Faculty of Electrical Engineering Universiti Teknologi Malaysia APRIL 2010 I declare that this thesis entitled Prayer Time by using Altera DE2 board is the result of my own research except as cited in the references The thesis has not been accepted for any degree and is not concurrently submitted in candidature of any other degree Signature Name of Author Norazman Bin Hussin Date April 2010 Specially dedicated to my beloved mother father brothers and sister who have encouraged guided and inspired me throughout my journey of education vi ACKNOWLEDGEMENT I would like to take this opportunity to express my deepest gratitude to my supervisor Dr Muhammad Nadzir Bin Marsono who has persistently assisted me in completing this project He has given me support and insight in doing this project and has patiently listed and guided I would also like to express my special thanks to Dr Shaikh Nasir Bin Shaikh Husin who was supervised me for Final Year Project 1 to overcome problems during the course of the project A Special appreciation I gave to my beloved family especially
46. ve Select Figure 5 1 I O configuration on DE2 board 5 3 Working The Device The device has been develop need to know either it will operation successful or not For this Prayer Time it will display PRAYER TIME at the first row and the second row will display By AZMAN which is mean the device is begin the 34 operation After that it will display seven segments as time and prayer time and also one of sixteen LEDs where it is at left hand side from user Figure 5 2 Begin operation 5 4 Seeing the Prayer Times After all of the requirements are inserted this device will display prayer times which are Subuh Syuruk Zohor Asar Maghrib and Isyak respectively It will display one prayer time in one time only For this case if the time is same with prayer time all red LEDs will blink in one minute If the prayer time was past it will display the next prayer time 35 Figure 5 3 Prayer Time displayed 5 5 Fits the Date This device is depending on date where it will calculate automatically if date was inserted The calculation will match with equation of time and declination angle 36 where it is also depending on earth moving For adjusting the date the figure below will display as user manual for that Figure 5 4 Setting year Figure 5 5 Setting month Figure 5 6 Setting day After Figure 5 4 displayed user need to press Back or Next at push buttons If users press Back
Download Pdf Manuals
Related Search
Related Contents
ODYS DPF- Shine MANUAL DEL USUARIO Bevor Sie beginnen Manual: CAN plugin card ISA/XT, active Qbit-DB Software User Manual IG5A series starvert Benutzerhandbuch HD Festplatten-Recorder 8-pg Manifold Instructions Copyright © All rights reserved.
Failed to retrieve file