NI Home > Community > NI Discussion Forums

LabVIEW Embedded

Showing results for 
Search instead for 
Do you mean 
Reply
Member
matmix1
Posts: 16
0 Kudos

SPI communication between MCP3204 and LPC2378

Hi,

 

I do the hand held vibration meter device. In the project, I use MCB2300 evaluation board and made by myself conditioning circuit for accelerometer, using MCP3204 12-bit AD converter. I'm using LabVIEW 2011 Embedded Module for ARM Microcontrollers. I've made initially the communication between MCP3204 and LPC2378 through SPI. However, instead of SSEL on pin 90 (P0.16), I used GPIO on P2.0 and change it "manually" in program. During debugging my program, I noticed some strange peaks in the converted signal (one axis of accelerometer in "still" position). I attached figures presenting the signal below. Additionally, there is presented signal of one of axis obtained with external ADC plugged to USB port. Last picture presents a subVI with communication with 1 channel of the sensor. Could somebody tell me, is there everything correct with this communication ? I've just added elemental I/O - GPIO P2.0 and connected to this port the CS pin of my ADC. Is there anything more to do in some configuration files of LPC2378 ?

Member
okubik
Posts: 170
0 Kudos

Re: SPI communication between MCP3204 and LPC2378

Hi,

 

do you know what is the representation of the Y-axis in the picture adc2.png 7 KB? I can see there a 120 "units" peak but couldn't that be just an error of your ADC? See p. 53 on this datasheet. http://www.nxp.com/documents/data_sheet/LPC2377_78.pdf . Are you sure about acc "stable" state? The uncertainty is also depends on your connection type.

 

 

Member
matmix1
Posts: 16
0 Kudos

Re: SPI communication between MCP3204 and LPC2378


okubik wrote:

Hi,

 

do you know what is the representation of the Y-axis in the picture adc2.png 7 KB? I can see there a 120 "units" peak but couldn't that be just an error of your ADC? See p. 53 on this datasheet. http://www.nxp.com/documents/data_sheet/LPC2377_78.pdf . Are you sure about acc "stable" state? The uncertainty is also depends on your connection type.

 

 


Hello,

 

Thank You for response. Y-axis on the graph represents the direct result obtained from 12-bit MCP3204 ADC. I mean, there are two bytes received and after proper manipulation, there can be obtained result. It is shown in the SPI.png, I attached in first post - 3rd frame. I rejected the problem with the ADC, because of the fact that I assambled 2 such conditioning circuit for this purpose, using two separate MCP3204 ADCs (small probability, that both are broken (?)). The p.53 in the datasheet shows information for internal 10-bit ADC on the LPC2378. I use external ADC. "Stable" state of accelerometer is ensured in such a way, that the sensor is glued to the table. It is not moving, so only the +1g DC voltage of Z-axis is observed. Having on the graph average value of 1840 - 1840*5V(ref) / 4096 ~= 2.246 V.

Active Participant
Ardent
Posts: 250
0 Kudos

Re: SPI communication between MCP3204 and LPC2378

Hi matmix1,

 

I found this unanswered forum post - were you able to solve the issue with SPI? Or can we help you in any other way?

Best regards,
Jano