What you are doing looks OK to me (although sticking it in the middle of the gyro readings is a funny way to go about it).
Take a look at section 17.2.8 of the MSP430x1xx Family user's guide; it may be helpful: http://www.ti.com/litv/pdf/slau049f You may need to change the SHT (sample hold time) settings (in the initADC12CTL0() function of $TOSROOT/tos/platforms/shimmer/shimmerAnalogSetupP.nc) as too short a value here might explain the apparent crosstalk/noise from the gyro channels. Mike On Wed, Oct 16, 2013 at 10:58 PM, jackey gong <[email protected]> wrote: > Dear all, > > I am trying to add the value from the internal temperature sensor of > MSP430 in Shimmer2R. So, I change some values in the BTstream firmware, in > the shimmerAnalogSetupP.nc, I change the value of > > command void shimmerAnalogSetup.addGyroInputs() { > // uint8_t new_chans[] = { 1, 6, 2 }; // x, y, z > uint8_t new_chans[] = { 1, 10, 2 }; // x, internal temp, z > addNewChannels(new_chans, 5); > > initADC12MEMCTLx(); > > TOSH_MAKE_ADC_1_INPUT(); > TOSH_SEL_ADC_1_MODFUNC(); > > // TOSH_MAKE_ADC_6_INPUT(); > // TOSH_SEL_ADC_6_MODFUNC(); > > TOSH_MAKE_ADC_2_INPUT(); > TOSH_SEL_ADC_2_MODFUNC(); > } > > Since the temperature sensor do not need configure any channel of the ADC, > so I delete the PORT configuration for ADC. > > But I did not get the right temperature value, it seems like some noise > from other channels. Especially when I rotate the Gyro module, the > temperature value also have some variations on it. > > Would you like to help me out? > > Thanks, > Jackey > > > _______________________________________________ > Shimmer-users mailing list > [email protected] > https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users > >
_______________________________________________ Shimmer-users mailing list [email protected] https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
