]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmirws/sensors/PyranometerAdcP.nc
ADC functionality still questionable.
[tinyos-2.x.git] / tos / platforms / tmirws / sensors / PyranometerAdcP.nc
index 11e8ad37dff7013d4eb6939b356b373d0ec13609..6fd9b3edbdc5055940b598fd82f30d6067a1be75 100644 (file)
@@ -39,13 +39,18 @@ module PyranometerAdcP {
   provides interface AdcConfigure<const msp430adc12_channel_config_t*>;
 }
 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