EngineersGarage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise
You are here: Home / Topics / RFID displays weird numbers

RFID displays weird numbers

|

Microcontroller › PIC › RFID displays weird numbers

  • This topic has 1 reply, 2 voices, and was last updated 9 years, 9 months ago by Prabakaran P M.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • March 4, 2016 at 7:58 am #4339
    rolls
    Participant

    Hello,please i need your help. Am making an RFID access control for my final year project. but each time i place the tag on the rfid reader it displays weird characters. The code is written in MikroC with PIC18F45K22. Thanks very much for your replies.

     

    // LCD module connections
    sbit LCD_RS at RB4_bit;
    sbit LCD_EN at RB5_bit;
    sbit LCD_D4 at RB0_bit;
    sbit LCD_D5 at RB1_bit;
    sbit LCD_D6 at RB2_bit;
    sbit LCD_D7 at RB3_bit;
     
    sbit LCD_RS_Direction at TRISB4_bit;
    sbit LCD_EN_Direction at TRISB5_bit;
    sbit LCD_D4_Direction at TRISB0_bit;
    sbit LCD_D5_Direction at TRISB1_bit;
    sbit LCD_D6_Direction at TRISB2_bit;
    sbit LCD_D7_Direction at TRISB3_bit;
    // End LCD module connections
     
      char i,rfid[13] ;
     
      char rfid2[] = "012345678912" ;
      int count = 0;
    void main()
    {
     
       ANSELB = 0;
       ANSELD = 0;
       ANSELC = 0;
     
      Lcd_Init();                         // Initialize LCD
      Lcd_Cmd(_LCD_CLEAR);                // Clear display
      Lcd_Cmd(_LCD_CURSOR_OFF);           // Cursor off
      //Lcd_Out(1,1,"RFID Tag Reader");     // Write text in first row
      
      UART2_Init(9600);
      
      rfid[12] = '';
     
      while(1)
      {
     
         if(UART2_Data_Ready())
         {
           for(i=0;i<12;)
           {
             if(UART2_Data_Ready())
             {
                rfid = UART2_Read();
                i++;
             }
     
           }
     
            Lcd_Out(1,1,rfid);
     
              if(!strcmp(rfid,rfid2)){
            Lcd_Out(2,1,"ACCESS GRANTED");
            delay_ms(1000);
            Lcd_Cmd(_LCD_CLEAR);
            //Lcd_Out(1,1,"RFID Tag Reader");
          }
          else  {
           Lcd_Out(2,1, "ACCESS DENIED");
           delay_ms(1000);
           Lcd_Cmd(_LCD_CLEAR);
           //Lcd_Out(1,1,"RFID Tag Reader");
          }
     
         }
     
      }
    }
    June 26, 2016 at 6:12 am #13994
    Prabakaran P M
    Participant

    This error is may be due to Baud rate configuration, check the baud rates of both module and PIC.

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • Understanding reversing polarity at astable multivibrator April 19, 2026
  • Integrating 0–5V ECU Signals into a Double-DIN Setup – Module vs Custom Head Unit? April 19, 2026
  • Selection Criteria and Safe Usage of Cable Ties in Electronics Applications April 19, 2026
  • Mystery amp noise - ?? April 19, 2026
  • timing delay code statements using Swordfish April 19, 2026

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2026 WTWH Media LLC. All Rights Reserved. The material on this site may not be reproduced, distributed, transmitted, cached or otherwise used, except with the prior written permission of WTWH Media
Privacy Policy | Advertising | About Us

Search Engineers Garage

  • Engineers Garage Main Site
  • Visit our active EE Forums
    • EDABoard.com
    • Electro-Tech-Online
  • Projects & Tutorials
    • Circuits
    • Electronic Projects
    • Tutorials
    • Components
  • Digi-Key Store
    • Cables, Wires
    • Connectors, Interconnect
    • Discrete
    • Electromechanical
    • Embedded Computers
    • Enclosures, Hardware, Office
    • Integrated Circuits (ICs)
    • Isolators
    • LED/Optoelectronics
    • Passive
    • Power, Circuit Protection
    • Programmers
    • RF, Wireless
    • Semiconductors
    • Sensors, Transducers
    • Test Products
    • Tools
  • Advertise