Hi Tom,
The RFID module that I use works at Low freq 125kHz, I have the hardware board that receives the data through its antenna. The hardware is a whole different section, ultimately the serial data which I get from that hardware module is a sequence of pulses (Manchester, bi-phase signals). You can get better details about the hardware if you search for EMDB409 development board, the link to the module is: http://www.emmicroelectronic.com/products/rf-identification-security/rfid-tools-support/emdb409
As there aren't any proper datasheet to explain the firmware application that I'm trying to do.
I didn't mention much about the module because I felt my aim is not much related to any of the module information and is more of a generalized task of reading serial data at regular intervals of time.
My aim is to read the serial data at equal intervals of time(every 8usecs) and store in a buffer for further data processing. I can read it once I detect the first rising edge such that, after I detect the first rising edge, I will start reading data at an equal interval of time(8usec, I was just trying for 4usec to make the code more efficient).
Problem with my code is the digitalRead() function has an internal delay of ~4usec due to which I'm not able to read the data at exactly 8usecs every time and end up with a few error bits.
Also, I tried using INTERRUPT RISING function and I still have the same bit errors which are obviously due to digitalRead() delay, can I do any other way to minimize that delay further, I even used port manipulation but it's not much of help either.