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.

MSP430G2 Comparator_A+

Other Parts Discussed in Thread: MSP430G2452

Hello,

I have an issue in slow reaction time of Comparator_A+, so I be happy for some answers. Reaction time is between 15 - 10 us and this  is  too much for my application. I`m using MSP430G2542 microcontroller. 

This is code that I use: 

int main(void) {


WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer
P1DIR |= 0x01; // Set P1.0 to output direction

CACTL1 = CAON + CARSEL + CAREF0;
CACTL2 = P2CA4 + CAF; //input V+ i P1.1 with output filter

for(;;) {

if(CACTL2 & CAOUT)
{
P1OUT |= 0x01;

}else

{
P1OUT &= ~0x01;
}
}

Thanks, ŽM

**Attention** This is a public forum