FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    AT89S51 microcontroller 00-59 seconds timer design

     

    1. As shown in the figure below, the P0 and P2 ports of the AT89S51 single chip microcomputer include two common-causal digital tubes, and the P0-port drives the ten digits of the second time, while the P2 port is driven to display the second time. 2. Circuit Schematic Figure 4.11.1 3. System board hardware connection (1. Connect the P0.0 / AD0-P0.7 / AD7 port in the "MCU system" area to any of the AH ports in the "four-way static digital display module" area; requirements: P0 .0 / AD0 corresponds to B, ..., P0.7 / AD7 corresponding to H, P0.1 / AD1. (2. Connect the P2.0 / A8-P2.7 / A15 port in the "MCU system" area to any of the AH ports in the "four-way static digital display module" area; requirements: P2 .0 / A8 corresponds to a, p2.1 / a9 corresponding to B, ..., P2.7 / A15 corresponding to H. 4. Program design content (1. In the design process, we use a storage unit as a second count unit. When a second, let the second count unit add 1, when the second count reaches 60, automatically returns to 0, from the new second count. (2. For data in the second counting unit, it is to separate its ten digits and numbers, and the method still uses the pair of 10 removal and 10 surplus. (3. Display on digital code is still completed by checking the table. (4. Generation of one second here we use software exact delayed methods to complete, after exactly calculation for 1 second for 1.002 seconds. DELY1S: MOV R5, # 100 D2: MOV R6, # 20 D1: MOV R7, # 248 DJNZ R7, $ Djnz R6, D1 DJNZ R5, D2 RET 5. Program block diagram Figure 4.11.2 6. Compilation Source Procedure SECOND EQU 30H ORG 0 START: MOV Second, # 00H Next: MOV A, SECOND Mov b, # 10 Div AB Mov dptr, # TABLE MOVC A, @ a + dptr MOV P0, A Mov A, B MOVC A, @ a + dptr MOV P2, A LCALL DELY1S Inc Second Mov A, SECOND CJNE A, # 60, Next LJMP START DELY1S: MOV R5, # 100 D2: MOV R6, # 20 D1: MOV R7, # 248 DJNZ R7, $ Djnz R6, D1 DJNZ R5, D2 RET Table: DB 3FH, 06H, 5BH, 4FH, 66H, 6DH, 7DH, 07H, 7FH, 6FH End 7. C language source program #include Unsigned char code Table [] = {0x3f, 0x06, 0x5b, 0x4f, 0x66, 0x6d, 0x7d, 0x07, 0x7f, 0x6f}; Unsigned char second; Void delay1s (void) { Unsigned Char i, J, K; For (k = 100; k "0; k -) For (i = 20; i "0; I -) For (j = 248; j "0; j -); } Void main (void) { SECOND = 0; P0 = Table [Second / 10]; P2 = Table [second% 10]; While (1) { Delay1s (); SECOND ++; IF (Second == 60) { SECOND = 0; } P0 = Table [Second / 10]; P2 = Table [second% 10]; } }, 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