1 / 12

Supervised by : Borovitskyi V . N . Kondratenko D . U .

Supervised by : Borovitskyi V . N . Kondratenko D . U. Project by : Galushkina E . O . Sleptsova E . G . Kucherenko I . V. NATIONAL TECHNICAL UNIVERSITY OF UKRAINE “KPI” INSTRUMENT MAKING FACULTY OPTICAL AND OPTOELECTRONIC DEVICES DEPARTMENT. Multitone alarm ”LIK”. 2008.

yoshi
Télécharger la présentation

Supervised by : Borovitskyi V . N . Kondratenko D . U .

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Supervised by: BorovitskyiV.N. KondratenkoD.U. Project by: Galushkina E.O. SleptsovaE.G. KucherenkoI.V. NATIONAL TECHNICAL UNIVERSITY OF UKRAINE “KPI”INSTRUMENT MAKING FACULTY OPTICAL AND OPTOELECTRONIC DEVICES DEPARTMENT Multitone alarm ”LIK” 2008

  2. Short description • This device functions as a multitone alarm. It may be used as a door bell or as a signal for a burglar alarm. • Algorithm of the device is the following: when power is supplied the device plays several tunes one after another. This is managed by means of software.

  3. Circuit diagram

  4. Software • .include "d:\avr\avrasm\appnotes\2313def.inc" • .def Temp1=R16 • .def Temp2=R17 • .def Temp3=R18 • .def Temp4=R19 • .def Temp=R20 • .dseg • CountRate: .byte 1 • MelAddL: .byte 1 • MelAddH: .byte 1 • ;****************************************************************************** • .macro stsi ;save_immediate <SRAM_cell>,<k> • ldi Temp,@1 • sts @0,Temp • .endmacro • .macro rdm • ldi ZH,High(@0*2) • ldi ZL,Low(@0*2) • add ZL,XL • adc ZH,XH • lpm • mov Temp3,r0 • .endmacro • ;****************************************************************************** • .cseg • .org 0 • rjmp RESET ; Reset Handler • rjmp EXT_INT0 ; IRQ0 Handler • rjmp EXT_INT1 ; IRQ1 Handler • rjmp TIM_CAPT1 ; Timer1 Capture Handler • rjmp TIM_COMP1 ; Timer1 Compare Handler • rjmp TIM_OVF1 ; Timer1 Overflow Handler • rjmp TIM_OVF0 ; Timer0 Overflow Handler • rjmp UART_RXC ; UART RX Complete Handler • rjmp UART_DRE ; UDR Empty Handler • rjmp UART_TXC ; UART TX Complete Handler • rjmp ANA_COMP ; Analog Comparator Handler • EXT_INT0 : ret • EXT_INT1 : ret

  5. Software • TIM_CAPT1 : ret • TIM_OVF0 : ret • TIM_OVF1 : ret • UART_RXC : ret • UART_DRE : ret • UART_TXC : ret • ANA_COMP : ret • TIM_COMP1 : ret • reset: ldi Temp1,RamEnd ;set stack • out SPL,Temp1 • cli • inc Temp3 • ldi temp1,0xff ;port init • out ddrb,temp1 • ldi temp1,0b00000001 • out portb,Temp1 • ;timers init • ldi temp1,0b01000000 ;OC1 toggle at compare • out tccr1a,temp1 • ldi temp1,0b00001011 • out tccr1b,temp1 ;clear on compare, clk=C/64 • ldi Temp1,1 • sts CountRate,Temp1 • ;********************************************************************************************** • ;Partiture reader • ;input: • ;output: Temp3 - code of current note • Partiture: ldi XL,0 • ldi XH,0 • ldi Temp1,0 • ldi Temp2,0 • Play: • rdm HymnUSSR • cpi Temp3,0xff ;comparing with "end" flag • breq Partiture • sts MelAddL,XL • sts MelAddH,XH

  6. Our creation….

  7. This is how it looks like…..

  8. Our programming device 

  9. “Our power”

  10. Tired………

  11. Happy end!

  12. Thank you for your attention! Contact us: • National Technical University of Ukraine “KPI”Optical and optoelectronic devices departmentKyiv 03056, prospektPeremogy 37 http://ooep.ntu-kpi.kiev.ua/ Project developed within the limits of subject “Microprocessors and computers” http://ooep.ntu-kpi.kiev.ua/microcontrollers/

More Related