Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

MSP430FG4618 ADC12 Memory Register Query

Status
Not open for further replies.

rshrivas

Newbie level 4
Joined
Jan 15, 2011
Messages
7
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,338
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.

Is there any addressing mode that I can use to store the 8 MSB bits in one array and the 8 LSB bits in another array. Or is there some other way to deal with this issue.


But being new to MSP430 programming I have no idea how can I do that.

Please let me know your suggestions.

Regards

Ravi
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top