Other Parts Discussed in Thread: CODECOMPOSER
HELLO!
I am working on MSP430FR4133 and I am trying to communicate with an external ADC MCP3002 via SPI in order to sample an input signal and then to show the ADC value in the LCD of its LaunchPad
MSP430 MCP3002
SCLK P5.1 -> CLK Pin 7
MOSI P5.2 -> D_In Pin 5
MISO P5.3 <-D_Out Pin 6
CS P5.0 -> Cs Pin 1 (or CS -> GND)
In order to read a sample from the ADC, the Master must write 0110 0000 0000 0000 on the MOSI line (Start Bit = 1, SGL/DIFF = 1, ODD/SIGN = 0, MSBF = 0), see Table 5-1 of the MCP3002 data sheet.
The Slave (the ADC) responds with the sample value on the MISO line. Example: 0000 0010 0000 0110 = 0x02 06 (hex) = 518 (decimal). The bits marked are the 10 bit sample value.
The is I couldn't figure it how to communicate with the external ADC I tried to work with the software examples provided in the datasheet but it didn't work so good with me since I am new with Codecomposer.
This is my last hope no one could help me so I hope you can. I would appreciate your help
LaunchPAD user s guide: LaunchPAD https://www.ti.com/lit/ug/slau595b/slau595b.pdf?ts=1623242949525&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FMSP430FR4133
datasheet of msp430FR4133: ti.com/lit/ds/symlink/msp430fr4133.pdf?ts=1623307760232&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FMSP430FR4133
Family user s guide: www.ti.com/.../slau445i.pdf
MCP3002 Datasheet: www.farnell.com/.../1599363.pdf