SPI communication with DAC (MCP4912)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

SPI communication with DAC (MCP4912)

ソリューションへジャンプ
1,634件の閲覧回数
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 解決策
1,623件の閲覧回数
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 返答(返信)
1,624件の閲覧回数
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 件の賞賛
1,608件の閲覧回数
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 件の賞賛
1,602件の閲覧回数
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 件の賞賛