Hi David,

I'm afraid that I'm a bit confused by your question.

You say that you can interpret all the bytes within the packet other than
the EMG data. By this do you mean the BOF, sequence no., timestamp, etc? If
so interpreting the raw emg data is no different than interpreting the
timestamp.

Also are you mixing up bytes and bits in your question? The EMG data is 12
bits (as the msp430 has a 12 bit ADC), but it is sent as 2 bytes (16 bits),
so the upper 4 bits will always be zero. I don't know where you are getting
12 bytes from. And yes, this is also sent in little endian format.

So assuming the raw EMG data are bytes 7 and 8 of the packet (indexed from
0), then to get the raw ADC value just left shift byte byte8 by 8 places and
add it to byte 7. I.e.
   rawADC = ((byte8 << 8)  & 0xFF00) + byte7

Take a look at the faq page on the shimmer-research.com website for details
on how to convert the raw ADC values to volts (
http://www.shimmer-research.com/links/faqs#S9).

Mike


On Tue, Apr 26, 2011 at 12:29 AM, David Bauschlicher
<[email protected]>wrote:

> Hello, I am connecting a Shimmer with EMG attachment to an Android phone
> over Bluetooth. I am using the BIOMOBIUS EMG Firmware on the Shimmer. I have
> successfully connected via Bluetooth and I am receiving data. I am able to
> interpret all of the bytes within each packet within each packet except for
> the EMG data itself. It seems like the raw EMG data has a length of 12
> bytes, and I am confused as to how this can be read. Is it also sent little
> endian? How can I separate the 12 bytes into a numerical value? Thanks.
> _______________________________________________
> Shimmer-users mailing list
> [email protected]
> https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users
>
_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to