#include <msp430.h>Go to the source code of this file.
Macros | |
| #define | NUM_CHANNELS 3 |
| #define | referenceVoltage 2.5 |
| #define | adcMax 1023 |
Functions | |
| void | setupAdc () |
| Setup ADC, get called in startup from main(), Shortest samling rate, with 2.5V reference, no prdivider, setup channels and enable conversion interrupts. | |
| void | startAdcConv () |
| Start the ADC conversion'(s), gets called when end interrupt of ISR_TA0(void) is reached. | |
| double | convertAdc2Voltage (int R1, int R2, int adcReading) |
| Convert the adc reading to a voltage before voltage divider. | |
Variables | |
| volatile unsigned int | adcResults [NUM_CHANNELS] |
| #define adcMax 1023 |
Definition at line 17 of file adc.h.
Referenced by convertAdc2Voltage().
| #define referenceVoltage 2.5 |
Definition at line 16 of file adc.h.
Referenced by convertAdc2Voltage().
| double convertAdc2Voltage | ( | int | R1, |
| int | R2, | ||
| int | adcReading ) |
Convert the adc reading to a voltage before voltage divider.
Definition at line 132 of file adc.c.
References adcMax, and referenceVoltage.
Referenced by ADC10_ISR().
| void setupAdc | ( | ) |
Setup ADC, get called in startup from main(), Shortest samling rate, with 2.5V reference, no prdivider, setup channels and enable conversion interrupts.
Definition at line 86 of file adc.c.
Referenced by main().
| void startAdcConv | ( | ) |
Start the ADC conversion'(s), gets called when end interrupt of ISR_TA0(void) is reached.
Definition at line 119 of file adc.c.
Referenced by ISR_TA0().
| volatile unsigned int adcResults[NUM_CHANNELS] |
Definition at line 19 of file adc.h.
Referenced by ADC10_ISR().