SPI communication with DAC (MCP4912)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

SPI communication with DAC (MCP4912)

跳至解决方案
2,129 次查看
laonia
Contributor I

Hi,

I am having some trouble using the SPI module on my FRDM-KEA128. I am trying to change voltage output on a MCP4912. I compared my SPI signals to an example on the datasheet. They seem correct to me, but I'm still not detecting any voltage change. Is there anything I am missing?

The following image is me trying to send two bytes: 0xFA and 0xAA. I tied LDAC pin to ground, so voltage should be updated when a 16bits message is received. 

My SPI SignalMy SPI SignalExample on DatasheetExample on Datasheet

0 项奖励
回复
1 解答
2,118 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

The image uploaded of the oscilloscope shows the 0xFA and 0xAA, the SPI seems right, from KEA128, this can be an issue with the MPC, you need to consult the datasheet from the MCP or contact the vendor of that device. I suggest reviewing the velocity of the MCP has support.

在原帖中查看解决方案

0 项奖励
回复
3 回复数
2,119 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

The image uploaded of the oscilloscope shows the 0xFA and 0xAA, the SPI seems right, from KEA128, this can be an issue with the MPC, you need to consult the datasheet from the MCP or contact the vendor of that device. I suggest reviewing the velocity of the MCP has support.

0 项奖励
回复
2,103 次查看
laonia
Contributor I
Hi Pavel, Thanks! That was the issue. I was sending my SPI too fast. This kind of brings up another question. I am currently using a PIT Timer at 1kHz to call a send SPI message function, but I am thinking whether there is a quicker way to just grab the current clock tick from some registers without setting up the timer handler?
0 项奖励
回复
2,097 次查看
Pavel_Hernandez
NXP TechSupport
NXP TechSupport

Hello, there are many ways to get an internal trigger but all need setting to guarantee the time. the other way with the minimum setting is to use the SysTick_Handler, but I suggest the use of the PIT or RTC.

0 项奖励
回复