RFID Reader-RS232 Work with PIC16F877A?

RFID reader, Reader/Writer, Tag.....

RFID Reader-RS232 Work with PIC16F877A?

Postby pikachuX » Mon Sep 10, 2012 8:28 pm

1) Can this RFID Reader work with PIC16F877A?
2) Did the reading can send to computer?
pikachuX
Novice
 
Posts: 18
Joined: Mon Sep 10, 2012 8:09 pm

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby shahrul » Mon Sep 10, 2012 9:46 pm

pikachuX WROTE:1) Can this RFID Reader work with PIC16F877A?
2) Did the reading can send to computer?

Since you ask can or not, not ask how. So, I answer yes for both question. :)
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby pikachuX » Tue Sep 11, 2012 6:34 am

I currently is beginner for RFID.
Did any tutorial for RS232 send output to computer using PIC16877A?
pikachuX
Novice
 
Posts: 18
Joined: Mon Sep 10, 2012 8:09 pm

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby shahrul » Tue Sep 11, 2012 8:23 am

pikachuX WROTE:I currently is beginner for RFID.
Did any tutorial for RS232 send output to computer using PIC16877A?

CODE: SELECT_ALL_CODE
uart_string("TEST");
uart_write(0x0D);

function
CODE: SELECT_ALL_CODE
   void uart_init(unsigned int baudrate)
   {
   TRISC7=1;
   TRISC6=0;
   #if defined (_16F877A)
      TXSTA=0b00100000;   
      RCSTA=0b10010000;
      if(baudrate<=38400){
         BRGH=0;
         SPBRG=(int)(_XTAL_FREQ/(64.0*baudrate)-1);}
      else{
         BRGH=1;
         SPBRG=(int)(_XTAL_FREQ/(16.0*baudrate)-1);}   
   #endif
   #if defined (_16F886) || (_16F887)
      TXSTA=0b00100000;   
      RCSTA=0b10010000;
      if(baudrate<=38400){
         BRGH=0;
         SPBRG=(int)(_XTAL_FREQ/(64.0*baudrate)-1);}
      else{
         BRGH=1;
         SPBRG=(int)(_XTAL_FREQ/(16.0*baudrate)-1);}
      BAUDCTL=0;
      SPBRGH=0;   
   #endif
   #if defined (_18F2550) || (_18F4550)
      TXSTA=0b00100000;   
      RCSTA=0b10010000;
      BAUDCON=0;
      SPBRG=(int)(_XTAL_FREQ/(64.0*baudrate)-1);
   #endif
   }

   void uart_write(char data)
   {
   while(TXIF==0) continue;
   TXREG=data;
   }
   
   void uart_string(const char *s)
   {
   while(*s) uart_write(*s++);
   }
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby hyng » Tue Sep 11, 2012 1:51 pm

Have you go through this DIY? This project use PIC16F876A instead of 877A.
http://www.cytron.com.my/viewProduct.php?pid=ExUoFhQNEwkWCyklKREgO2IGmqiNPZZB49SjdeVTBfM=
User avatar
hyng
Moderator
 
Posts: 292
Joined: Thu Apr 16, 2009 11:35 am

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby pikachuX » Tue Sep 18, 2012 10:59 am

Did the RFID Reader RS232 need the Max232 driver ? or Max232 driver already consist in RFID Reader RS232 itself?

Reference:
http://shahrulnizam.com/max232-driver/

Actually i want to read the tag ID from the RS232 reader and send it to my programming which Value = Tag ID that i scan.

This is my code:
<input type="text" name="Tag_ID" Value="Tag ID">

Thanks
pikachuX
Novice
 
Posts: 18
Joined: Mon Sep 10, 2012 8:09 pm

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby gadgetng » Tue Sep 18, 2012 12:11 pm

pikachuX WROTE:Did the RFID Reader RS232 need the Max232 driver ? or Max232 driver already consist in RFID Reader RS232 itself?

If you want to interface the reader to UART of PIC, you can use this
http://www.cytron.com.my/viewProduct.php?pcode=URS232A&name=UART%20to%20RS232%20Converter

or you can follow the DIY PR8-B method (refer to the schematic).
gadgetng
Discoverer
 
Posts: 97
Joined: Tue Jul 24, 2012 11:20 am

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby shahrul » Tue Sep 18, 2012 4:51 pm

At first I test the RFID Reader, I don't see in the datasheet either the signal use uart or rs232, then what I do is measure the voltage at signal pin. If uart the voltage from 0V to 5V, or rs232 the voltage from -12V to 12V. What I measure, I get above 5V. (not exactly get 12) so I know that is rs232.

You can use MAX232 as interface or can do circuitly to change
-12 become 5V and 12V become 0V since it's only 1 direction, from RFID to PIC. You can see http://shahrulnizam.com/pic-lesson-rfid-reader
User avatar
shahrul
Professional
 
Posts: 812
Joined: Sat May 16, 2009 9:54 pm
Location: Selangor

Re: RFID Reader-RS232 Work with PIC16F877A?

Postby pikachuX » Wed Sep 19, 2012 10:48 pm

Thanks for the information that you give,i will try it myself :lol:
pikachuX
Novice
 
Posts: 18
Joined: Mon Sep 10, 2012 8:09 pm


Return to RFID

Who is online

Users browsing this forum: No registered users and 6 guests

cron