This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Sleep Mode

I have programmed CC1010 Chipcon evaluation module to sample a temperature, transmit it to the next node and display on the PC screen. However, due to energy considerations I put module to the sleep mode. It should reman in sleep mode if temperature is constant and awake from sleep mode if temperature changes.
I am experiencing problems while realising this idea.

First I am configuring ADC to operate in Multi-conversion, reset generating mode:

// ADC setup
halConfigADC(ADC_MODE_MULTI_RESETTING | ADC_REFERENCE_INTERNAL_1_25, CC1010EB_CLKFREQ, 25);
ADC_SELECT_INPUT(ADC_INPUT_AD1);
ADC_POWER(TRUE);

Then I am continuously sampling the temperature and putting the last 10 bit value to the transmit buffer, and sending node to sleep.

//Power up the ADC and sample the temperature
word temp;
float send;

ADC_RUN(TRUE);
temp = ADC_GET_SAMPLE_10BIT();

send=temp-492;
send=send/8.192;

transmitbuffer[0]=send;

ENTER_SLEEP_MODE();

halRFSetRxTxOff(RF_TX, &RF_SETTINGS, &RF_CALDATA);
halRFSendPacket(3, transmit_buffer_start_ptr, NUM_BYTES);

If the next sampled temperature value is the same node should remain in Sleep mode, if it different, it should wake up and transmit a temperature.
How should I modify the current code to reasile this idea? Many thanx.

0