Wiegand has very short pulses of the order of 50uSec. PBP interrupts or DT-INTS need a very fast say 40MHz controller to catch these pulses.
I had found a reader that happened to be slower, I mean the low going pulses were over 175uSec. But that is not the case always.
Darrel had helped me alot to reduce the latency of the Intterupts but was not possible to catch the 50uS at 4 or 8MHz system clock.
I used another method in a tight loop and was able to work at 4MHz clock.
IoannisCode:mainloop: if d0=0 then 'Wiegand D0 line read array[index]=0 'at 4MHz reads 50usec pulses! index=index+1 'Increment array index while d0=0:wend 'Wait for D0 line to go high endif if d1=0 then 'Eiegand D1 line read array[index]=1 index=index+1 while d1=0:wend endif if index=26 then convert 'If 26 bits read, convert to ASCII goto mainloop




Bookmarks