EV Logger
A MSP430 based datalogger for an electric vehicle
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
ADC

Functions

void adc_init (volatile SampleBuffer *sb)
 Set up the ADC clock and configure resolution, then enable the ADC unit. More...
 
void adc_convert (void)
 Enable DMA on channel 0 which will move data to the sample buffer after the ADC conversion run has completed, then begin the conversion run.
 

Detailed Description

Function Documentation

void adc_init ( volatile SampleBuffer *  sb)

Set up the ADC clock and configure resolution, then enable the ADC unit.

Configure the memory channels to physical inputs. Configure the DMA unit on DMA channel 0 to automatically move data from the ADC conversion memory into the sample buffer at the end of each conversion run.

Parameters
sbA pointer to the sample buffer into which we will put ADC readings.