Jump to content


  • Content Count

  • Joined

  • Last visited

About BDIs

  • Rank
    Noob Class

Profile Information

  • Location
    Boston Ma
  1. I had started with P1.0, with no luck so i went to P1.6 to see if that would work...I was trying to get confirmation that the main body of my code was ok. It appears that it is at least close as I can get close to the expected output on P1.6. It makes sense that i would not be getting the expected output on P1.0 if there is no TimerA connection to it. I am thinking a loop with the pw and pi variables turning on and off the P1.0 LED.
  2. Rob, Thanks for your response. I have added to my code and seem to have moved forward a bit. I am unable to get the P1.0 to operate as expected, for some reason the P1.6 (green onboard LED) seems to work (unfortunately with a lot of flicker). I am not sure why the red LED (P1.0) is not responding. Any thoughts? #include <msp430g2553.h> /* * main.c */ int main(void) { unsigned int ADCval, pw, pi; //unsigned char is type of unsigned 8 bit variable. WDTCTL = WDTPW + WDTHOLD; // Stop watchdog timer. ADC10CTL1 = INCH_4 + ADC10DIV_7; ADC10CTL0 = ADC10SHT_3 + ADC10ON; //Set
  3. I am working a simple code to allow the "brightness" of the onboard LED P1 to follow a varying input voltage from 0-3.6v. I have the code to the the point that I can see the ADC10MEM register change state, I am hung up on translating the input to the output for the LED. any help would be greatly appreciated. My code below... #include <msp430.h> int main(void) { volatile unsigned int ADCval, pw, pi; WDTCTL = WDTPW + WDTHOLD; // Stop Watch Dog Timer P1DIR |= 0x01; ADC10CTL0 = ADC10SHT_3 + ADC10ON; // Set sampling time, turn on ADC10 ADC10CTL1 = INCH_4 + ADC10DIV_7; //ADC10CTL0 |= ENC
  • Create New...