1641 views|0 replies

8489

Posts

0

Resources
The OP

Source code for reading and writing RC522 RFID module with MSP430F149 [Copy link]

The microcontroller source program is as follows: // //================================== ==========================================// #include "msp430x14x.h " #include "PIN_DEF.H" #include "RC522.H" #include "UART0_Func.c" #include "ctype.h" #include "BoardConfig.h" unsigned char UID[5],Temp[4] ; unsigned char RF_Buffer[18] ; unsigned char Password_Buffer[6]={0xFF,0xFF,0xFF,0xFF,0xFF,0xFF}; // Mifare One default password char MBRX[30] ; char MBKeyTP[30] ; char Event ; unsigned char DISP_MODE,i ; // Edit control display mode unsigned char des_on = 0 ; // DES encryption flag void Key_TP_Task(void) ; / /******************************************************** **************************// // // // Initialize the main clock: MCLK = XT1×(FLL_FACTOR+1) // / / // //************************************************* ******************************// void Init_CLK(void) { unsigned int qq; WDTCTL = WDTPW + WDTHOLD; // Turn off watchdog BCSCTL1 &= ~XT2OFF; //Turn on XT2 high speed crystal oscillator do { IFG1 &= ~OFIFG; //Clear oscFault flag clear oscillator failure flag for(qq=0xff;qq>0;qq--); }while((IFG1&OFIFG)); //oscFault flag still set BCSCTL2 |= SELM_2; //MCLK=XT2 //BCSCTL2 |= DIVM_0; //Control MCLK without frequency division, default BCSCTL2 |= SELS; //SMCLK=XT2 //BCSCTL2 |= DIVS_0; //Control SMCLK without frequency division, default} void Delay(unsigned int time) { unsigned int i, k ; for(i=0;i<255;i++) for(k=0;k');
        Send1Char('\n');
        i=Get1Char();
        HandleConfigMenu(i);
  }
}

This post is from Microcontroller MCU

Guess Your Favourite
Find a datasheet?

EEWorld Datasheet Technical Support

Related articles more>>

    EEWorld
    subscription
    account

    EEWorld
    service
    account

    Automotive
    development
    circle

    Robot
    development
    community

    Copyright © 2005-2025 EEWORLD.com.cn, Inc. All rights reserved 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号
    快速回复 返回顶部 Return list