Hi ;

I'm working on a simple RF2500 project which is based on a LM35 temperature sensor controlled fan controller.The main idea of the project is very straightforward,when the temperature exceeds on the transmitter side,ADC'data is sent via RF,and the receiver side drives the motor.Transistor is used as switch to drive motor on the receiver side,so it is very simple.

The code of the transmitter,which takes the analog input from LM35 and sends it,is ready.Except the main code,the important part is ISR ;


#pragma vector=TIMERA0_VECTOR //Interrupt Service Routine

__interrupt void isr_name (void)
{
                    ADC10CTL0|=ADC10SC;
                    k=ADC10MEM;
                     tx_byte[0] = 0x04;                                        //packet length
                      tx_byte[1] = 0x01;                                       //packet adress
                      tx_byte[2] = (ADC10MEM & 0xFF);         //masking the adc data
                      tx_byte[3] = (ADC10MEM & 0x300);       //masking the adc data
                                     

                          RFSendPacket(tx_byte,4);

}

Basically,the sending side ISR is like i descripted above.ADC10MEM register contains 10-bits,so i needed to mask it to send into two chars.

How can i receive the 10 bit ADC value on the other side,and put it into an integer?

Regards.