Now im doin a reader to output capasitance button press and detect card wiegand by using PIC16F727.
Basically the code is detect the wiegand card by using PORTB interrupt(D0 & D1),
and also using the same line to output the data (D0 & D1).
And the D0 and D1 also send out button press data.
I set DO & D1 as input to check PORTB interrupt, when need to send data set D0 and D1 to output, after send set back to input.
But when I swap the card, it is not stable, some times will trigger the Timer 0 and detect a button press.
After that, then the MCU cannot output any button press. But the MCU still will run the main loop.
And I don’t know what cause the timer0 interrupt when I swap the card (Even i did not press the button).
It had no problem when I no need output the data.
Means I no need to set D0 and D1 output and input every time when I need to send data.
THANK YOU VERY MUCH