View previous topic :: View next topic |
Author |
Message |
motts
Joined: 10 Jan 2011 Posts: 29
|
RFID with ID20, need help |
Posted: Sun Apr 17, 2011 3:53 pm |
|
|
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: 9221 Location: Greensville,Ontario
|
|
Posted: Sun Apr 17, 2011 5:27 pm |
|
|
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
|
|
Posted: Sun Apr 17, 2011 7:58 pm |
|
|
THK for , your reply ... |
|
|
Delfy_Coltech
Joined: 25 Nov 2009 Posts: 27 Location: Vietnam
|
First step, |
Posted: Sun Apr 17, 2011 8:26 pm |
|
|
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
|
|
|
motts
Joined: 10 Jan 2011 Posts: 29
|
|
Posted: Thu Apr 21, 2011 6:34 am |
|
|
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
|
|
|
motts
Joined: 10 Jan 2011 Posts: 29
|
|
Posted: Thu Apr 21, 2011 11:19 am |
|
|
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
|
|
Posted: Thu Apr 21, 2011 11:20 am |
|
|
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
|
|
Posted: Thu Apr 21, 2011 12:08 pm |
|
|
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
|
|
Posted: Thu Apr 21, 2011 1:06 pm |
|
|
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
|
|
Posted: Thu Apr 21, 2011 1:27 pm |
|
|
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
|
|
Posted: Thu Apr 21, 2011 1:57 pm |
|
|
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
|
|
Posted: Thu Apr 21, 2011 2:01 pm |
|
|
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
|
|
Posted: Thu Apr 21, 2011 3:10 pm |
|
|
what is your plan?
ID-20 --> PIC --> LCD
or
ID-20 --> PC --> Software? |
|
|
|