Hello,
I have recently been modifying the msp430 rf2560 accelerometer program to send all three axis of accelerometer data separated by a comma. The appl_sdk.c file was altered to increase the appl_spp_data_buffer from 4 to 10. The sdk_pl.c file was then changed to the code below.
buffer[0] = accl_x;
buffer[1] = (accl_x >> 8);
buffer[2] = accl_parse;
buffer[3] = (accl_parse >> 8);
buffer[4] = accl_y;
buffer[5] = (accl_y >> 8);
buffer[6] = accl_parse;
buffer[7] = (accl_parse >> 8);
buffer[8] = accl_z;
buffer[9] = (accl_z >> 8);
accl_parse was declared as a int16 same as accl_x, accl_y and accl_z, and initialized to 0x2c (ascii code for comma). The interesting thing is that the comma is never sent or at least it never shows up in the hyperterminal window. My questions for this post come from the stepping through the program and looking at the IAR disassembly window. buffer[0] = accl_x command equates to mov.b R14,0x0(R10) , and the buffer[1]=accl_x>>8 equates to swpb R14 followed by mov.b R14,0x1(R10). When I step through the program and execute these commands I can see the swap byte command execute but the value of register 10 is never altered (it is always 0332A). The fact that I never see the value in R10 change when data is being moved there is rather confusing to me, and I am not sure whether or not I am interpreting the code commands correctly. I even changed the code back to the original buffer size of 4 and only sent the x and y data and the same situation arises. So my question is obviously why am I not seeing the value of R10 changing with the mov.b instruction?
My second question is why would accl_parse value not show up in the terminal window with the acclerometer data? I never see a comma or a 0x2c (if im viewing with a hex terminal plugin).
Thanks in advance for anyone who can help.
~MJ