CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

RFID with ID20, need help
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

RFID with ID20, need help
PostPosted: Sun Apr 17, 2011 3:53 pm     Reply with quote

hi, I am new for RFID, Can any help me for the coding to read the tag ID by the reader ID20(125khz) and show in LCD by using micro controller 18F4550? I have try a lot of way but still cant get ... pls help me.... thk for helping. god bless
temtronic



Joined: 01 Jul 2010
Posts: 9241
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Sun Apr 17, 2011 5:27 pm     Reply with quote

Make Google your friend. There are several examples with code on using that ID20 module. Might take you a couple days to find what you need but cheaper than paying me for 2 hours of my time to cut custom code for you!
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Sun Apr 17, 2011 7:58 pm     Reply with quote

THK for , your reply ...
Delfy_Coltech



Joined: 25 Nov 2009
Posts: 27
Location: Vietnam

View user's profile Send private message Visit poster's website

First step,
PostPosted: Sun Apr 17, 2011 8:26 pm     Reply with quote

Good morning,
Firstly, you have to design the schematic. How to connect ID20 to PIC?

Which pin of ID20 that use to receive tag ID's data?
Then, post your schematic here.
Many people can help you!
_________________
-------------------------------------------------
Mechatronics Department, Coltech, VNUH
Hanoi, Vietnam.
-------------------------------------------------
f0raster0



Joined: 05 Nov 2010
Posts: 22

View user's profile Send private message

look..
PostPosted: Tue Apr 19, 2011 12:28 pm     Reply with quote

http://www.ccsinfo.com/forum/viewtopic.php?p=139806#139806
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 6:34 am     Reply with quote

Thk for helping.
the RFID Reader ID 20 connection in here
http://www.sparkfun.com/datasheets/Sensors/ID-12-Datasheet.pdf

The pin of ID 20 will connect to PIC18F4550 Pin 26 (Port c7 RX).
Then I want the tag code show in LCD.
I am sorry that I not really know how to show my schematic on here, so only can use to describe here....
which can get help from you all ... thk you very much.
f0raster0



Joined: 05 Nov 2010
Posts: 22

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 10:03 am     Reply with quote

http://imageshack.us/

this web.. you must register and you can store images..

for example,
http://img515.imageshack.us/i/ttlars232.jpg/

this is ID-20 to RS232
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 11:19 am     Reply with quote

thk for helping .... this is my diagram.
Wish can get help from you guy ... thk you all ...

http://img641.imageshack.us/img641/1742/id20.png
http://img39.imageshack.us/img39/7061/schpic.png

This is what i did, i can read the code but, this code won't loop. I mean after i scan 1 tag, it no longer can show the second ID.
What i need project is about payment system. Where by RFID to replace the barcode. After scan the tags the system can accumulate the total price also.... can anyone give some idea or coding ?
Really thk you all very much..
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 11:20 am     Reply with quote

Code:

#include <18f4550.h>
#fuses HS,NOLVP,NOWDT,NOPROTECT 
#use delay(clock=20000000)         // 40 MHz crystal on PCB
#use rs232(baud=9600, UART1)      // hardware UART; uses  RC6/TX and RC7/RX
#define use_portb_lcd TRUE
#include <lcd.c>

int16 i;
char value[12];//12 values of tag ID

void main() {
   output_low(PIN_D7); //Set enable to low
   lcd_init();
   do
   {
     for (i=0; i<12; i++) { //read in the 12 values
              value[i]=getc();
     }
     if(value[1]=='0' && value[2]=='C' && value[3]=='0' && value[4]=='0' && value[5]=='2' && value[6]=='7' && value[8]=='8' && value[5]=='5' && value[9]=='6' && value[10]=='D'){
     printf("ID = 0C0027856D,Apple\r\n");
     lcd_putc("\fID = 0C0027856D");
     lcd_putc("\nItem = Apple");
     
     }if(value[1]=='1' && value[2]=='2' && value[3]=='0' && value[4]=='0' && value[5]=='C' && value[6]=='2' && value[7]=='7' && value[8]=='C' && value[9]=='1' && value[10]=='C'){
     printf("ID = 1200C27C1C,Orange\r\n");
     lcd_putc("\fID = 1200C27C1C");
     lcd_putc("\nItem = Orange");
     
     }if(value[1]=='1' && value[2]=='2' && value[3]=='0' && value[4]=='0' && value[5]=='C' && value[6]=='2' && value[7]=='8' && value[8]=='8' && value[9]=='F' && value[10]=='3'){
     printf("ID = 1200C288F3,Grape\r\n");
     lcd_putc("\fID = 1200C288F3");
     lcd_putc("\nItem = Grape");
     
     }if(value[1]=='1' && value[2]=='2' && value[3]=='0' && value[4]=='0' && value[5]=='C' && value[6]=='2' && value[7]=='8' && value[8]=='F' && value[9]=='0' && value[10]=='3'){
     printf("ID = 1200C28F03,Peach\r\n");
     lcd_putc("\fID = 1200C28F03");
     lcd_putc("\nItem = Peach"); 
     
     }if(value[1]=='0' && value[2]=='D' && value[3]=='0' && value[4]=='0' && value[5]=='6' && value[6]=='A' && value[7]=='C' && value[8]=='8' && value[9]=='F' && value[10]=='6'){
     printf("ID = 0D006AC8F6,Pear\r\n");
     lcd_putc("\fID = 0D006AC8F6");
     lcd_putc("\nItem = Pear");     
     
     }if(value[1]=='0' && value[2]=='D' && value[3]=='0' && value[4]=='0' && value[5]=='6' && value[6]=='A' && value[7]=='A' && value[8]=='9' && value[9]=='3' && value[10]=='D'){
     printf("ID = 0D006AA93D,Apricot\r\n");
     lcd_putc("\fID = 0D006AA93D ");
     lcd_putc("\nItem = Apricot");
     }
   }while(TRUE);
}
f0raster0



Joined: 05 Nov 2010
Posts: 22

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 12:08 pm     Reply with quote

this is bad..
Quote:
#use delay(clock=20000000) // 40 MHz crystal on PCB


this true
#use delay(clock=20000000) // 20 MHz crystal on PCB

"What I need project is about payment system. Where by RFID to replace the barcode. After scan the tags the system can accumulate the total price also."

price¡¡ in supermarket??
I place ID-20 and PC with software, for example VBasic mm or similar, but not PIC.

The tag RFID for product is expensive, and barcode is still cheap supermarket.
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 1:06 pm     Reply with quote

The frequency is wrong typing.
Ya, I know, the bar code still is the cheaper. My project just want to show how successful the RFID can be done.
Thk for your helping.
Anyone still got any idea to do it?? Please leave your idea and coding.
Thk you all very much.
f0raster0



Joined: 05 Nov 2010
Posts: 22

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 1:27 pm     Reply with quote

ok.. I say, this is my idea

ID-20 --> RS232--> PC or

ID-20 --> RS232--> Converter RS232-USB --> PC


in PC, I can help using Visual Basic 6.0, you know some software, mm C++ or php, etc..?
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 1:57 pm     Reply with quote

My programming very bad .... don't know how to use those visual basic.
If using pc to show tag id and with the accumulation pricing, also can for my project. Cause I just want to show the result.
motts



Joined: 10 Jan 2011
Posts: 29

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 2:01 pm     Reply with quote

If you not mind, you can add my msn, for easy to chat.
[email protected]

Your help, I really appreciate it. Thk you very much.
f0raster0



Joined: 05 Nov 2010
Posts: 22

View user's profile Send private message

PostPosted: Thu Apr 21, 2011 3:10 pm     Reply with quote

what is your plan?

ID-20 --> PIC --> LCD
or
ID-20 --> PC --> Software?
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group