FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8615915959450
Language

    51 MCU control stereo FM transmitter making BH1415F

    51 MCU control stereo FM transmitter making BH1415F

    Description: 1, control using MCS51, using the smallest application system design, the external circuit is very simple ! 16 button design , you can control 80.0 ~ 109.9MHz frequency range ;
    2,4 digit common anode LED display frequency ;
    Features: 1 , can be set independently one hundred , ten , a bit , the frequency of the decimal point ;
    2, the transmitting frequency presets ;
    3 , mono / stereo controls ; band stereo transmitter instructions ;
    -------------------------------------------------- -------------------------------------
    ; *************************** ;
    ; CNC FM controller ;
    ; *************************** ;
    ;
    ; 26H-29H decimal place display , a bit , ten , one hundred BCD code number , 24H-25H discharge frequency control data (hexadecimal )
    ;
    CONBITL EQU 21H; frequency control byte low 8
    CONBITH EQU 22H; frequency control byte high eight
    KEYWORD EQU 23H; When storing key value P1 port scanning
    ;
    ;
    ORG 0000H; program start address
    LJMP START; transfer START execution
    ORG 0003H;
    RETI; do not interrupt program
    ORG 000BH;
    RETI; do not interrupt program
    ORG 0013H;
    RETI; do not interrupt program
    ORG 001BH;
    RETI; do not interrupt program
    ORG 0023H;
    RETI; do not interrupt program
    ORG 002BH;
    RETI; do not interrupt program
    ;
    ; Initialization procedure
    CLEARMEN: MOV R0, # 20H; 20H-29H circulation cleared
    MOV R1, # 0AH;
    CLEARLOOP: MOV @ R0, # 00H;
    INC R0;
    DJNZ R1, CLEARLOOP;
    MOV P0, # 0FFH; four ports set
    MOV P1, # 0FFH;
    MOV P2, # 0FFH;
    MOV P3, # 0FFH;
    CLR P3.0; BH1415 prohibited actions
    CLR P3.1;
    CLR P3.2;
    LCALL KEYFUN15; home stereo transmission mode , open stereo transmitter indicator
    CLEAR1: MOV PCON, # 00H; control register is cleared
    MOV 29H, # 00H; set the initial value of 88MHZ ( shown as 088.0 )
    MOV 28H, # 08H;
    MOV 27H, # 08H;
    MOV 26H, # 00H;
    LCALL DISPUPDAT; writes BH1415 chip ( modified transmission frequencies )
    RET; subroutine returns
    ;
    ; Main
    START: LCALL CLEARMEN; power on initialization
    MAIN: LCALL KEYWORK; investigate key subroutine
    LCALL DISPLAY; LED display time
    AJMP MAIN; transfer MAIN cycle
    NOP; PC error handling
    NOP;
    AJMP START; re-initialize
    ;
    ; 4 * 4 matrix key scanning routine check
    KEYWORK: MOV P1, # 0FFH;
    CLR P1.0;
    MOV A, P1;
    ANL A, # 0F0H;
    CJNE A, # 0F0H, KEYCON;
    SETB P1.0;
    CLR P1.1;
    MOV A, P1;
    ANL A, # 0F0H;
    CJNE A, # 0F0H, KEYCON;
    SETB P1.1;
    CLR P1.2;
    MOV A, P1;
    ANL A, # 0F0H;
    CJNE A, # 0F0H, KEYCON;
    SETB P1.2;
    CLR P1.3;
    MOV A, P1;
    ANL A, # 0F0H;
    CJNE A, # 0F0H, KEYCON;
    SETB P1.3;
    RET;
    KEYCON: LCALL DL10MS; debounce processing
    MOV A, P1;
    ANL A, # 0F0H;
    CJNE A, # 0F0H, KEYCHE;
    KEYOUT: RET; interference, the subroutine returns
    KEYCHE: MOV A, P1;
    MOV KEYWORD, A;
    CJLOOP: LCALL DISPLAY;
    MOV A, P1;
    ANL A, # 0F0H;
    CJNE A, # 0F0H, CJLOOP;
    MOV R7, # 00H;
    MOV DPTR, # KEYTAB;
    CHEKEYLOOP: MOV A, R7;
    MOVC A, @ A + DPTR;
    XRL A, KEYWORD;
    JZ KEYOK; 0 ( equal ) turn KEYOK
    INC R7; range, plus a number of look-up table
    CJNE R7, # 10H, CHEKEYLOOP;
    RET;
    ;
    KEYOK: MOV A, R7;
    MOV B, A; B into
    RL A; left
    ADD A, B; adding ( key to deal with JMP 3 by 3 -byte instruction )
    MOV DPTR, # KEYFUNTAB;
    JMP @ A + DPTR;
    KEYFUNTAB: LJMP KEYFUN00;
    LJMP KEYFUN01;
    LJMP KEYFUN02;
    LJMP KEYFUN03
    LJMP KEYFUN04
    LJMP KEYFUN05
    LJMP KEYFUN06
    LJMP KEYFUN07
    LJMP KEYFUN08
    LJMP KEYFUN09
    LJMP KEYFUN10
    LJMP KEYFUN11
    LJMP KEYFUN12
    LJMP KEYFUN13
    LJMP KEYFUN14
    LJMP KEYFUN15; jump to the 15th key functionality of the program
    RET; bulk transfer error return
    ;
    ; The key number corresponding to the P1 port value table ( while pressing two keys are invalid operation )
    KEYTAB: DB 0EEH, 0DEH, 0BEH, 7EH, 0EDH, 0DDH, 0BDH, 7DH
    DB 0EBH, 0DBH, 0BBH, 7BH, 0E7H, 0D7H, 0B7H, 77H, 0FFH, 0FFH
    ;
    ; No. 0 key functionality of the program
    KEYFUN00: INC 29H;
    MOV A, 29H;
    CLR C;
    CJNE A, # 02H, FUN00;
    FUN00: JC FUN00OUT;
    MOV 29H, # 00H;
    FUN00OUT: MOV A, 29H;
    XRL A, # 01H;
    JNZ F00OUT1;
    MOV 28H, # 00H;
    AJMP F00OUT;
    F00OUT1: MOV 28H, # 08H;
    F00OUT: LCALL DISPUPDAT;
    RET; Returns
    ;
    ; The 1st key functionality of the program
    KEYFUN01: INC 28H;
    MOV A, 28H;
    CLR C;
    CJNE A, # 0AH, FUN01;
    FUN01: JC FUN01OUT;
    MOV 28H, # 00H;
    FUN01OUT: MOV A, 29H;
    XRL A, # 01H;
    JNZ F01OUT;
    MOV 28H, # 00H;
    AJMP F001OUT;
    F01OUT: MOV A, 28H;
    XRL A, # 08H;
    JZ F001OUT;
    MOV A, 28H;
    XRL A, # 09H;
    JZ F001OUT;
    MOV 28H, # 08H;
    F001OUT: LCALL DISPUPDAT;
    RET; Returns
    ;
    ; The 2nd key function program
    KEYFUN02: INC 27H; single digits plus 1
    MOV A, 27H;
    CLR C;
    CJNE A, # 0AH, FUN02; determine whether less than 10
    FUN02: JC FUN02OUT; less than 10 turns FUN02OUT
    MOV 27H, # 00H; greater than or equal to 10 is cleared to 0
    FUN02OUT: LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET;
    ;
    ; The 3rd key functionality of the program
    KEYFUN03: INC 26H; single digits plus 1
    MOV A, 26H;
    CLR C;
    CJNE A, # 0AH, FUN03; judgment is not less than 10
    FUN03: JC FUN03OUT; less than 10 turns FUN03OUT
    MOV 26H, # 00H; greater than or equal to 10 is cleared to 0
    FUN03OUT: LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET; Returns
    ;
    ; 04 key functional programs ( frequency preset keys )
    KEYFUN04: MOV 29H, # 01H; preset 109.0MHZ transmitting frequency
    MOV 28H, # 00H
    MOV 27H, # 09H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; 05 key functional programs ( frequency preset keys )
    KEYFUN05: MOV 29H, # 01H; preset 108.0MHZ transmitting frequency
    MOV 28H, # 00H
    MOV 27H, # 08H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; 06 key functional programs ( frequency preset keys )
    KEYFUN06: MOV 29H, # 01H; preset 105.0MHZ transmitting frequency
    MOV 28H, # 00H
    MOV 27H, # 05H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; The 7th key functionality of the program ( frequency preset keys )
    KEYFUN07: MOV 29H, # 01H; preset 100.0MHZ transmitting frequency
    MOV 28H, # 00H
    MOV 27H, # 00H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; 08 key functional programs ( frequency preset keys )
    KEYFUN08: MOV 29H, # 00H; preset transmission frequency 98.0MHZ
    MOV 28H, # 09H
    MOV 27H, # 08H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; 09 key functional programs ( frequency preset keys )
    KEYFUN09: MOV 29H, # 00H; preset transmission frequency 96.0MHZ
    MOV 28H, # 09H
    MOV 27H, # 06H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; The 10th key functionality of the program ( frequency preset keys )
    KEYFUN10: MOV 29H, # 00H; preset transmission frequency 94.0MHZ
    MOV 28H, # 09H
    MOV 27H, # 04H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; 11 key functional programs ( frequency preset keys )
    KEYFUN11: MOV 29H, # 00H; preset transmission frequency 92.0MHZ
    MOV 28H, # 09H
    MOV 27H, # 02H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; The 12th key functionality of the program ( frequency preset keys )
    KEYFUN12: MOV 29H, # 00H; preset transmission frequency 90.0MHZ
    MOV 28H, # 09H
    MOV 27H, # 00H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; The 13th key functionality of the program ( frequency preset keys )
    KEYFUN13: MOV 29H, # 00H; preset transmission frequency 88.0MHZ
    MOV 28H, # 08H
    MOV 27H, # 08H
    MOV 26H, # 00H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; The 14th key functionality of the program ( frequency preset keys ) ; preset transmission frequency 87.0MHZ
    KEYFUN14: MOV 29H, # 00H
    MOV 28H, # 08H
    MOV 27H, # 07H
    MOV 26H, # 08H
    LCALL DISPUPDAT; writing control chip ( modified transmission frequency )
    RET
    ;
    ; 15 key functional programs ( stereo / mono setting key )
    KEYFUN15: CPL 03H;
    JNB 03H, MONO;
    CLR P3.3;
    LCALL PUTBIT;
    RET; Returns
    MON SETB P3.3;
    LCALL PUTBIT;
    RET; Returns
    ;
    ; The BCD to hexadecimal , and five control code synthesis opcode, write control chip
    DISPUPDAT: LCALL BCDB;
    LCALL CONCOMMAND;
    LCALL PUTBIT; send control words to BH1415
    RET; Returns
    ;
    ; The BCD to hexadecimal program
    BCDB: MOV CONBITL, # 00H; control word to 0
    MOV CONBITH, # 00H; control word to 0
    MOV CONBITL, 26H; decimal places control word into the low 8
    MOV A, 27H; single digits by 10 operations
    MOV B, # 10;
    LCALL MULLOOP; tune multiplication subroutine
    MOV A, 28H; 100 ten-digit multiplication operation
    MOV B, # 100;
    LCALL MULLOOP; tune multiplication subroutine
    MOV A, 29H;
    JNZ ADD3E8; hundreds digit is a turn ADD3E8 ( plus 1000 operations )
    RET; hundreds digit is 0 exit
    ADD3E8: CLR C; clear binary flag
    MOV A, # 0E8H; low 8-bit adder
    ADD A, CONBITL; accumulate
    MOV CONBITL, A; back CONBITL
    MOV A, # 03H; high eight Addition
    ADDC A, CONBITH;
    MOV CONBITH, A; back CONBITH
    RET; Returns
    ;
    ; Multiplication and accumulation process ( to four decimal display BCD code into a binary number )
    MULLOOP: MUL AB; multiplication
    Clear carry flag ; CLR C
    ADD A, CONBITL; plot with CONBITL adding low 8
    MOV CONBITL, A; back CONBITL
    MOV A, CONBITH;
    ADDC A, B; integrated into the high 8 -bit accumulator with CONBITH
    MOV CONBITH, A; back CONBITH
    RET; Returns
    ;
    ; Frequency control data and five control code synthesis BH1415 control word
    CONCOMMAND: ANL CONBITH, # 07H;
    MOV A, 20H;
    ORL A, CONBITH;
    MOV CONBITH, A;
    RET; Returns
    ;
    ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
    ; ; Display program ; ;
    ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
    ; Common anode LED display , P0 port output section of code , P2 port output scanning word
    DISPLAY: MOV R1, # 26H; displays the first address
    MOV R5, # 0FEH; Let scanning word
    PLAY: MOV A, R5; into A
    MOV P2, A; P2 port output
    MOV A, @ R1; fetch display data
    MOV DPTR, # TAB; take the first address segment code table
    MOVC A, @ A + DPTR; investigation Segment
    MOV P0, A; from P0 output
    MOV A, R5; reads the scanned word
    JB ACC.1, PLAY1; than ten (LED), the decimal point is not displayed
    CLR P0.7; was ten , display decimal point
    PLAY1: LCALL DL1MS; lit a millisecond
    INC R1; pointing to the next display data
    JNB ACC.3, ENDOUT; was the fourth LED, exit
    RL A; instead , left a
    MOV R5, A; back R5
    SETB P0.7; Off decimal
    AJMP PLAY; transfer PLAY cycle
    ENDOUT: MOV P2, # 0FFH; Show ends off display output
    MOV P0, # 0FFH;
    RET; Returns
    ;
    ; 0-9 of Shenyang Section stopwatch
    TAB: DB 0C0H, 0F9H, 0A4H, 0B0H, 99H, 92H, 82H, 0F8H, 80H, 90H, 0FFH, 0FFH
    ;
    ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
    ; ; Send control byte subroutine ; ;
    ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ;
    ;
    PUTBIT: MOV A, CONBITL; lower 8 -bit control word into A
    SETB P3.2; BH1415 Enable (write )
    LCALL PUT; send eight
    MOV A, CONBITH; high eight control word into A
    LCALL PUT; send eight
    CLR P3.2; BH1415 write disabled
    CLR P3.0; reset
    CLR P3.1; reset
    RET; Returns
    ;
    ; Byte transmit subroutine
    PUT: MOV R3, # 8; send eight control
    CLR C; Qing C
    PUT1: RRC A; Carry right ( starting low )
    MOV P3.0, C; low to the P3.0 port
    NOP; delay 4 microseconds
    NOP;
    NOP;
    NOP;
    SETB P3.1; latch data ( rising edge latch data )
    NOP; delay 4 microseconds
    NOP;
    NOP;
    NOP;
    CLR P3.1;
    DJNZ R3, PUT1; 8 bits are not finished his turn PUT1 recurrence
    8 finished end ; RET
    ;
    ; 513 microsecond delay subroutine
    DL513: MOV R3, # 0FFH
    DL513LOOP: DJNZ R3, DL513LOOP
    RET
    ;
    ; 1 millisecond delay subroutine (LED lights used )
    DL1MS: MOV R4, # 02H
    DL1MSLOOP: LCALL DL513
    DJNZ R4, DL1MSLOOP
    RET
    ;
    ; 10 ms delay subroutine ( jitter elimination by )
    DL10MS: MOV R6, # 0AH
    DL10MSLOOP: LCALL DL1MS
    DJNZ R6, DL10MSLOOP
    RET
    ;
    ;
    END

    List all Question

    Nickname

    Email

    Questions

    Our other product:






      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

       
      1 字段 2 字段 3 字段 4 字段 5 字段 6 字段 7 字段 8 字段 9 字段 10 字段
  •  

    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:
    +8615915959450

  • Categories

  • Newsletter

    FIRST OR FULL NAME

    E-mail

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

    Contact Us