Help regarding RFID Security Access System

Discussion in 'Embedded Systems and Microcontrollers' started by kks31, Feb 18, 2018.

  1. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    I have been working on this project for a week, spending at least 2-3 hours daily on the computer trying to figure it out. I searched a lot of similar codes for this project and eventually, i successfully created a Hex file for the same. But the problem is that i am not able to run this on Proteus. The simulation starts successfully but nothing happens when i type, even the LCD doesn't display anything. It would be great if someone help me out because i am quite on the verge on loosing my mind here. I have absolutely no background on electronics and have to make this project because the subject requires it. I have included the Proteus file, C file and the HEX file. Please check it out and tell me what's wrong. Thanks!
     
  2. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,743
    346
    Why does everyone like them rar files zip still works
     
    spinnaker likes this.
  3. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,628

    Not that I would open a zip file from a forum member with one post anyway. ;)


    Nor would I try to help anyone that made zero attempt to figure out the problem on their own.
     
    be80be likes this.
  4. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    I think i made it pretty clear that i have been working on this for weeks. There hasn't been "Zero Attempt", i assure you Mr. . I decided to ask people who have more knowledge about it and it seems you aren't one of them. As for the rar file, i thought it would be easier to include all files in a single file. Thanks for the really helpful reply. Snob!
     
  5. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    All the different projects that i downloaded were in "RAR" format. I would love to know what futuristic software you use to compress your file's. Seriously are all the people in this forum like this???
     
  6. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,628

    95% pf the world uses zip files. There is nothing "futuristic" about it.

    No one is going to open a compressed file from an unknown user anyway.

    Very, very few people have Proteus.
     
  7. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,743
    346
    It's not that you used RAR I just can't see using rar to make a file thats 41 kb's when every dang computer that run's windows can make a zip file now RAR has a lot of added tracking that why it's on the net now days I don't need some one slipping some tracking program in there rar files.

    I have no need of it tar works gz works And zip works just fine.

    And Proteus is useless if you don't have $6000 to buy a copy the free one is very limited
     
  8. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,743
    346
    Why is this so hard
    Code (Text):
    1. #include<reg51.h>
    2. #include<string.h>
    3. #include<stdio.h>
    4. #define lcdport P1
    5.  
    6.  
    7. sbit rs=P3^7;
    8. sbit en=P3^5;
    9. sbit rw=P3^6;
    10. sbit m1=P0^0;
    11. sbit m2=P0^1;
    12.  
    13. char i,rx_data[50];
    14.  
    15. char rfid[13],ch=0;
    16.  
    17. char pass[4];
    18.  
    19. void delay(int itime)
    20. {
    21.     int i,j;
    22.     for(i=0;i<itime;i++)
    23.     for(j=0;j<1275;j++);
    24. }
    25.  
    26. void daten()
    27. {
    28.     rs=1;
    29.       rw=0;
    30.     en=1;
    31.     delay(5);
    32.     en=0;
    33. }
    34.  
    35. void lcddata(unsigned char ch)
    36. {
    37.     lcdport=ch & 0xf0;
    38.     daten();
    39.     lcdport=(ch<<4) & 0xf0;
    40.     daten();
    41. }
    42.  
    43. void cmden(void)
    44. {
    45.     rs=0;
    46.     en=1;
    47.     delay(5);
    48.     en=0;
    49. }
    50.  
    51. void lcdcmd(unsigned char ch)
    52. {
    53.     lcdport=ch & 0xf0;
    54.     cmden();
    55.     lcdport=(ch<<4) & 0xf0;
    56.     cmden();
    57. }
    58.  
    59. void lcdstring(char *str)
    60. {
    61.     while(*str)
    62.     {
    63.         lcddata(*str);
    64.         str++;
    65.     }
    66. }
    67.  
    68. void lcd_init(void)
    69. {
    70.     lcdcmd(0x02);
    71.     lcdcmd(0x28);
    72.     lcdcmd(0x0e);
    73.     lcdcmd(0x01);
    74. }
    75.  
    76. void uart_init()
    77. {
    78. TMOD=0x20;
    79. SCON=0x50;
    80. TH1=0xfd;
    81. TR1=1;
    82. }
    83. char rxdata()
    84. {
    85.   while(!RI);
    86.     ch=SBUF;  
    87.     RI=0;
    88.     return ch;
    89. }
    90.  
    91.  
    92. void main()
    93. {
    94.     uart_init();
    95.     lcd_init();
    96.     lcdstring("  RFID Based    ");
    97.     lcdcmd(0xc0);
    98.     lcdstring("Security system ");
    99.     delay(400);
    100.     while(1)
    101.     {
    102.         lcdcmd(1);
    103.         lcdstring("Place Your Card:");
    104.         lcdcmd(0xc0);
    105.         i=0;
    106.         for(i=0;i<12;i++)
    107.         rfid[i]=rxdata();
    108.         rfid[i]='\0';
    109.         lcdcmd(1);
    110.         lcdstring("Your ID No. is:");
    111.         lcdcmd(0xc0);
    112.         for(i=0;i<12;i++)
    113.         lcddata(rfid[i]);
    114.         delay(100);
    115.         if(strncmp(rfid,"160066A5EC39",12)==0)
    116.         {
    117.             lcdcmd(1);
    118.             lcdstring("Access Granted ");
    119.             lcdcmd(0xc0);
    120.             lcdstring("Person1");
    121.             m1=1;
    122.             m2=0;
    123.             delay(300);
    124.             m1=0;
    125.             m2=0;
    126.             delay(200);
    127.             m1=0;
    128.             m2=1;
    129.             delay(300);
    130.             m1=0;
    131.             m2=0;
    132.           }
    133.      
    134.         else if(strncmp(rfid,"160066BD7AB7",12)==0)
    135.             {
    136.             lcdcmd(1);
    137.             lcdstring("Access Granted ");
    138.             lcdcmd(0xc0);
    139.             lcdstring("Person2");
    140.             m1=1;
    141.             m2=0;
    142.             delay(300);
    143.             m1=0;
    144.             m2=0;
    145.             delay(200);
    146.             m1=0;
    147.             m2=1;
    148.             delay(300);
    149.             m1=0;
    150.             m2=0;
    151.             }
    152.          
    153.                 else if(strncmp(rfid,"160066203060",12)==0)
    154.             {
    155.             lcdcmd(1);
    156.             lcdstring("Access Granted ");
    157.             lcdcmd(0xc0);
    158.             lcdstring("Person3");
    159.             m1=1;
    160.             m2=0;
    161.             delay(300);
    162.             m1=0;
    163.             m2=0;
    164.             delay(200);
    165.             m1=0;
    166.             m2=1;
    167.             delay(300);
    168.             m1=0;
    169.             m2=0;  
    170.             }
    171.  
    172.         else
    173.         {
    174.            lcdcmd(1);
    175.            lcdstring("Access Denied");
    176.            delay(300);
    177.         }
    178.   }
    179. }
    Back to
    Ask for Ian he has a real copy of Proteus
     
  9. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,743
    346
    Back to RAR
     
  10. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,628

    Or you live in a country where they don't enforce copyright laws. ;)
     
  11. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    Okay i get your point. But the fact remains that many people still use rar file. If you have an Anti virus installed on tour PC then it shouldn't be that big of a problem. It stops from downloading if it detects any threat.
     
  12. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    I don't have a problem with the code. I just want to run a simulation and try out the code before loading it on my microcontroller just to be on the safe side. And for that i don't have to buy the full version. I have solved all the issues but the only problem i am having is with the Motor Driver module which isn't rotating.
     
  13. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,628

    Maybe the virus checker will catch it. And maybe not. Why should I risk opening an rar file to help someone I don't know?

    Why should I go through the trouble of opening special software to open an RAR?

    You are the one with the issue. It is up to you to make it easier for people to try and help
     
  14. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    How else am i supposed to upload the file? I thought that's what forums are for, to ask and help a complete stranger. Anyways whatever, the guys at 8051 project forum helped me out, just need to figure out about the motor. So thank you for your great help.
     
  15. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,628
    1. You upload a zip file.

    2. You post you code right in the post.

    3. You make at least some attempt to figure it out yourself and point out the certain where you think is the issue.


    But you mentioned you don't have a problem with the code so I don't see where that would help. Very few people have Proteus. My guess no one here does so I am not sure how you expect someone to run it.
     
  16. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    I really don't understand your paranoia with rar files. Everyone knows its best in compressing. As for security threats that can happen with any zip, tar or rar file. Yes i guess Zip files are more accessible but i think almost everyone has WINRar installed in their PC from a very long time. And i asked here for help because i thought there are professionals available here, so they must have Proteus because it's important for a project.
     
  17. be80be

    AAC Fanatic!

    Jul 5, 2008
    1,743
    346
    Nope there probably no one here using Proteus but the one guy I told you his name.
    I'm sure the reason your having problems your using the trial software.
     
  18. kks31

    Thread Starter New Member

    Feb 18, 2018
    17
    1
    Maybe.
     
  19. spinnaker

    AAC Fanatic!

    Oct 29, 2009
    7,815
    3,628

    It is irrelevant if you understand or not. It is my choice (along with others) not to open them. We not the one here with the problem. You are and you aren't making it easy for people to help you.
     
Loading...