Wiegand data and com port


Closed Thread
Results 1 to 40 of 54

Hybrid View

  1. #1
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    It's quite simple. Device sends pulse on Data0 if it wants to signal that bit =0 and vide versa. There are 26 or sometimes 40 bits including parity in beginning and end.
    Have wrote decoder with rs232 output for 12F629 and 16F628. I will post code, if interested.

  2. #2
    Join Date
    Jan 2005
    Location
    Australia
    Posts
    20


    Did you find this post helpful? Yes | No

    Smile

    Dear Felch,

    I am interested in your work. Could you please post your Weigand code? Thank you.
    Yuantu Huang

  3. #3
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Hi!
    You'll find the code at http://parsek.yf.ttu.ee/~felc/proximity.asm
    It is a single chip proximity card reader decoder that outputs 6 char (ASCII) number of the card if pin PIC's named "enable" is at high level. Discards readers parity bits (i found that they make no errors anyway...so far). Output parameters: 4800,n,8,1, bit-banged I/O. Critical to correct reading of OSCCAL value of PIC12F629. Be sure not to spoil it when burning the chip!!!
    Although comments are in estonian (my native tongue) , definitions should be understandable. Mail and ask if anything remains unclear.
    Code not for commercial use !
    Happy PIC-ing!
    /Felch

  4. #4
    Join Date
    Jan 2005
    Location
    Australia
    Posts
    20


    Did you find this post helpful? Yes | No

    Default

    Dear Felch,

    Thank you very much for your code. I am now implementing 8 card readers (both Track2 and variable length Weigand) on a single 16F737 using PICbasic Pro. Currently I have a problem for PIC18F8720 to access 2MB EMI using PICbasic Pro.

    I will let you know once I implement 8 card readers on a single PIC.

    Best regards,
    Yuantu Huang

  5. #5
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Nice to hear that this piece of code is useful.
    I was thinking about adding another proximity reader to the same PIC myself too but it was a little bit difficult. As you may have noticed, HID readers are critical: they give a very short pulse (about 40uS) but on the other hand their data "packet" lasts very long (about 70 mS!!).
    Long packet is not a problem of course but it takes nearly 36uS for a PIC running @4MHz to branch form "everyday jobs" to card reading.
    So if i have 2 readers active at the same PIC chip, it really puts it on the edge.

  6. #6
    alind's Avatar
    alind Guest


    Did you find this post helpful? Yes | No

    Default 8 card readers

    Yuantu,
    I was very interested to hear about your plan to implement 8 card readers.
    How did you get on?
    I am keen to do the same thing, but figured it would be necesary to have a seperate PIC for each reader...
    Allan


    Quote Originally Posted by Yuantu Huang
    Dear Felch,

    Thank you very much for your code. I am now implementing 8 card readers (both Track2 and variable length Weigand) on a single 16F737 using PICbasic Pro. Currently I have a problem for PIC18F8720 to access 2MB EMI using PICbasic Pro.

    I will let you know once I implement 8 card readers on a single PIC.

    Best regards,

  7. #7
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    Hi!
    I have recalculated things and...actually it is not very difficult. I can now read 2 RFID-s simultaneously. I have PIC16F628 running at 11.0592MHz (comm's crystal). RFID's generate a port change interrupt and first thing the int routine does is saving readers port data.
    This is one possible way to solve the problem. Probably there are others as well.
    /Felch

    PS. I use assembly language, Basic seems to bee too slow.

  8. #8
    alind's Avatar
    alind Guest


    Did you find this post helpful? Yes | No

    Default

    Felch,
    I'd be keen to see your latest code for that.
    I guess you use the USART port for one of the inputs.
    I also use assembler. Check out my work, recompliing and adding SMTP and RTC support to a TCP/IP stack (with web browser) on a 18F452. It wasn't easy though.
    http://al.joho.com

    I am thinking of adding your Wiegand reader support to the stack to make a door access control system.
    Allan

  9. #9
    samiassaad's Avatar
    samiassaad Guest


    Did you find this post helpful? Yes | No

    Default help me

    Hi sir/
    I am using PIC16F877 to read weigand data from a HID card reader proxpoint. I am using 24 bits crad , 8 bits is site code and 16 bits card number. Also there is 2 extra bits added by the reader called parity bit, please could you tell me about the parity bits? DO they implement as logic 0 or logic 1?
    also could you tell me about weigand protocol, the order of data in it? and I will be very thankul.
    Best Regards
    Sami Assaad

  10. #10
    Join Date
    Sep 2004
    Location
    Tallinn, Estonia
    Posts
    42


    Did you find this post helpful? Yes | No

    Default

    A copy of my reply to somebody who asked questions like yours. Hope it helps you .
    --------------
    Hi!
    Wiegand timing is a difficult question. I found one doc ( http://parsek.yf.ttu.ee/~felc/Wiegand2.pdf ) but in reality it looks different and depends much on manufacturers ...ee...fantasy ? Anyway, working principle is always the same, like described in the pdf.
    About code. Are the files, mentioned in my postings missing? There should be full Prox reader code for PIC12F629 and essential part for PIC16F628 reading 2 readers simultaneously. Heavily commented.
    In assembly, of course

    rgds,
    /Felch

    PS. If you still have questions, drop me a mail
    PS. will copy the same contents to forum also, may-be somebody needs it.
    ------------------------

    /Felch

  11. #11
    pmatyas's Avatar
    pmatyas Guest


    Did you find this post helpful? Yes | No

    Default Hi

    I'm interested your converter, can you send mee an schematic and program source in PIC 16f628?

    regards,
    Mathias

    Quote Originally Posted by Felch View Post
    It's quite simple. Device sends pulse on Data0 if it wants to signal that bit =0 and vide versa. There are 26 or sometimes 40 bits including parity in beginning and end.
    Have wrote decoder with rs232 output for 12F629 and 16F628. I will post code, if interested.

  12. #12
    jose pascoal's Avatar
    jose pascoal Guest


    Did you find this post helpful? Yes | No

    Thumbs up wiegand to rs232 ready to use

    found this one, ready, tested & cheap

    http://www.etconcept.com/Security.htm

  13. #13
    Join Date
    May 2008
    Location
    Durban, South Africa
    Posts
    2


    Did you find this post helpful? Yes | No

    Thumbs up Wiegand to RS485

    Hi Felch,

    I think you have done a fantastic job and thanks for sharing. I am also new to this but it all makes sense and can't wait to get my hands on the microchip and start experimenting. While I'm still finding my feet please can I ask your help (which I am sure won't be too difficult)? I need to convert the 26bit Wiegand to RS485 for the sake of reading up to 1.2 Kms away. If its not to difficult do you think you could post modified code for me?

    Many many thanks!

    Richard.

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts