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.

consumption msp430g2553

Other Parts Discussed in Thread: MSP430G2553

Hi, I am using the msp430g2553 in LPM3 and ADC10 consumption mode but I have too high. Without the ADC10 I have only ~ 1.5uA and activating the ADC10 ~ 600uA passes. ADC10 inputs are both analog inputs of a switch. I use the next code:

#include <msp430.h>
// Timer example with Low Power Mode

#define ONE_SECOND 511

void delay(unsigned long d) {
unsigned long i;
for (i = 0; i < d; i++);
}

void init(void) {
unsigned int valores_pines[2];
// Stop watchdog timer to prevent time out reset
WDTCTL = WDTPW + WDTHOLD;

P1DIR = BIT0 + BIT6; // Set P1.0 P1.6 to output direction
P1OUT = BIT1 + BIT2;

P1REN |= BIT1 + BIT2;
P1IE |= BIT1 + BIT2; // P1.3 interrupt enabled
P1IES |= BIT1 + BIT2; // P1.3 Hi/lo edge
P1IFG &= BIT1 + BIT2; // P1.3 IFG cleared


ADC10CTL0 = SREF_0 + ADC10SHT_2 + MSC + REFON + ADC10ON + ADC10IE;
ADC10CTL1 = INCH_3 + CONSEQ_1; // A2 y A1 (2 canales: 2 y 1), 1 lectura multicanal
ADC10AE0 = 0x1F; // P1.1 y P1.2
ADC10DTC1 = 0x2; // 2 conversiones

ADC10CTL0 &= ~ENC;
while (ADC10CTL1 & BUSY); // Wait si el ADC10 core esta activo/ocupado
ADC10SA = (int)valores_pines; // Data buffer
ADC10CTL0 |= ENC + ADC10SC; // Lanza el sampleo y la conversion

// ADC10CTL0 ^= ENC;
// P1OUT = 0x00;
// P1DIR = 0xFF;

// Set up 32768Hz crystal
BCSCTL1 |= DIVA_3; // divide by 8
BCSCTL3 |= XCAP_3; // select 12pF caps

// initialize Timer0_A
TA0CCR0 = 120 * ONE_SECOND; // set up terminal count for 10s
TA0CTL = TASSEL_1 + ID_3 + MC_1; // configure and start timer

// enable interrupts
TA0CCTL0 |= 0x0010; // set CCIE bit

__enable_interrupt(); // set GIE in SR
LPM3; // select low power mode 3
}

#pragma vector = TIMER0_A0_VECTOR
__interrupt void myTimerISR(void) {
TA0CCR0 = 120*ONE_SECOND;
P1OUT ^= 0x01;
delay(10000); // flash LED1 for 100ms
P1OUT ^= 0x01;
}
#pragma vector=PORT1_VECTOR
__interrupt void Port_1(void) { //INTERRUPCION CAMBIO SELECTOR
P1OUT ^= 0x01; // P1.0 = toggle
P1IFG &= ~(BIT1 + BIT2); // P1.3 IFG cleared
P1IES ^= BIT1 + BIT2; // Toggle the interrupt edge,
}

void main(void) {

init();

}

**Attention** This is a public forum