This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

LPC 1768 External pulse counting

I want to count external pulses on my LPC 1768 board using any of the 4 Timer/Counters. I am configuring all teh registers but its working in timer mode only but not taking input pulse on one of the capture input. can any body give working code for this.

Regards,

vinay

Parents
  • What part of the instructions on how to post source code didn't you understand?

    Does your code look like:

    #include <stdio.h>
    
    void main(void) {
        printf("Hello world!\n");
        while (1) ;
    }
    

    "PIN SELECT FOR CAP0.0"

    "PIN"? Do your processor have a pin named "PIN"? What was the reason you didn't write P1.26 so it is possible to look at the schematic and know which pin the pulse should be connected to?

    Have you verified the state of the CAP0.0 pin? Is it stable or floating? The chip samples the pin on every PCLK to try to figure out if it sees a flank or if the pin istatic high or static low.

Reply
  • What part of the instructions on how to post source code didn't you understand?

    Does your code look like:

    #include <stdio.h>
    
    void main(void) {
        printf("Hello world!\n");
        while (1) ;
    }
    

    "PIN SELECT FOR CAP0.0"

    "PIN"? Do your processor have a pin named "PIN"? What was the reason you didn't write P1.26 so it is possible to look at the schematic and know which pin the pulse should be connected to?

    Have you verified the state of the CAP0.0 pin? Is it stable or floating? The chip samples the pin on every PCLK to try to figure out if it sees a flank or if the pin istatic high or static low.

Children