When I hit a wall, I copy just the specific logic on a 16F628, or whatever else you can run the debugger (I'm still on PBP 2.60c).
I read in values as they are read (doesn't have to be an actual RFID reader, as long as sequence of characters is the same).
Then I go line by line, check each variable, making sure they contain what I expect, that the logic flows as expected. This is the hard part in using other people's code.
If I can't figure it out using the debugger, I ditch the code and try another approach.
Robert
Bookmarks