FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    Single chip microcomputer "doorbell, AT89S51 Doorbell

     

    Single chip microcomputer "doorbell, AT89S51 Doorbell Keywords: AT89S51, Doorbell Circuit 1. Experimental task When the switch SP1 is pressed, the AT89S51 microcontroller generates "咚" sound from the P1.0 port to the LM386, which is sent to the speaker after enlargement. 2. Circuit schematic 3. System board hardware connection (1. Connect the P1.0 port in the "Microcontroller System" area to the SPK in port in the Audio Amplifier module area; (2. Connect a speaker of 8 euros or 16 o'clock on the SPK OUT port in the "Audio Mode Module" area; (3. Connect the P3.7 / RD port in the "Microcontroller System" area to the SP1 port in the Styard Keyboard area; 4. Programming method (1. We use the microcontroller's fixed time / counter T0 to generate frequencies of 700 Hz and 500 Hz. According to the timing / counter T0, we can get 250Us, so the frequency of 700 Hz should pass through 3 times 250us timing, and the frequency of 500 Hz is 4 Timed 250us. (2. In the design process, only after the SP1 is pressed, the T0 will start working, when T0 is completed, return to the initial state. (3. "" and "咚" sound each takes 0.5 seconds, so timing / counter T0 is required to complete 0.5 seconds, and can be 250Us. 6. Assembly source T5HZEQU 30H T7HZEQU 31H T05SAEQU 32H T05SBEQU 33H Flagbit 00h STOPBIT 01H SP1bit P3.7 ORG 00H LJMP START ORG 0BH LJMP INT_T0 Start: Mov TMOD, # 02H MOV TH0, # 06H MOV TL0, # 06h Setb ET0 Setb EA NSP: JB SP1, NSP LCALL DELY10MS JB SP1, NSP Setb TR0 Mov T5Hz, # 00H Mov t7hz, # 00H Mov t05sa, # 00H Mov t05sb, # 00H CLR Flag CLR Stop JNB STOP, $ LJMP NSP DELY10MS: MOV R6, # 20 D1: MOV R7, # 248 DJNZ R7, $ Djnz R6, D1 RET INT_T0: INC T05SA Mov A, T05SA CJNE A, # 100, Next Mov t05sa, # 00H INC T05SB MOV A, T05SB CJNE A, # 20, Next Mov t05sb, # 00H JB Flag, STP CPL Flag Ljmp next STP: SETB STOP CLR TR0 LJMP DONE Next: JB Flag, S5Hz INC T7Hz Mov A, T7Hz CJNE A, # 03H, DONE Mov t7hz, # 00H CPL P1.0 LJMP DONE S5Hz: Inc T5Hz Mov A, T5Hz CJNE A, # 04H, DONE Mov T5Hz, # 00H CPL P1.0 LJMP DONE DONE: RETI End 7. C language source program #include UNSIGNED Char T5Hz; UNSIGNED CHAR T7Hz; Unsigned int TCNT; Bit STOP; Bit flag; Void main (void) { Unsigned char i, j; TMOD = 0x02; TH0 = 0x06; TL0 = 0x06; ET0 = 1; EA = 1; While (1) { IF (p3_7 == 0) { For (i = 10; I>0; i -) For (J = 248; J>0; J -); IF (p3_7 == 0) { T5Hz = 0; T7Hz = 0; TCNT = 0; FLAG = 0; STOP = 0; Tr0 = 1; WHILE (stop == 0); } } } } Void T0 (Void) Interrupt 1 Using 0 { TCNT ++; IF (TCNT == 2000) { TCNT = 0; IF (Flag == 0) { FLAG = ~ flag; } Else { STOP = 1; Tr0 = 0; } } IF (Flag == 0) { T7Hz ++; IF (t7hz == 3) { T7Hz = 0; P1_0 = ~ p1_0; } } Else { T5Hz ++; IF (T5Hz == 4) { T5Hz = 0; P1_0 = ~ p1_0; } } }, Read the full text

     

     

     

     

    List all Question

    Nickname

    Email

    Questions

    Our other product:

    Professional FM Radio Station Equipment Package

     



     

    Hotel IPTV Solution

     


      Enter email  to get a surprise

      fmuser.org

      es.fmuser.org
      it.fmuser.org
      fr.fmuser.org
      de.fmuser.org
      af.fmuser.org ->Afrikaans
      sq.fmuser.org ->Albanian
      ar.fmuser.org ->Arabic
      hy.fmuser.org ->Armenian
      az.fmuser.org ->Azerbaijani
      eu.fmuser.org ->Basque
      be.fmuser.org ->Belarusian
      bg.fmuser.org ->Bulgarian
      ca.fmuser.org ->Catalan
      zh-CN.fmuser.org ->Chinese (Simplified)
      zh-TW.fmuser.org ->Chinese (Traditional)
      hr.fmuser.org ->Croatian
      cs.fmuser.org ->Czech
      da.fmuser.org ->Danish
      nl.fmuser.org ->Dutch
      et.fmuser.org ->Estonian
      tl.fmuser.org ->Filipino
      fi.fmuser.org ->Finnish
      fr.fmuser.org ->French
      gl.fmuser.org ->Galician
      ka.fmuser.org ->Georgian
      de.fmuser.org ->German
      el.fmuser.org ->Greek
      ht.fmuser.org ->Haitian Creole
      iw.fmuser.org ->Hebrew
      hi.fmuser.org ->Hindi
      hu.fmuser.org ->Hungarian
      is.fmuser.org ->Icelandic
      id.fmuser.org ->Indonesian
      ga.fmuser.org ->Irish
      it.fmuser.org ->Italian
      ja.fmuser.org ->Japanese
      ko.fmuser.org ->Korean
      lv.fmuser.org ->Latvian
      lt.fmuser.org ->Lithuanian
      mk.fmuser.org ->Macedonian
      ms.fmuser.org ->Malay
      mt.fmuser.org ->Maltese
      no.fmuser.org ->Norwegian
      fa.fmuser.org ->Persian
      pl.fmuser.org ->Polish
      pt.fmuser.org ->Portuguese
      ro.fmuser.org ->Romanian
      ru.fmuser.org ->Russian
      sr.fmuser.org ->Serbian
      sk.fmuser.org ->Slovak
      sl.fmuser.org ->Slovenian
      es.fmuser.org ->Spanish
      sw.fmuser.org ->Swahili
      sv.fmuser.org ->Swedish
      th.fmuser.org ->Thai
      tr.fmuser.org ->Turkish
      uk.fmuser.org ->Ukrainian
      ur.fmuser.org ->Urdu
      vi.fmuser.org ->Vietnamese
      cy.fmuser.org ->Welsh
      yi.fmuser.org ->Yiddish

       
  •  

    FMUSER Wirless Transmit Video And Audio More Easier !

  • Contact

    Address:
    No.305 Room HuiLan Building No.273 Huanpu Road Guangzhou China 510620

    E-mail:
    [email protected]

    Tel / WhatApps:
    +8618078869184

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

  • paypal solution  Western UnionBank OF China
    E-mail:[email protected]   WhatsApp:+8618078869184   Skype:sky198710021 Chat with me
    Copyright 2006-2020 Powered By www.fmuser.org

    Contact Us