56F807EVM DAC

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

56F807EVM DAC

2,207 Views
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?
Labels (1)
Tags (1)
0 Kudos
Reply
1 Reply

854 Views
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 Kudos
Reply