Hi,
I am new to MSP430 controller and I presently using SimpliciTI protocol for transmitting ADC samples wirelessly from the End Device to the Access Point. Now the ADC12 has a memory register which is 16 bit (4 MSB bits 0) and this data is read into a 16 bit integer array as shown below.
uint16_t ch1[100];
uint16_t ch2[100];
for ( int t=0; t<100 ; t++)
{
ADC12CTL0 |= ENC; // Enable conversions
ADC12CTL0 |= ADC12SC; // Start conversions
while((!(ADC12IFG &0x02)==1));
ch1[t] = ADC12MEM0;
ch2[t] = ADC12MEM1;
}
But in order to transmit the data using the "smplStatus_t SMPL_Send(linkID_t lid, uint8 *msg, uint8 len)" command I can only transfer 8 bit array (string) and not 16 bit array. But the ADC memory register is 16 bit so need to put the 1st 8 bits of the MSB in one array and the 8 bits of the LSB in another array so that I can easily transmit the two 8 bit arrays easily. But being new to MSP430 programming I have no idea how can I do that.
Please let me know your suggestions.
Regards
Ravi
I am new to MSP430 controller and I presently using SimpliciTI protocol for transmitting ADC samples wirelessly from the End Device to the Access Point. Now the ADC12 has a memory register which is 16 bit (4 MSB bits 0) and this data is read into a 16 bit integer array as shown below.
uint16_t ch1[100];
uint16_t ch2[100];
for ( int t=0; t<100 ; t++)
{
ADC12CTL0 |= ENC; // Enable conversions
ADC12CTL0 |= ADC12SC; // Start conversions
while((!(ADC12IFG &0x02)==1));
ch1[t] = ADC12MEM0;
ch2[t] = ADC12MEM1;
}
But in order to transmit the data using the "smplStatus_t SMPL_Send(linkID_t lid, uint8 *msg, uint8 len)" command I can only transfer 8 bit array (string) and not 16 bit array. But the ADC memory register is 16 bit so need to put the 1st 8 bits of the MSB in one array and the 8 bits of the LSB in another array so that I can easily transmit the two 8 bit arrays easily. But being new to MSP430 programming I have no idea how can I do that.
Please let me know your suggestions.
Regards
Ravi