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.

Question on MSP430G2213

Other Parts Discussed in Thread: MSP430G2213

Customer question on a MSP430G2213 detail -

I'm using the comparator with the output going to P1.3/CAOUT to trigger some external hardware.  I also want to time the comparator.  I see the timer output connects to Timer_A CCI1B, correct?  If I set up Timer1_A3 CCR1 to capture edges on CCI1B it looks like the comparator output will also appear on that pin (p2.2) - is that correct?  I thought I could connect the comparator output direct to the timer without a pin, but maybe not?

Thank you !

 

Mike

  • ... I'm using the comparator with the output going to P1.3/CAOUT to trigger some external hardware...

    Yes you could. I means you are going to use Timer0 CCR0 output in the compare mode to do that.

    ... I also want to time the comparator ...

    Using the "Timer" on the same MSP to "time" what it generates does not make any sense.You may want to use an oscilloscope or something like that to "time" it instead.

    ... I see the timer output connects to Timer_A CCI1B, correct?...

    You mean Timer0 CCR0 input. But it is already used in compare mode. It cannot be used in the capture mode at the same time.

    ... If I set up Timer1_A3 CCR1 to capture edges on CCI1B it looks like the comparator output will also appear on that pin (p2.2) - is that correct? ..

    You cannot use Timer1 CCR1 in capture mode and compare mode at the same time. If it is in capture mode, it will capture P2.2 as an input. If you use it in compare mode, it will use P2.2 as an output.

    ... I thought I could connect the comparator output direct to the timer without a pin, but maybe not? ...

    The comparator output is part of the timer.

  • old_cow_yellow said:
    The comparator output is part of the timer.

    I guess he's talking about the Comparator_A+ and not the timer compare feature.

  • Michael,

    JMG is right, I misunderstood your questions. Please ignore my previous reply.

    OCY

  • Hi ,

    Ignore which portion of the reply? It's not clear to me. Sorry.

     

    Mike

  • Please ignore that entire reply. Here are my new answers.

    Q: ... I'm using the comparator with the output going to P1.3/CAOUT to trigger some external hardware. I also want to time the comparator. I see the timer output connects to Timer_A CCI1B, correct? ...

    A: There are two Timers (called Timer0 and Timer1), CAOUT is connected internally to Timer0_A3 CCI1B.
     
    Q: ... If I set up Timer1_A3 CCR1 to capture edges on CCI1B it looks like the comparator output will also appear on that pin (p2.2) - is that correct? …

    A: No. Only CCR1 of Timer0 (not 1) can be set up to capture edges on CAOUT with CCI1B.  There is no additional output at P2.2 or any other pin.

    Q: ... I thought I could connect the comparator output direct to the timer without a pin, but maybe not? ...

    A: Yes, it can be connected to Timer0_A3 CCR1 internally without a pin.

  • Hello!

     

    Two follow up questions from the customer:

    1) In GRACE (built into CCS version) list a selection "P2.2/CCI1B" as an input capture option for Timer1_A3 CCR1.   Does the comparator connect here?

    2) Do I need to make other selections to use this timer to capture comparator output? (the option in Grace lists P2.2 AND CCI1B so do I pick one or the other somewhere else in Grace)

     

    Thank you !

    Mike

  • I do not use GRACE or CCS. Could someone else answer the question?

  • Michael Johnson89079 said:
    In GRACE (built into CCS version) list a selection "P2.2/CCI1B" as an input capture option for Timer1_A3 CCR1.   Does the comparator connect here?

    Well, my device datasheet lists P2.2 TA1.1 (Timer1_A capture CCI1B input, compare: Out1 output) for this pin. The comparator is not mentioned, so I have no reason to assume that the comparator output is connected to this pin.

    You can connect any digital signal you want on this pin for capture input, including the comparator output, taken from another pin, e.g. P1.3, P1.7 or P3.7. But it is not done internally.

**Attention** This is a public forum