56F807EVM DAC

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

56F807EVM DAC

1,709件の閲覧回数
inni
Contributor I
Hi all. Im kind of new to dsp's and especially Processor Expert. Im currently trying to get the DAC on a  56F807EVM DSP up and running using the SWSPI bean, but can't seem to crack it. Can anyone please give me advise and/or examples on how to implement the DAC using Processor Expert?
ラベル(1)
タグ(1)
0 件の賞賛
返信
1 返信

356件の閲覧回数
Gregoriy
Contributor I
void SetDAC(word input)
{
word moved,ctrl;
byte part1,part2;
 
  moved=input<<2;
  ctrl=moved|0x3000;
  part1=ctrl>>8;
  part2=ctrl&0x00FF;
 
Bit1_ClrVal();
SPI1_SendChar(part1);
SPI1_SendChar(part2);
Bit1_SetVal();
}
 
My private function to set up voltage on DAC output. Values 0-1023 can be inputted because of 10 bits resolution.
 
- activate SPI bean
- call functon in the code with input of your value (trimpot on the board changes range of voltage)
 
function simply divides data into two chars abnd sends it to SPI. Everything from specification of MAX5251. I suggest to have a look.
0 件の賞賛
返信