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.

MSP432 COMP C1.0 input at Vcc

I'm trying to configure and MSP432 launchpad to use COMP to compare two separate signals.

the problem I have is (P6.7)C1.0 remains at Vcc while (P6.6)C1.1 is adjustable

the circuit for (P6.7)C1.0 is terminated by a 100K to GND to remove any parasitic charge, then to a 10Microfarad cap to

decouple the DC, allowing the AC pulse to pass.  

C1.1 is a 10K POT to vary the level between VCC and GND

I also use (P7.2) C1out to detect a change

currently using CCS 6.1.3

When I measure the inputs C1.0 remains at VCC. I used the Circuit diagram in the specs, but believe the power reference

is somehow still connected causing the input C1.0 to have a Vcc voltage.

#include "msp.h"

volatile unsigned int i;

int main(void)
{
    WDTCTL = WDTPW | WDTHOLD;                 // Stop WDT

// ===========================================================
// GPIO Setup
// ===========================================================

P1DIR |= BIT0;  // output led

//  COMP-1 inputs / C1OUT puts
    P6SELC |= BIT6 | BIT7;       // Configure P6.7=C1.0  P6.6=C1.1
    P7DIR  |= BIT2;              // C1OUT set Dir
    P7SEL0 |= BIT2;              // C1OUT follow input level of COMP1

// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//  COMP1  trip the Photo Beam
// $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    CE1CTL0 = CEIMEN | COMP_E_CTL0_IMSEL_1| CEIPEN | COMP_E_CTL0_IPSEL_0;  // Enable V+ & V-

    CE1CTL1 = CEPWRMD_1;                     // normal power mode
    CE1CTL3 = 0xFFFC;                        // disable all ports except 0 & 1
    CE1CTL1 |= CEON;                         // Turn On Comparator_E


    // #7=COMP1
    NVIC_ISER0 |= INTISR7;
    __no_operation();             // For debugger
    __enable_interrupt();



    while (1)
    {
            for (i = 20000; i > 0; i--);          // kill some time
            P1OUT &= ~BIT0;  // CLR led
      }
}

void COMP_E1_IRQHandler(void)
{
    P1OUT |= BIT0;  // on board RED led

    CE1IV = 0x00000000;                          // clr COMP-1 INT
    CE1INT &= ~(0x0013);                         //
    __no_operation();                             // For debugger
}

  • Roman,
    In the future, please use the code formatting tool when posting source code (it looks like a button with "</>" in it in the rich formatting editor). I've done it for you this time to make it more readable :-)

    Can you please post your schematic?

    I can't find the one in the User's Guide that resembles what you are describing. It seems like you are trying to measure the AC component of Vcc?
  •  Hello Cameron

    thanks for the quick response, I typically use the forum as a help guide and typically I find many of my questions answered by others who previously had a problem.

    In this case I could not find and assistance ( sorry for the formatting error, Don't really send messages )

    Below is the schematic of the circuit I'm connecting to the MSP432 at C1.0, I currently measuring a constant level of VCC, it should be at GND level as the resistor value is 100K, to remove any parasitic charge at the input. 

    I used a variable resistor at C1.1 (V- of OP-AMP)  to control the voltage, so I can set my own trigger level point. When the light beam is broken at the phototransistor, this will create a pulse. and with the Variable resistor I can control when to trigger depending on pulse height.

    By the COMP_E diagram

    it appears I'm still getting the VCC from (See RED LINE) voltage generator (CERSEL)

    CE1CTL2   CEREFL (14~13) is set to 00b ( Reference amplifier is disabled ), but I get a voltage V+ input.

  • Found my problem

    P6.7 blow port, did a simple test by configure the port for P6.7 as and output then toggled the port between 1 & 0,  1= 3.0v while a 0=1.2V

    confirmed a blow port


    Thanks for responding Cameron.

    Lucky for me I have another MSP432, I always get a few extra units just in case.

  • Roman,
    No problem on the formatting, it just gets faster responses when you use t :-)

    Good to hear you found the issue. Do you know how the port became blown?

    (I always have extra parts on hand for my design too :) )

**Attention** This is a public forum