I have two square waveforms coming out of a pin each. I want to measure the delay between them. Which command should I use? How can I do this?
I have two square waveforms coming out of a pin each. I want to measure the delay between them. Which command should I use? How can I do this?
Attach oscilloscope or logical analyzer to both PINs and then see time difference directly on time axis.
Oh yes ... But I want the microcontroller itself to measure this delay between waves. It is possible? How can I do it? And which command should I use?
Why would you do it? Even if MCU would do this for you there will be jitter caused by clock cycles needed to perform the instructions so it will be inaccurate. And what kind of "command" you expect? You think that ARM Cortex-M MCU worth 1~2USD in big volumes is running some fancy OS which allows you to communicate with it in "commands"?:) To do ANYTHING with such deeply embedded system YOU need to develop FW (it's kind of misleading to speak about OS;), load it to it and then use interfaces and protocols you've implemented in your FW source code.
Are you using nRF51?
Yes!! I wanted to see some example code that measured the delay between two square waves. I do not know how to do this. Could you help me please?!