Page 1 of 1

5213 external pulse width measurment

Posted: Sat May 26, 2012 6:40 pm
by ahbushnell
Hi, I would like to measure a pulse width on an external pin. This will be between 500 us and 10 ms. It looks like the GPT can do this but I'm having a hard time figuring out how to set it up.

Andy

Re: 5213 external pulse width measurment

Posted: Tue May 29, 2012 9:24 am
by pbreed
The GPT Timer is aonly a 16 bit time, so one has to keep track of roll over...
The DMA timers are 32 bit timers and are probably better for this.

Basic operation is set up the timer to run, then capture both edges and look at the capture times.

Paul