MicroC and 8051 pin input
From: Blaketheturtle (blaketheturtle_at_yahoo.com)
Date: 11/24/04
- Next message: Ghazan Haider: "Re: Cisco router emulation possible?"
- Previous message: Oliver Betz: "Re: PC Lint vs. splint"
- Next in thread: Steve Taylor: "Re: MicroC and 8051 pin input"
- Reply: Steve Taylor: "Re: MicroC and 8051 pin input"
- Reply: Bob Stephens: "Re: MicroC and 8051 pin input"
- Reply: Frank Bemelman: "Re: MicroC and 8051 pin input"
- Reply: Michael R. Kesti: "Re: MicroC and 8051 pin input"
- Reply: Dave: "Re: MicroC and 8051 pin input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Ghazan Haider: "Re: Cisco router emulation possible?"
- Previous message: Oliver Betz: "Re: PC Lint vs. splint"
- Next in thread: Steve Taylor: "Re: MicroC and 8051 pin input"
- Reply: Steve Taylor: "Re: MicroC and 8051 pin input"
- Reply: Bob Stephens: "Re: MicroC and 8051 pin input"
- Reply: Frank Bemelman: "Re: MicroC and 8051 pin input"
- Reply: Michael R. Kesti: "Re: MicroC and 8051 pin input"
- Reply: Dave: "Re: MicroC and 8051 pin input"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]