FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    AT89C52 Single Chip Microcomputer BH1415F Frequency Channel Design

     

    BH1415F FM stations controlled by the debug C programs use keilC51 // use AT89C52 microcontroller, 12MHz crystal, with a total of four LED digital male // P0 port output code segment, P2 port scan //#pragmasrc(d :aa.asm) #include "reg52.h" #include "intrins.h" // _NOP_(); delay function # DefineDisdataP0 // Segment output # DefinedisCANP2 // port scan # DefinekeyioP1 // keyboard interface #defineucharunsignedchar #defineuintunsignedint sbitDA = P3 ^ 0; // Data output sbitCK = P3 ^ 1; // Clock sbitCE = P3 ^ 2; // chip select sbitDIN = P0 ^ 7; // LED control decimal sbitmonolamp = P3 ^ 3; // stereo indicator uinth; // delay parameter // // code table scan segment ucharcodedis_7 [12] = {0xC0,0xF9,0xA4,0xB0,0x99,0x92,0x82,0xF8,0x80,0x90,0xff, 0xbf}; / * Total anode segment LED code table "0" "1" "2" "3" "4" "5" "6" "7" "8" "9" "Off" "-" * / ucharcodescan_con [4] = {0xfe, 0xfd, 0xfb, 0xf7}; // column scanning control word uintdataf_data = {0x00}, f_data1; // frequency data, with temporary calculation data uchardatadisplay [4] = {0x00,0x00,0x00,0x00}; // data display means, 4 data ucharbdatacondata = 0x08; // 1415 high five control word, stereo power state sbitmono = condata ^ 3; // mono / stereo control bit uchardataconcommand [2], keytemp; // 2 Synthesis of the control word, the key storage // / ************************************************* ********************* / // // / 11 microsecond delay function *********** ********** / // voiddelay (uintt) { for (; t "0; t--); } // / *********** LED display dynamic scanning function ********** / SCAN () { chark; FOR (k = 0; k "4; k ++) // four LED scan control { Disdata = dis_7 [display [k]]; if (k == 1) {DIN = 0;} discan = scan_con [k]; delay (90); discan = 0xff; } } // // / *********** frequency data is converted into BCD code display function ********** / turn_bcd () { display [3] = f_data / 1000; if (display [3] == 0) {display [3] = 10;} // the highest bit does not show 0 f_data1 = f_data% 1000; display [2] = f_data1 / 100; // find tens display f_data1 = f_data1% 100; display [1] = f_data1 / 10; // display digits required display [0] = f_data1% 10; // display request decimals } / Combining function control word *********** ********** / command () { concommand [1] = f_data / 256; concommand [0] = f_data% 256; concommand [1] = concommand [1] + condata; } / 1 byte function *********** ********** / write (ucharval) { uchari; CE = 1; for (i = 8; i "0; i--) { DA = val & 0x01; // _nop _(); _nop _(); _nop _(); _nop_(); CK = 1; _nop _(); _nop _(); _nop _(); _nop_(); CK = 0; val = val / 2; } CE = 0; } / Write control word 1415 *********** function ********** / w_1415 () { write (concommand [0]); write (concommand [1]); } // // // ************* frequency shabu new ***************************************************** fup () { turn_bcd (); // show BCD code converter command (); // composite control word w_1415 (); // write 1415 } // / Function key check *********** ********** / read_key () { keyio = 0xf0; keytemp = (~ keyio) & 0xf0; if (keytemp! = 0) { keytemp = keyio; keyio = 0x0f; keytemp = keytemp | keyio; while (! ((~ keyio) & 0x0f) = 0); // switch (keytemp) { case238: {f_data ++; if (f_data "1099) {f_data = 1099;} fup (); break;} // add 0.1MHZ case222: {f_data -; if (f_data "800) {f_data = 800;} fup (); break;} // Save 0.1MHZ case190: {mono = ~ mono; if (mono) {monolamp = 0;} elsemonolamp = 1; fup (); break;} // stereo / mono conversion case126: {f_data = 1090; fup (); break;} // presets 109.0MHZ case237: {f_data = 1070; fup (); break;} // presets 107.0MHZ case221: {f_data = 1050; fup (); break;} // presets 105.0MHZ case189: {f_data = 1030; fup (); break;} // presets 103.0MHZ case125: {f_data = 1000; fup (); break;} // presets 100.0MHZ case235: {f_data = 970; fup (); break;} // presets 97.0MHZ case219: {f_data = 950; fup (); break;} // presets 95.0MHZ case187: {f_data = 930; fup (); break;} // presets 93.0MHZ case123: {f_data = 900; fup (); break;} // presets 90.0MHZ case231: {f_data = 870; fup (); break;} // presets 87.0MHZ case215: {f_data = 850; fup (); break;} // presets 85.0MHZ case183: {f_data = 830; fup (); break;} // presets 83.0MHZ case119: {f_data = 800; fup (); break;} // presets 80.0MHZ default: {break;} // } } keyio = 0xff; } // // // / ************* Main function **************** / Main () { Disdata = 0xff; // initialize port discan = 0xff; keyio = 0xff; DA = 0; // bh1415 ban CK = 0; // CE = 0; // for (h = 0; h "4; h ++) {display [h] = 8;} // booting display" 8888 " for (h = 0; h "500; h ++) {Scan ();} // booting display "8888" 2 seconds f_data = 1000; // presets 1000MHZ monolamp = 0; // start stereo lamp lighting fup (); // frequency into BH1415 While (1) { read_key (); // check the key buttons scan (); // display 4ms } } // //*********************end************************** //, read the full story

     

     

     

     

    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