faster digitalRead()

I'm trying to get the data out from a digital caliper. The problem I have is that the the clock line operates at a frequency at about 16,5 kHz. It seems to be too fast for the digitalRead() function. Is there any possibility to make the function faster.
I've heard something about pin manipulating, but I can't find any information about how to read the inputs.

It would be nice if someone could help me.
Thanks, Andy

I've heard something about pin manipulating, but I can't find any information about how to read the inputs.

one can manipulate pins with direct port access commands.

http://www.arduino.cc/en/Reference/PortManipulation

Check out this article: NerdKits - Digital Calipers DRO
They show you how to interface a caliper, and even provide you the source code.
The code is not "Arduino" code, but "Real" AVR C/C++.
It does show you how to access the ports directly.

Thanks for your help.

I've updated my code with pin manipulating functions. It works quite well. But my data outputs are kind of fuzzy. There are several patterns which repeat themselves, but I can't figure out any data packets or any bitgroups.

Here is the code:

boolean lastreading = 1;
int datastring[800];
int i;


void setup() {
 
  DDRB = B11111100;   //Dataline is on portB the first bit, clock is the second bit (Arduino pins 8 and 9)
  
  Serial.begin(9600);
  Serial.println("");
  
}

void loop() {
    
  if ((PINB == B00000011 || PINB == B00000010) && (lastreading ==  B00000001 || lastreading == B00000000)){
       //if there is a rising edge on the clock line (in real it is a falling edge, but the level shift 
       //circuitry inverts it)
       //the "or" is for ignoring the dataline, I know this is a little bit complicated, but it works for now
    datastring[i] = PINB; 
    i++;
  }
 
  lastreading = PINB;
  
   
  if (i == 800){
       //it stores 800 bits til it plots them out (that should be enough for capturing data)
    Serial.println(micros()); 
    i = 0;
    for(int e = 0; e < 800; e++) {
      Serial.print(datastring[e]);
      Serial.print(" ");
    }
  }        
}