This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <msp430.h> | |
unsigned int voltage[4]; | |
int main(void) { | |
WDTCTL = WDTPW + WDTHOLD; // Stop WDT | |
P6SEL = BIT1; // P6.1 ADC option select | |
// P1DIR |= BIT0; // P1.0 output | |
ADC12CTL0 = ADC12SHT02 + ADC12ON; // Sampling time, ADC12 on | |
ADC12CTL1 = ADC12SHP; // Use sampling timer |