Jump to content

MSP-EXP430FR5739 Accelerometer demo with PC GUI

Recommended Posts





I am developing a simple accelerometer with the MSP-EXP430FR5739. This board is populated with a 3-axis accelerometer: ADXL330. No additional HW is needed.


The MCU program does:

  • ADC:
    • Samples data from CH_0 to CH_14 in Repeat-Sequence-of-Channels Mode
    • Sample Rate: ~ 20 Hz/Channel
    • DMA
  • UART:
    • HW UART (TX only) with 9600 baud. This 9600 baud is limited by the emulator circuit.
    • UART TX data1 = ADC_CH_12 = ACC_X;   sample "622-X"
    • UART TX data2 = ADC_CH_13 = ACC_Y;   sample "509-Y"
    • UART TX data3 = ADC_CH_14 = ACC_Z;   sample "511-Z"
  • LEDs: LED_TX and LED_ADC


The PC application does:

  • Calculate the 3 acceleration components (g_x, g_y, g_z) from the ADC data and the CALIBRATION data
  • Calculate the magnitude of G; |G| = sqrt(g_x^2 + g_y^2 + g_z^2);
  • Displays data

CALIBRATION data must be enter by the user once at the beginning. The user has to rotate slowly the board in every 3 direction (and opposite) to find the maximum (+1g) and the minimum (-1g) ADC values of the 3 axis. Enter this 3*2=6 ADC data to the 6 white textboxes. If the CALIBRATION data are correct then |G| must be 1.00 (static acceleration of gravity).



The TX data can be viewed with putty too:






The CPU usage may be high when PC application receives data. I will try to reduce this in the next version.

Link to post
Share on other sites
  • 7 months later...
  • 9 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...