This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430L092: INCOMING SIGNAL INTERVAL WITH TIMERS

Part Number: MSP430L092
Other Parts Discussed in Thread: ENERGIA

I want to measure time interval between two signal thanks to timer registers for msp430l092 microcontroller. I have checked msp430l092 user guide and examples for timers but I didn't understand exactly. Can someone help me about it?

  • What kind of signal? Rising/falling edge? On the same signal line?
  • I am going to use photodiode sensor. I intend to send three signal with a specific time interval. I measured time interval with millis() function on arduino but I need to pass IAR Embedded Workbench instead of Energia. How can I do this?
  • Two signals or three signals? Which edge(s) are you interested in?
  • There is no metter number of signals. I want to use more than two signals. I am interested in rising edge of input signal. "The capture mode is selected when CAP = 1. Capture mode is used to record time events. It can be used for speed computations or time measurements. The capture inputs CCIxA and CCIxB are connected to external pins or internal signals and are selected with the CCIS bits. The CM bits select the capture edge of the input signal as rising, falling, or both. A capture occurs on the selected edge of the input signal." It is written inside msp430x09x family user guide page 144. I want to measure time interval between signals.How can I do this with capture mode registers? Can you give me some code suggestions?
  • Program the timer for continuous mode.
    Program one CCR to capture on the rising edge.
    In the CCR interrupt handler, read the CCR register (which contains the time stamp of the event). You can then subtract the time stamps from each other.

**Attention** This is a public forum