AnsweredAssumed Answered

Very simple DAC-application

Question asked by avuola on Mar 22, 2010
Latest reply on Mar 25, 2010 by Mitesh

Hi

 

I'm working with non-audio related application and I would need to write a DC-level value to the DAC with a maximum resolution, so not any time continuing signal throught it. I have ADZS-21369-EZKITE for developing and I has now spent about a week to learn about the processor and the ezkite. I know that ezkite has been built for audio applications and there is audio band filtering on the board. But currently I'm focusing on the SW side and I'm trying to build a very simple application to just to write some values/singnals to DACs. I used "Block based talk through" -example application and modified it.

 

I configured SPORT1 as transmitter without DMA and I'm trying to write some values to is, but without succes so far. Could anyone give some example how to write values to DACs directly, to generate some sine wave signal etc.

 

I'm trying something like this in the main loop:

 

unsigned int value = 0;

 

while (1) {

     if (value > 100000) value=0;

     else value++;

 

     if (!(*pSPCTL1 & DXS1_A)) {

          *pTXSP1A = value;
          sysreg_bit_tgl(sysreg_FLAGS, FLG5);  //LED-toggling, never hapens...

     }

}

 

in the initSPORT.c:

*pSPCTL1 = (SPTRAN | OPMODE | SLEN24 | SPEN_A | IFS | ICLK | FSR);

Outcomes