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
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.
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
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
Hi!
Understood you wrong.
Yes, proximity reader is a stand-alone device. Here's the complete project (MPLAB).
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
Yes, this is correct pin-out. Pin 6 should be connected to +5 via some resistor (say, 1k). If grounded, output will be disabled.
Note that this code only handles 26-bit wiegand format. As much as i am aware, HID readers output 36 bits. In this case data will be rejected
I do have a combo lock project for 36-bit HID readers but try first this code. If it does not work, I'll publish the other one. Or- you have the source, you could modify it by yourself also. And estonian learn estonian via my commentsActually, it's good you probably do not understand it...bad style...
![]()
Felch,
I tested the code this afternoon, looks like that's not working, i use JDM PIC programmer with icpro105D to program the chip (PIC12f629). i put 1K resistor between pin 6 and +5V, also, measured the both input (data0, 1) and output (pin7) with oscilloscope, there are no signal from pin7 when i put the proxkey on HID reader (having beep sound from reader), i don't know is it the wiegand format problem?
I have experience on writing code for ATC89c51 and some AVR, but not PIC, can you post your combo lock project or do the code modification for me?
Thanx in advance.
William
Hi!
No, this project uses wiegand but circuit was from another code, that read magnetic stripe format. Actually i think it is possible to make the code autodetecting but...never tried it. Yet...
Yes, i found the asm file which indicated the GPIO5 connected to D0 and GPIO4 connected to D1, unfortunately, this project doesn't have the rs232 output to computer for card # display.
Anyway, i will try to modify the proximity.asm for 36bit wiegand, hopefully, i can make it work, but i need a lot of study.
Thanks,
William
Bookmarks