56F807EVM DAC

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

56F807EVM DAC

2,261 次查看
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 回复

908 次查看
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 项奖励
回复