MicroC and 8051 pin input

From: Blaketheturtle (blaketheturtle_at_yahoo.com)
Date: 11/24/04


Date: 24 Nov 2004 13:55:23 -0800

Hi. I'm trying to count the number of times P3.3 on the 8051 goes low.
The C code I've generated doesn't give me any errors but it isn't
working either. Can any of you offer some pointers? The code is as
follows:

#include <8051io.h>
#include <8051bit.h> /* Bit set/clear macros */
#include <8051reg.h>

main() {
  int i
  i = 0;
  InitLCD();
  for(;;)
  {
          setbit(P3.0);
          
          if(!(P3 & 0xCD))
          {
            WriteLCD( "*" );
            delay(2000);
            i++;
          }
  }
}

Thanks a lot,
Blake