Help me to use Capture mode of LPC2103

Status
Not open for further replies.

quocviet.dtvt

Newbie level 1
Joined
Sep 3, 2014
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
8
Hi Bro,

I'm a stater LPC2103, i try to use Capture mode of LPC2103, I hope the value of T0CR0 register increase at every rising edge at CAP0.0 (P0.2 Pin), My code below:

PINSEL0 |= 0x00000020; // CAP0.0
T0TCR = 0x02; // Reset TC and PC
T0CTCR = 0x01; // TC inscrease at rising edge and chose pin CAP0.0
T0CCR = 0x0001;
T0TCR = 0x01; // Enable TC and PC

Uart0_Print_Str("\r\n/T0CTCR:/\n");
Uart0_Print_Var(T0CTCR);
for (i=1;i<5000;i++)
{
Uart0_Print_Str("\r\n/counter:\n");
Uart0_Print_Var(T0CR0);
}

but the value of T0CR0 always equal zero :3 Pro can help me, please!

Best Regards
Q.Viet
 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…