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 interfacing with pic

RFID interfacing with pic

|

Microcontroller › PIC › RFID interfacing with pic

  • This topic has 2 replies, 3 voices, and was last updated 11 years, 2 months ago by aniruddha.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 2, 2012 at 1:17 pm #1533
    Gaurangi
    Participant

    I got rfid reader i.e.vai-27 & tags. I used the program given in topic “rfid interfacing with pic18f4550”..but tag no. is not being displayed on lcd. plz help me out asap..

    April 19, 2012 at 5:29 am #7499
    AJISH ALFRED
    Participant

    Have you done the following ??

    Connect your rfid reader to the serial port of computer and check wheather you are getting the tag no. properly in the hyperterminal while swapping the tag.

    March 15, 2014 at 8:56 am #11304
    aniruddha
    Participant
    the above rfid interfacing to pic18f4550 code is not working …please suggest the right code as fast u can 
     
     
     
     
     
     
    #include <p18f4550.h>
    /*The following lines of code perform interrupt vector relocation to work with the USB bootloader. These must be used with every application program to run as a USB application.*/
     
    #pragma code
     
    #pragma code _HIGH_INTERRUPT_VECTOR = 0x000808
    void _high_ISR (void)
    {
        _asm goto change _endasm
    }
    #pragma code _LOW_INTERRUPT_VECTOR = 0x000818
    void _low_ISR (void)
    {
         ;
    }
    #pragma code
     
    void change(void)
    {
     
    INTCON3bits.INT1IF = 0;
    }
    #define FREQ 12000000
    #define baud 9600
    #define spbrg_value (((FREQ/64)/baud)-1)
    #define rs PORTAbits.RA0
    #define rw PORTAbits.RA1
    #define en PORTAbits.RA2
    #define lcdport LATB
     
    unsigned char rx_data();
    void lcd_ini(void);
    void lcdcmd(unsigned char);
    void lcddata(unsigned char);
    void MsDelay(unsigned int delay); 
    unsigned char data[] =”unique ID No.”;
    unsigned char card_id[12];
    unsigned int i=0,pos;
    void main()
     
    {
    TRISB=0; // set port B as output port 
    LATB=0;
    TRISA=0;
    LATA=0;
    SPBRG=spbrg_value; // fill SPBRG reg to set the baud rate 
    RCSTAbits.SPEN=1;  // to activate serial port (Tx and Rx pins)
    RCSTAbits.CREN=1;   // to enable continuous reception 
    PIE1bits.RCIE=1; // to enable the reception (RX)interrupt
    INTCONbits.GIE=1;
    INTCONbits.PEIE=1;
    lcd_ini();      // lcd initialization 
    while(data!=’’)
    {
    lcddata(data);  // to send characters one by one from data array
    i++;
    }
    while(1)
    {
    i=0;
    while(i<12);
    lcdcmd(0xc0);
    i=0;
    while(i<12)
    {
    lcddata(card_id); // print the 12 byte receiverd data 
    i++;
    }
       }
    }
    void interrupt()
    {
    card_id=RCREG;  // store the receicer data byte by byte 
    i++;
    }
    void lcd_ini()
    {
    lcdcmd(0x38); // configure th lcd in 8 bit mode 
    lcdcmd(0x0c); // display on and cursor off
    lcdcmd(0x01);// clear displayscreen 
    lcdcmd(0x06);//increment cursor 
    lcdcmd(0x80);//set cursor position to 1st line 1st coloum
    }
    void lcdcmd(unsigned char cmdout)
    {
    lcdport= cmdout;// send command to lcdport=PORTB
    rs=0;
    rw=0;
    en=1;
    MsDelay(10);
    en=0;
    }
    void lcddata(unsigned char dataout)
    {
    lcdport=dataout;// send data to lcdport =PORTB
    rs=1;
    rw=0;
    en=1;
    MsDelay(10);
    en=0;
    }
    void MsDelay(unsigned int time)
    {
    unsigned int i,j;
    for(i=0;i<time;i++)
       for(j=0;j<710;j++);
    }
  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

RSS Recent Posts

  • JBL charge 4 dead motherboard? May 23, 2025
  • Back to the old BASIC days May 23, 2025
  • Reclaiming missing motherboard header May 23, 2025
  • Need help in repairing a dead motherboard May 23, 2025
  • parallel-to-serial problem May 23, 2025

Stay Up To Date

Newsletter Signup
EngineersGarage

Copyright © 2025 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