Microcontroller › PIC › RFID interfacing with pic
- This topic has 2 replies, 3 voices, and was last updated 10 years, 6 months ago by aniruddha.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
April 2, 2012 at 1:17 pm #1533GaurangiParticipant
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 #7499AJISH ALFREDParticipantHave 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 #11304aniruddhaParticipantthe 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 = 0x000808void _high_ISR (void){_asm goto change _endasm}#pragma code _LOW_INTERRUPT_VECTOR = 0x000818void _low_ISR (void){;}#pragma codevoid 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 LATBunsigned 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 portLATB=0;TRISA=0;LATA=0;SPBRG=spbrg_value; // fill SPBRG reg to set the baud rateRCSTAbits.SPEN=1; // to activate serial port (Tx and Rx pins)RCSTAbits.CREN=1; // to enable continuous receptionPIE1bits.RCIE=1; // to enable the reception (RX)interruptINTCONbits.GIE=1;INTCONbits.PEIE=1;lcd_ini(); // lcd initializationwhile(data!=’