Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Help me to use Capture mode of LPC2103

Status
Not open for further replies.

quocviet.dtvt

Newbie level 1
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

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top