![]() | ![]() | ![]() |
| |||||||
| Micro Controllers Discuss all aspects of micro controllers - building them, coding them, etc. All controllers are welcome - PIC, BASIC, Z8 Encore!, etc. |
![]() |
| | Tools |
| | #1 |
|
As i am doing project on this RFID, PIC-16f877, 3 sensor for parking const unsigned char card1[] = "1D00E4018971"; const unsigned char card2[] = "1A003E2C5850"; const unsigned char card3[] = "1A003E772A79"; void read_card_value_from_uart() // Rxing card_value from rfid { for(k=0; k<=13; k++) { read_card_value[k-1]=getch(); } } rxed card_value from rfid should be compared with card1,card2 , card3 if any one card matches with rxed value it should display the corresponding card user on lcd otherwise it should display as unautherisd user. for this i wrote function as void compare_cards() { if((strcmp(card1,read_card_value))==0) { lcd_clear(); lcd_goto(0); lcd_puts("card1 user"); } else if((strcmp(card2,read_card_value))==0) { lcd_clear(); lcd_goto(0); lcd_puts("card2 user"); } else if((strcmp(card3,read_card_value))==0) { lcd_clear(); lcd_goto(0); lcd_puts("card3 user"); } else { lcd_clear(); lcd_goto(0); lcd_puts("Un-Autherised user"); } } for im getting o/p as "unautherised user". plz check the function let me know. Thanks | |
| |
| | #2 |
|
That means your "read_card_value" doesn't read the card values properly.You can verify is your "read_card_value" gives the proper unique code by sending the "read_card_value" directly to the LCD without comparing.
| |
| |
| | #3 |
|
Seems to implimented soon
| |
| |
| | #4 | |
| Quote:
Why are you doing this? On the first time through the loop you then have: read_card_value[-1]=getch(); Just use: Code: void read_card_value_from_uart() { // Rxing card_value from rfid
for(k=0; k<=13; k++) {
read_card_value[k]=getch();
}
}
| ||
| |
| | #5 |
|
heh also your arrays are wrong: Code: const unsigned char card1[] = "1D00E4018971"; const unsigned char card2[] = "1A003E2C5850"; const unsigned char card3[] = "1A003E772A79"; Code: const unsigned char card1[] = {0x1D,0x00,0xE4,0x01,0x89,0x71};
const unsigned char card2[] = {0x1A,0x00,0x3E,0x2C,0x58,0x50};
const unsigned char card3[] = {0x1A,0x00,0x3E,0x77,0x2A,0x79};
Code: const unsigned char card1[] = {0x01,0x0D,0x00,0x00,0x0E,0x04,0x00,0x01,0x08,0x09,0x07,0x01};
const unsigned char card2[] = {0x01,0x0A,0x00,0x00,0x03,0x0E,0x02,0x0C,0x05,0x08,0x05,0x00};
const unsigned char card3[] = {0x01,0x0A,0x00,0x00,0x03,0x0E,0x07,0x07,0x02,0x0A,0x07,0x09};
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics Last edited by AtomSoft; 10th November 2009 at 04:13 PM. | |
| |
| | #6 |
|
Thanx to all for ur kind reply. Actually "read_card_value" doesn't read the card values properly. Thats the i was getting 1st value its taking dummy then after 12 numbers its taking again 2 dummy variable. for that reason i was getting problem. i have completed this project. Thanks to all. | |
| |
| | #7 |
|
If you know please tell me how to interface keyboard to pic16f877a? n how it works? as i am using 6-pin ps/2 connector. Please help me out as arly as posible. Thanks in advance. | |
| |
| | #8 |
|
PS/2 isnt hard nor easy heh. I have code somewhere on the forum for it.I need to redo a new one tho. Just to clean it up since i feel smarter now maybe i can make it better heh
__________________ AtomSofts eBay Store AtomSoftTech: C18 TIPS & TRICKS v9 PDF Nokia 6100 Driver/Software My Name: Jason Lopez http://atomsofttech.info/ | My YouTube Videos! My Favorite Store: dipmicro Electronics | |
| |
|
| Tags |
| guiding, parking, system |
| Thread Tools | |
| Display Modes | |
| |
Similar | ||||
| Title | Starter | Forum | Replies | Latest |
| Guiding Blind People Robot ''Robotic Cane'' | modi88 | Electronic Projects Design/Ideas/Reviews | 0 | 3rd March 2009 05:18 PM |
| Parking Gate | dreamproject | Electronic Projects Design/Ideas/Reviews | 4 | 15th November 2007 01:23 PM |
| Parking Access System | abosseen | Electronic Projects Design/Ideas/Reviews | 5 | 18th March 2004 09:24 PM |
| help : parking lot system | danae_fiz | Electronic Projects Design/Ideas/Reviews | 2 | 8th July 2003 10:49 AM |
| Offer:parking sensor and car alarm system | Enjoy | Electronic Projects Design/Ideas/Reviews | 0 | 25th June 2003 07:54 AM |