Help me in reading DATA from RFID 125KHZ tag reader


Closed Thread
Results 1 to 4 of 4
  1. #1
    zeus's Avatar
    zeus Guest

    Default Help me in reading DATA from RFID 125KHZ tag reader

    Dear Members,

    I have a Philips P89C51RD2BN Microcontroller and a 125KHz RFID Reader from Sparr Electronics.The RFID reader just reads a tag and sent the TAG ID following a carriage-return/Line-Feed
    EX:'041201938C'(CR)(LF)
    I wrote a code so that the microcontroller reads the data from RFID reader via UART and checks the 7 byte of the data. But while debugging in the Keil compiler I can change the data for Sbuf. But the value is not assigned to any other variable or register.In this case to 'rfid' variable. Please help me in this problem.I have attached the code for your reference.
    My baud rate is 9600 and my mcu clock is 11.0592Mhz.


    #include(reg51.h)
    unsigned char rfid;
    void main(void)
    {
    unsigned char i;
    TMOD=0X20;
    TH1=0XFA;
    SCON=0X50;
    TR1=1;
    while(1)
    {
    while(RI==0);
    for(i=0;i<6;i++)
    {
    rfid=SBUF;
    }
    if(rfid==0x0b)
    {
    P2^=0xFF;
    }
    else if(rfid==0x08)
    {
    P0^=0xFF;
    }
    else
    {
    P2=0x04;
    }
    RI=0;
    }
    }

  2. #2
    Join Date
    May 2004
    Location
    NW France
    Posts
    3,611


    Did you find this post helpful? Yes | No

    Talking Gods are fallen really low ...

    Hi

    1) You are aboard a MICROCHIP Pic Basic Forum

    2) You are aboard a Microchip PIC Basic Forum

    3) You are aboard a Microchip Pic BASIC Forum


    Bye-Bye ...

    Alain
    ************************************************** ***********************
    Why insist on using 32 Bits when you're not even able to deal with the first 8 ones ??? ehhhhhh ...
    ************************************************** ***********************
    IF there is the word "Problem" in your question ...
    certainly the answer is " RTFM " or " RTFDataSheet " !!!
    *****************************************

  3. #3
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Talking

    Quote Originally Posted by Acetronics View Post
    1) You are aboard a MICROCHIP Pic Basic Forum
    2) You are aboard a Microchip PIC Basic Forum
    3) You are aboard a Microchip Pic BASIC Forum
    I don't understand.
    What do you mean by aboard?

    WOW! And not only that...But which PBP update supports 8051 MCU types?

  4. #4
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    947


    Did you find this post helpful? Yes | No

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 05:47
  2. Read/Write Problem
    By Tobias in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 10th February 2010, 02:51
  3. Big characters on HD44780 4x20
    By erpalma in forum mel PIC BASIC Pro
    Replies: 23
    Last Post: - 7th January 2007, 03:21
  4. LCD + bar graph
    By DynamoBen in forum mel PIC BASIC Pro
    Replies: 13
    Last Post: - 5th October 2005, 15:50
  5. Sinus calculating !
    By Don Mario in forum mel PIC BASIC Pro
    Replies: 29
    Last Post: - 29th November 2004, 00:56

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts