FMUSER Wirless Transmit Video And Audio More Easier !

[email protected] WhatsApp +8618078869184
Language

    MSP430 button program (including circuit diagram and source code)

     

    "MSP430" key program (including circuit diagram and source code) #i nclude void Init_ Port(void){ // Set all pins of P1 port as input mode during initialization P1DIR = 0; // Set all pins of port P1 as general I / O ports P1SEL = 0; // Set P1.4 P1.5 P1.6 P1.7 to the output direction P1DIR |= BIT4; P1DIR |= BIT5; P1DIR |= BIT6; P1DIR |= BIT7; // Output low level first P1OUT = 0x00; // Reset interrupt register P1IE = 0; P1IES = 0; P1IFG = 0; // Turn on the interrupt function of the pin // The corresponding pin jumps from high to low level to set the corresponding flag P1IE |= BIT0; P1IES |= BIT0; P1IE |= BIT1; P1IES |= BIT1; P1IE |= BIT2; P1IES |= BIT2; P1IE |= BIT3; P1IES |= BIT3; _ EINT();// Open interrupt return;} void Delay(void){ int i; for(i = 100; i--; i > 0) ;// Delay a little time}int keyprocess (void){ int nP10,nP11,nP12,nP13; int nRes = 0; // P1.4 output low level P1OUT &= ~(BIT4); nP10 = P1IN & BIT0; if (nP10 == 0) nRes = 13; nP11 = P1IN & BIT1; if (nP11 == 0) nRes = 14; nP12 = P1IN & BIT2; if (nP12 == 0) nRes = 15; nP13 = P1IN & BIT3; if (nP13 == 0) nRes = 16; // P1.5 output low level P1OUT &= ~(BIT4); nP10 = P1IN & BIT0; if (nP10 == 0) nRes = 9; nP11 = P1IN & BIT1; if (nP11 == 0) nRes = 10; nP12 = P1IN & BIT2; if (nP12 == 0) nRes = 11; nP13 = P1IN & BIT3; if (nP13 == 0) nRes = 12; // P1.6 output low level P1OUT &= ~(BIT4); nP10 = P1IN & BIT0; if (nP10 == 0) nRes = 5; nP11 = P1IN & BIT1; if (nP11 == 0) nRes = 6; nP12 = P1IN & BIT2; if (nP12 == 0) nRes = 7; nP13 = P1IN & BIT3; if (nP13 == 0) nRes = 8; // P1.7 output low level P1OUT &= ~(BIT4); nP10 = P1IN & BIT0; if (nP10 == 0) nRes = 1; nP11 = P1IN & BIT1; if (nP11 == 0) nRes = 2; nP12 = P1IN & BIT2; if (nP12 == 0) nRes = 3; nP13 = P1IN & BIT3; if (nP13 == 0) nRes = 4; P1OUT = 0x00;// Restore previous values. // Read the status of each pin nP10 = P1IN & BIT0; nP11 = P1IN & BIT1; nP12 = P1IN & BIT2; nP13 = P1IN & BIT3; for(;;) { if(nP10 == 1 && nP11 == 1 && nP12 == 1 && nP13 == 1) { // Wait for the key to be released break; } } return nRes;}// Process interrupt from port 1 [port1]_ VECTOR] void PORT_ ISR(void){ Delay(); KeyProcess(); if(P1IFG & BIT0) { P1IFG &= ~(BIT0);// Clear interrupt flag bit } if(P1IFG & BIT1) { P1IFG &= ~(BIT1);// Clear interrupt flag bit } if(P1IFG & BIT2) { P1IFG &= ~(BIT2);// Clear interrupt flag bit } if(P1IFG & BIT3) { P1IFG &= ~(BIT3);// Clear interrupt flag bit }} void Init_ CLK(void){ unsigned int i; BCSCTL1 = 0X00; // Clear the contents of the register // XT2 oscillator on // Lftx1 operates in low frequency mode // The frequency division factor of aclk is 1 do { IFG1 &= ~OFIFG; // Clear oscfault flag for (i = 0x20; i > 0; i--); } while ((IFG1 & OFIFG) == OFIFG); // If oscfault = 1 BCSCTL2 = 0X00; // Clear the contents of the register BCSCTL2 += SELM1; // The clock source of MCLK is tx2clk, and the frequency division factor is 1 BCSCTL2 += SELS; // The clock source of smclk is tx2clk, and the frequency division factor is 1} MSP430 key interface circuit diagram, technical zone How do bare metal programs drive hardware? Look what the elder said Introduction and configuration of arm tightly coupled memory Armv8 simplifies software migration through design The higher priority of STM32 interrupt is mainly determined according to two aspects Design scheme of master-slave Dual CPU embedded four-axis motion controller based on arm and DSP“

     

     

     

     

    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