X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fplatforms%2Ftmirws%2Fsensors%2FPyranometerAdcP.nc;h=6fd9b3edbdc5055940b598fd82f30d6067a1be75;hb=070aae08a0599fabd7ee6b46a91be83e6f313d50;hp=11e8ad37dff7013d4eb6939b356b373d0ec13609;hpb=34937fdf4124537bd6ddf43bef3e1874660f8ad7;p=tinyos-2.x.git diff --git a/tos/platforms/tmirws/sensors/PyranometerAdcP.nc b/tos/platforms/tmirws/sensors/PyranometerAdcP.nc index 11e8ad37..6fd9b3ed 100644 --- a/tos/platforms/tmirws/sensors/PyranometerAdcP.nc +++ b/tos/platforms/tmirws/sensors/PyranometerAdcP.nc @@ -39,13 +39,18 @@ module PyranometerAdcP { provides interface AdcConfigure; } implementation { - const msp430adc12_channel_config_t config = { inch: INPUT_CHANNEL_A3, +#if 0 /* internal references unstable */ sref: REFERENCE_VREFplus_AVss, ref2_5v: REFVOLT_LEVEL_1_5, + ref2_5v: REFVOLT_LEVEL_2_5, +#else /* external reference is stable */ + sref: REFERENCE_VeREFplus_AVss, + ref2_5v: REFVOLT_LEVEL_1_5, +#endif adc12ssel: SHT_SOURCE_ADC12OSC, - adc12div: SHT_CLOCK_DIV_1, + adc12div: SHT_CLOCK_DIV_8, sht: SAMPLE_HOLD_8_CYCLES, sampcon_ssel: SAMPCON_SOURCE_ACLK, sampcon_id: SAMPCON_CLOCK_DIV_1