Wiegand data and com port


Closed Thread
Page 1 of 2 12 LastLast
Results 1 to 40 of 54
  1. #1
    ARES's Avatar
    ARES Guest

    Default Wiegand data and com port

    I have a reader (HID Prox Point) and it sends data in wiegand format.I want to read this data from com port.Help me about this circuit.How can i do this type of circuit.

    Thanx,

  2. #2
    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.

  3. #3
    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

  4. #4
    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

  5. #5
    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

  6. #6
    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.

  7. #7
    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,

  8. #8
    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.

  9. #9
    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

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


    Did you find this post helpful? Yes | No

    Default

    Hi!
    My code is also used in a networked access system... I DID have to cut out some parts of it since i am not allowed to distribute it. Nevertheless i hope it will help you. Comments are in Estonian but code in pure assembly
    I do not use UART for RFID-s but RB4...RB7 port's port change int.
    Mail me if anything remains unclear or needs to be translated.

    /Felch
    PS. I am also working with radioactivity monitoring system. It will be something like a portable datalogger equipped with GPS. Data is stored on an MMS card. Presently busy with FAT code. How does your appartus look like?

    EDIT: It crossed my mind that if you have your readers data-pins, say D0, wire-ored together to generate an RB0-int, then read (in the int routine) readers ports and save them for processing, one could service 8 or even more RFID-readers. May-be even simultaneously if PIC is fast enough. In the int routine one only needs to shift some bits, that's all!
    This kind of approach seems to be used in commercial security systems.

    EDIT: Mistake in circuit - BUZ and LED are actually B-readers datapins D0 and D1 .
    Attached Images Attached Images  
    Attached Files Attached Files
    Last edited by Felch; - 19th August 2005 at 19:26.

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


    Did you find this post helpful? Yes | No

    Default

    Hi Allan,

    I am using PIC16F737 internal clock 8MHz, Card 1 is connected to RA6 and RA7, Cards 2, 3, and 4 are connected to PORTC<0:2,5:7>, and Cards 5,6,7,and 8
    are connected to PORTB. All 16 card pins 1K resistors pull up to 5V.

    I use the following code to determine which card has presented.

    MainLoop:
    CurrCard = 0
    ' Card reader 1
    CheckPortA:
    TempVar = PORTA
    if TempVar < $C0 then CurrCard = 1 : goto FoundCard

    ' Card readers 5, 6, 7, and 8
    CheckPortB:
    TempVar = PORTB
    if TempVar < $FF then
    if TempVar.0 = 0 then CurrCard = 5 : goto FoundCard
    if TempVar.1 = 0 then CurrCard = 5 : goto FoundCard
    if TempVar.2 = 0 then CurrCard = 6 : goto FoundCard
    if TempVar.3 = 0 then CurrCard = 6 : goto FoundCard
    if TempVar.4 = 0 then CurrCard = 7 : goto FoundCard
    if TempVar.5 = 0 then CurrCard = 7 : gosub FoundCard
    CurrCard = 8
    goto FoundCard
    endif

    ' Card readers 2, 3, and 4
    CheckPortC:
    TempVar = PORTC
    TempVar = TempVar & %11100111
    if TempVar < %11100111 then
    if TempVar.0 = 0 then CurrCard = 2 : goto FoundCard
    if TempVar.1 = 0 then CurrCard = 2 : goto FoundCard
    if TempVar.2 = 0 then CurrCard = 3 : goto FoundCard
    if TempVar.5 = 0 then CurrCard = 3 : goto FoundCard
    CurrCard = 4
    goto FoundCard
    endif

    goto Mainloop

    FoundCard:
    select case CurrCard
    Case 1: ' scan card 1
    ...
    end select
    ...
    goto Mainloop
    Yuantu Huang

  12. #12
    alind's Avatar
    alind Guest


    Did you find this post helpful? Yes | No

    Default

    Thanks Felch and Yuantu, looks like I have plenty to get started with now!
    Regards,
    ALlan

  13. #13
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default Pre-Programed PIC?

    Hey there,

    Felch,

    I have been reading this thread and am really interested in giving this project a try, the only problem is that I can't seem to sucessfully burn a PIC - I have tried almost every method possible and I was wondering - Could I buy a pre-programed PIC from you? I live in Canada and would of course pay for all shipping costs.

    Thanks,

    James.

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


    Did you find this post helpful? Yes | No

    Default

    Hi!
    Sure i could send you preprogrammed chip but is this really what you want? It could cost a lot...
    Wouldn't it be easier to fix your programmer? What device are you using and what errors does it generate?
    Anyway, if you still prefer a preprogrammed chip, send me your address. I will charge the cost of chip and nothing more. I guess that it is possible to send it with "receiver pays" option?

    rgds,
    /Felch

  15. #15
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default RE: Pre-Programmed Chip

    Felch,

    I don't know. I've never been good a programming - for any platform. I used to know a bit of Qbasic, but that's about it. Because I don't understand the language the code it written in, I have no idea where to look for errors. I didn't get any error messages when I burned your code onto a PIC, but it dosen't do anything when you power up the chip. I am a more electronically-minded person, I have no problems with the physical aspect such as wiring up the board, but software issues are simply beyond me. Below is what I did to burn the code onto a PIC16F628A using a JDM programmer:

    1. Saved code from your website as .asm file
    2. Opened "Pony Prog 2002" and opened the ASM file.
    3. Clicked "Write to Chip"
    4. Got the message "Write Sucessful"
    5. Wired up the chip with specified crystal, 22pF caps, Miniprox reader and powered it from +5V from my USB port.
    6. The reader powered up and completed the power-on self test.

    That's as far as I've gotten. I have playing around with MPlab, but it is ridicusly overcomplicated for me.

    Am I doing everything right? I have gone to all sorts of different websites and read tons of different beginner's guides to programming PICs but I still don't get it.

    Let me know if I am doing something wrong, and If I'm not then I'll just buy a chip from you. Do you have paypal?

    James.

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


    Did you find this post helpful? Yes | No

    Default

    Hi!
    It must be a PIC12F629, not 16f628! That's first. Then, After powering up the chip has no tasks, nor does it output anything. Only after you have presented a card (wiegand data arrives from reader to PIC), card number is output via serial port. Perhaps this helps?
    Let me know if it still does not work.

    /Felch

    PS. Do NOT forget to read PICc's internal calibration data and then burn it back. Otherwise serial comms speed would be incorrect! If programmer asks if it should use OSCAL from file or from chip, say use data from CHIP!

  17. #17
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default RE: Pre-Programmed PIC

    Yes, it sure would help if I used the right chip :-)... I think I'm loosing it! lol.

    I'll head on over to my parts supplier today and "PIC UP" the right chip.

    I had the PIC16F628A from an other similar project that never worked and I had though for some reason that you were using the same chip for this project - I really need to read things more closley.

    Which pins output the serial data? I tried pin 6 (I thought thats what it said in your code, But I wasn't sure) but didn't get any output. I just used an LED to try and detect output to make sure the circuit was working before thickining the soup by trying to connect to to my PC, yet. I did try presenting a standard Weigand Prox card with with no luck.

    How do you read the calibration data?

    Sorry to have to ask so many questions, but I am very new to this.

    Thanks so much,

    James.

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


    Did you find this post helpful? Yes | No

    Default

    Hi!

    Serial string "ID xxxxxx" is output on GPIO0 if GPIO1 is at high level (enable pin). Taking GPIO1 low will disable output. Output speed is 4800 bd.
    If you mix up D0 and D1, data will still be output but card number will be wrong.

    I have the same code working at 16F628 too. It really requires only minimal changes.

    I will "release" a newer version on reader code now (should be attached). Late program had problems with certain types of readers: it did not read anything. Present code fixes it. One more bug is fixed.

    About OSCCAL (calibration data). My serial output (bit-banging) routine (actually not mine, I guess mr. Myke Predko wrote it) relies on chips internal oscillator. It's frequency must be exactly 4MHz or receiving computer will fail to read stream. Microchip has made PIC's internal osc's frequency adjustable by means of changing one conf byte - the OSCCAL. It has been set in factory to some (correct) value. When you burn chip, it will get a new value from the .HEX file. This must be avoided. I am not sure about PonyProg but most PIC programmers now about that trick and ask user for the right value. Programmer can read it from chip and then, after burning code, restore it.

    Happy PICing!
    /Felch
    Attached Files Attached Files
    Last edited by Felch; - 27th October 2005 at 18:03.

  19. #19
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default Pic

    Thanks,

    I think I'm starting to get a better grasp on how this works.

    When you say that GPIO1 (pin 7) must be high, you just mean not connected to ground, right? Or does it have to be connected to +5V?

    Thanks for the updated code, I really appreciate it.

    I don't know what the frequency of the chip that I have is, I've uploaded and downloaded from it countless times, but I don't know if it's ever actually done anything. Can I just use an external Xtal? I have a bang-on 4.000 Mhz one right here.

    Thanks again,

    James.

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


    Did you find this post helpful? Yes | No

    Default

    GPIO1 must be connected to +5V, preferably via 1k resistor. Since there is an internal pull-up resistor in PIC, you may also leave this pin floating. You can comment checking this pin out from code if you don't need it. My application needed disabling reader.
    Likewise you may change code to implement external xtal oscillator. X-tal can be connected to GPIO5&4 only but since GPIO3 and 2 are free, you can do this. You will need a pull-up for GPIO3 (it does not have internal one.

  21. #21
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default Pin-Outs

    Ok, I think I understand the method to the madness, but...

    One thing I don't understand and haven't been able to get any info about on the net is which pins on the PIC the GPIO pins are - are they the RA or the RB pins, and is the numbering the same?

    My other question is... why is the oscilator not connected to pins 15 & 16? I though that since those were the "OSC" inputs on a PIC, that they were the only pins that you could attach a Xtal to. And to recap quickly, it's supposed to be running @ 4.000Mhz, right?

    Thanks again,

    James.

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


    Did you find this post helpful? Yes | No

    Default

    PIC16F628 has 16 i/o pins which are divided into 2 groups - ports. They are PORTA and PORTB. naturally they have different pin numbers! Powerful PICs have more ports (18f452 up to PORTE). PIC12F629 has only 6 pins and they are named GPIO0...GPIO5.
    Abbout xtal connection: what code are you talking about? proximity.asm works on pic12f629 which does not have pins 15 and 16!? And the code relies on internal oscillator, no xtal!
    dbl_rdr on the other hand works on 16f628 (or analogous). There xtal must be connected to pins 15&16. If u use other chip, pin numbers will be different. Of course xtal can be connested only to dedicated pins. That's true with every microcontroller.

    Proximity.asm runs at 4MHz.

  23. #23
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default Wiegand-To-RS-232 Adapter

    Ok, I think I get it now.

    I am going to head over to my parts supplier tommorow and pick up a PIC12F629.

    When I get the chip, I'm supposed to get the OSCAL value by doing an upload from the chip and then choosing to use the value from the chip, right?

    Then, once I get "proximity.asm" loaded onto the chip, the pin connections should go as follows:

    Pin 1: +5V DC
    Pin 2: Prox reader "Data 0"
    Pin 3: Prox reader "Data 1"
    Pin 4: No Connection
    Pin 5: No Connection
    Pin 6: No Connection / +5V
    Pin 7: RS-232 Data out
    Pin 8: Ground

    No crystal is needed as the oscillation is taken care of by the internal oscillator.

    Is this correct? :-)

    Thanks again,

    James.

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


    Did you find this post helpful? Yes | No

    Default

    Yep. That's correct.

  25. #25
    jmaloway's Avatar
    jmaloway Guest


    Did you find this post helpful? Yes | No

    Default What software do you use?

    Felch,

    I went out today and got the PIC12F629 - but I have one question before I do anything... what programmer and software do you use to burn PICs? I was using Ponyprog 2000, but I have also tried IC-Prog which seems to have a much wider range of devices which it can program. Whenever you go to program a device, there are a multitude of options that you can choose, I beleive they are all for the oscillator. Which one should I use?

    Thanks again,

    James.

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


    Did you find this post helpful? Yes | No

    Default

    What do you mean with options? WDT, OSC? If so, they are processors config options, correct values should be read from the .HEX file. Anyway, switch WDT off, OSC to INTRCIO and MCLR off.
    I use a programmer from www.kitsrus.com -> KIT128. Extremely reliable device!!!
    I made it myself, pcb drawings and PIC code files are given. IC-prog is also goodbut serial port programmers usually do not work. Not enough power from modern ports. Use PPwin if you have to.

  27. #27
    fdmourao's Avatar
    fdmourao Guest


    Did you find this post helpful? Yes | No

    Default RS232 to Wiegand

    Hi,
    I'm a newbie working with PIC's, but I'm trying to develop a converter from a RS232 signal to a Wiegand 26 bit's.
    Can somebody help me to know where can I start from? What PIC will I choose? Is the code shown on this thread to do the inverse conversion a good starting point?

    Thanx in advance.

    Francisco

  28. #28
    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

  29. #29
    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

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by fdmourao
    Hi,
    I'm a newbie working with PIC's, but I'm trying to develop a converter from a RS232 signal to a Wiegand 26 bit's.
    Can somebody help me to know where can I start from?...
    Francisco
    Hi!
    This piece of code sends contence of databuf to PIC's pins in pseudowiegand format. Hope it helps. (Comments translated to english, i do not expect you to understand estonian....)
    http://parsek.yf.ttu.ee/~felc/wiegand.asm

  31. #31
    markocosic's Avatar
    markocosic Guest


    Did you find this post helpful? Yes | No

    Default

    Hi!

    I'm trying to read RFID tags using an HID Corp reader (the OEM150), store the ID numbers of the RIFD tags that get read (up to 12 of them) on the microcontroller, transmit the ID numbers of the RFID tags in memory via 'one-way-RS232' to another device then reset the reader ready to scan more RFID tags. The device doesn't need to 'scan' and 'transmit' at the same time.

    (its something to be used on a 'treasure hunt' of sorts and needs to communicate via RS232)

    Would a PIC12F629 be able to do this? Could your code be adapted? I'm a mechanical engineer that knows enough about PICs to flash LEDs but that's about the limit at the moment!

    Thanks,

    Marko

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


    Did you find this post helpful? Yes | No

    Default

    Yes, i guess that the code could be adapted. You only have to write a routine for storing numbers in EEPROM. Only thing that might get disturbing is PIC's oscillator frequency deviation due to temperature. It might affect RS232. Test it before hunting real treasures .)

  33. #33
    markocosic's Avatar
    markocosic Guest


    Did you find this post helpful? Yes | No

    Default

    Good warning on the temperature variation - a larger pic and external xtal (or something like a 16F88 with internal crystal/more acpability than is needed?) might be required.

    I don't suppose you could re-post the 12XXXX IC code could you (my email is mac65 <at> cam.ac.uk if you'd prefer to send it by mail) as the web-links above are broken.

    Thanks,

    --
    Marko (working his way through the PIC instruction sets as bed-time reading!)

  34. #34
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default Wiegand and distance

    Hi.

    I have found 2 samples of RFID Readers that have Wiegand and iButton format at the same time! Anyways, with their Control Panel they claim that readers can be 150 meters away.

    Did anyone try any circuit to interface such readers with a PIC, with more than a few cm cable? I'd like to put them away.

    I just hope that narrow pulses could travel through the long cabling.

    Ioannis

  35. #35
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Default Wiegand to RS232 interface

    Felch

    i have been reading this thread, and quite interest to build one, but the link you posted has been broken, can you post the proximity.asm again?

    can i have both asm and hex file for PIC12F629?

    Thanks!

    William
    Last edited by hkwkok; - 1st March 2007 at 07:22.

  36. #36
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    3,807


    Did you find this post helpful? Yes | No

    Default

    For me the link is OK.

    Here it is:

    ;================================================= ==============================
    ;******************** xmit some bytes from buffer to PORTB pins6,7 *************
    ;================================================= ==============================
    Send_Coins_1: movlw Puhver
    movwf FSR
    movf INDF,W ; read timeout value sent by host
    movwf temp
    movlw 0xFF
    movwf T2CON
    send_c_0: clrf TMR2
    bcf PIR1,TMR2IF
    send_c_1: btfss Nupp ; are we allowed to transmit wiegand ?
    goto send_c_2 ; yep!
    btfss PIR1,TMR2IF ; no, wait until allowed or timeout
    goto send_c_1
    decfsz temp
    goto send_c_0
    bcf PIR1,TMR2IF
    bcf T2CON,TMR2ON
    goto send_c_fail ; taimaut: ****ing off...
    send_c_2: bsf pank
    bcf TRISB,6 ; permission granted, switch port pins to outputs
    bcf TRISB,7
    bcf pank
    bsf Dat0B ; pins also, not only direction
    bsf Dat1B
    call taimer ; take a break
    incf FSR,F
    movf INDF,W
    movwf count ; read nr. of bytes to be transmitted
    send_c_3: incf FSR,F
    movf INDF,W
    movwf tomp1
    call xmit_wieg ; read byte form "Puhver" and xmit
    decfsz count
    goto send_c_3 ; until bored
    bsf pank
    bsf TRISB,6 ; Wiegand port B as input again
    bsf TRISB,7
    bcf pank
    bsf Dat0B
    bsf Dat1B
    send_c_fail: movlw HIGH main_15
    movwf PCLATH
    goto main_15 ; return to housekeeping tasks, restore PCLATH
    ;================================================= ==============================
    ; ******************** xmiting junk in wiegand format ************
    ;================================================= ==============================
    xmit_wieg: movlw .8 ; 8 bits/byte
    movwf tomp
    xmit_wieg_1: rlf tomp1,F
    btfss CARRY ; form impulse to which pin ?
    goto xmit_wieg_2
    bcf Dat1B
    goto xmit_wieg_3
    xmit_wieg_2: bcf Dat0B
    xmit_wieg_3: call taimer50uS ; output LOW for about 50uS
    call taimer50uS
    bsf Dat0B ; lend of pulse, outputs HIGH
    bsf Dat1B
    call taimer3mS ; 3 mS pause
    decfsz tomp ; repeat it 8x
    goto xmit_wieg_1
    return
    taimer3mS: movlw 0x0F
    movwf T2CON
    clrf TMR2
    bcf PIR1,TMR2IF
    goto taimer_1
    taimer50uS: movlw 0x04
    movwf T2CON
    movlw 0x82
    movwf TMR2
    bcf PIR1,TMR2IF
    goto taimer_1
    taimer: clrf TMR2
    movlw 0xFF
    movwf T2CON
    bcf PIR1,TMR2IF
    taimer_1: btfss PIR1,TMR2IF
    goto taimer_1
    bcf PIR1,TMR2IF
    bcf T2CON,TMR2ON
    return

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


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by hkwkok View Post
    Felch

    i have been reading this thread, and quite interest to build one, but the link you posted has been broken, can you post the proximity.asm again?
    Linkworks but may-be there are problems in some servers. Anyway here it is attached.
    I can't give hex file, this is not a complete project but only fragment of a larger one.
    About reading distance: i have used cables (CAT5) up to 20 meters without problems.
    Attached Files Attached Files

  38. #38
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Question wiegand

    Dear Felch,
    Sorry, i need the one is PROXIMITY.asm, which is you posted on 4th march 2005, and the link is http://parsek.yf.ttu.ee/~felc/proximity.asm still not working, is it complete project? if yes, can i have the hex file?
    By the way, how is James(jmaloway) done this project? I live in Canada too, can we share the experience?

    William

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


    Did you find this post helpful? Yes | No

    Default

    Hi!
    Understood you wrong.
    Yes, proximity reader is a stand-alone device. Here's the complete project (MPLAB).
    Attached Files Attached Files

  40. #40
    Join Date
    Mar 2007
    Posts
    6


    Did you find this post helpful? Yes | No

    Thumbs up wiegand to rs232 convertion

    Fekch,
    Thanks for your files, actually i using the HID ProxPoint Plus reader(wiegand format), i want to convert it to rs232 format, because i have a lot of used proxkey on hand, but can't see the card number, can i use the Windows' HyperTerminal to retrieve the number?

    And my last question is the pin connection of PIC12F629 as below?
    Pin 1: +5V DC
    Pin 2: Prox reader "Data 0"
    Pin 3: Prox reader "Data 1"
    Pin 4: No Connection
    Pin 5: No Connection
    Pin 6: No Connection / +5V
    Pin 7: RS-232 Data out
    Pin 8: Ground

    No crystal is needed as the oscillation is taken care of by the internal oscillator.


    Thanks Again! i hope the project above can be done my work.


    Wiliam

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