Hi all,
I am working with the MSP430 eZ430-RF2500. I am new to the products and I'm not very savy with it. What I am trying to do is to use the original "sensor monitor source code v1.5 with IAR" and edit it to instead of reading the temperature, read a voltage from a passive CT and transmit that data back to the Access point. So, what i have done is set access points and end devices with not to much trouble. Now i am trying to enable an input pin that can be used for my devices and that is where the problem is encountered. I want to use A1 input and am using the code as follows
P2DIR = 0 ; // I can see from page 60 of the msp2274 pdf that these pins have to be reconfigured in order to bias the gates
P2REN |= 0 ;
P2OUT = 0;
"other source code"
ADC10AE0 |= 0x02 ; // enable for the pin selects
ADC10CTL1 = INCH_1; // This is to call my input pin
ADC10CTL0 = SREF_1 + ADC10SHT_3 + REFON + ADC10ON + ADC10IE + ADC10SR;
__delay_cycles(350);
ADC10CTL0 |= ENC + ADC10SC;
__bis_SR_register(LPM0_bits + GIE);
results[0] = ADC10MEM;
ADC10CTL0 &= ~ENC;
So, what is my problem with the code? Any help would be greatly appreciated.