MPC5643L signal length

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

MPC5643L signal length

662 Views
mateuszolsztyn
Contributor II

Hi all,

I'm using MPC5643L. I'd like to measure length of the signal. I want to connect switch to my mpc, press it, stop and see on my lcd in ms how long signal was high. How could I make it? Sorry for my english.
Thank you.

Mateusz

Labels (1)
Tags (1)
0 Kudos
1 Reply

558 Views
PetrS
NXP TechSupport
NXP TechSupport

Hi,

There could be several ways to achieve this. You can do a SW poll of the external pin and start/stop some internal timer upon high/low level detection. You can also connect a switch to pin which enable interrupt upon edge detection. Within such interrupt you can again start/stop internal timer.

You can also use the eTimer module in various modes, like Gated mode. In this mode you will count internal clock when external input is high (or low). Or you can use eTimer’s Capture feature to save value of internal counter at the time of external input high/low edge detection.

BR, Petr