Jump to content
43oh

aaguilar4

Members
  • Content Count

    11
  • Joined

  • Last visited

Reputation Activity

  1. Like
    aaguilar4 reacted to gwdeveloper in ADC10 Using Data Transfer Controller   
    I use the DTC for almost all of my ADC conversions on the Launchpad.
     
    If you have it setup following the demo codes. Just make a few changes for easy access to the data.
     
    Declare a global like: (replace 32 with how many samples you're taking; 4 channels x 1 sample = 4 total)

    volatile int ADCdata[32];
    And in your ADC10 setup change ADC10SA like:

    ADC10SA = (unsigned int)ADCdata;
    And ADCDTC1 for the number of transfers to make:

    ADC10DTC1 = 32;
    And as an example (here my program samples 1 channel 32 times and then averages them)

    thermistor = 0; for (i=0; i < 32; i++) { thermistor += ADCdata[i]; } thermistor /= 32;
    You won't need the ADC10 to interrupt anymore if you're set the DTC for continuous.
  2. Like
    aaguilar4 reacted to RobG in 24V input   
    Simple resistor divider should be sufficient, most of MSP's inputs are Schmitt triggers. You may want to add Zener just for safety. The maximum pin voltage is VCC + 0.3 V, so for LP it would be 3.6-3.9V.
×
×
  • Create New...