This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSP430FR4133: Connecting a ADXL362 accelerometer to MSP430

Part Number: MSP430FR4133
Other Parts Discussed in Thread: ENERGIA, , MSP430FR5739

Hello community, 

I am trying to connect a ADXL362 to my MSP430 in Energia using SPI. I have found some arduino code examples (but no msp430 examples)  which sync without issue in Energia. However, I don't know what pins to hook up the accelerometer to and am guessing I will need to change the code to correspond to the correct MSP430 pins. This is a link to the code I am using,

1st

will the arduino.h library work correctly?

2nd 

what do i need to change "ie pin configuration" to get this to work correctly? 

3rd

any tips on getting this to work?

any help would be greatly appreciated. 

Kind regards,

Chris

  • Hi Chris,

    I'm not very familiar with Energia but I am an expert on the MSP430 so I'll try my best. The arduino.h library will not work with the MSP430FR4133. I think a good starting place for you would be the Fraunchpad 3-axis accelerometer. It looks like this uses the MSP430FR5739 and the ADXL335 accelerometer. While these aren't these exact parts you are trying to connect together, they are very similar to what you're trying to accomplish. Check them out and let me know if you need any further guidance. 

    Best regards, 
    Caleb Overbay

  • Hello Caleb,

    Thank you for your quick reply

    The Fraunchpad 3 axis accelerometer has a pits which indicate X Y Z axis. The ADXL362 has MOSI and MISO pins to be used with SPI so they are unfortunately different. I am still unsure how to connect these components to the device.

    Kind regards,

    Chris
  • Hi Chris,

    The ADXL362 uses a SPI interface so it can connect to any of the eUSCI modules inside the MSP430 capable of SPI communication. Looking at the MSP430FR4133 datasheet, you can find the pins that are capable of SPI communication in section 6.9.7. You'll find the following table:

    So you can connect the ADXL362 SPI lines according to this table. Be sure to use only eUSCI_A0 or eUSCI_B0 and not to mix the connections between the two modules. Also, the ADXL362 requires a chip select (CS) signal for proper SPI operation. I recommend connecting this to a GPIO on the MSP430 and then toggling that GPIO low when you start sending data to the ADXL362. 

    You'll also need to setup the MSP430 SPI module according to the parameters specified in the ADXL362 datasheet in the section titled " Serial Communications". This includes using the correct CS polarity, clock phase, and clock polarity. I would also recommend reading through the MSP430FR4311 User's Guide section 22 to better understand how to setup the MSP430 eUSCI SPI module. Finally, you can find C examples of SPI communication with the MSP430 here.

    Best regards, 
    Caleb Overbay

**Attention** This is a public forum