]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmirws/sensors/PyranometerAdcP.nc
Convenience components that multi-sample an ADC pin for oversampling.
[tinyos-2.x.git] / tos / platforms / tmirws / sensors / PyranometerAdcP.nc
index 6fd9b3edbdc5055940b598fd82f30d6067a1be75..b3e95687f1ef03b9bbe87dfdd3cbc4a9c735adeb 100644 (file)
@@ -30,7 +30,7 @@
 /**
  * Pyranometerery ADC reading.
  * 
- * @author R. Steve McKown <smckown@gmail.com>
+ * @author R. Steve McKown <rsmckown@gmail.com>
  */
  
 #include "Msp430Adc12.h"
@@ -43,14 +43,18 @@ implementation {
       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,
+      ref2_5v: REFVOLT_LEVEL_1_5, /* REFVOLT_LEVEL_2_5, */
 #else /* external reference is stable */
       sref: REFERENCE_VeREFplus_AVss,
       ref2_5v: REFVOLT_LEVEL_1_5,
 #endif
+#if 0 /* stability affected by clock source? */
       adc12ssel: SHT_SOURCE_ADC12OSC,
       adc12div: SHT_CLOCK_DIV_8,
+#else
+      adc12ssel: SHT_SOURCE_ACLK,
+      adc12div: SHT_CLOCK_DIV_1,
+#endif
       sht: SAMPLE_HOLD_8_CYCLES,
       sampcon_ssel: SAMPCON_SOURCE_ACLK,
       sampcon_id: SAMPCON_CLOCK_DIV_1