Can i get an aplicatiion note on how i genarate a triangle wave on IDAC 4 on ADuC7121
I know, but this seems to be a wrong interpretation from a internal spec - basically your 2nd assumption is right, this way you can generate a triangle with all IDACs, but I let a college check the details again, but think my statements are correct from what I know - there is no difference for all IDACs.
We do not have a application note for this specifically, but some example code on how to generate a sine from a look-up-table. A triangle is even much easier, depending on the output frequency you only need to count up and down the DAC output value in smaller or larger steps.
Simple example which can be used in a Timer Interrupt Handler....
if(flag == 1)
if((DAC_Value += Step) >= Max_Value)
flag = 0
if((DAC_Value -= Step) <= Max_Value)
flag = 1
The output frequncy is 20 to 50khz so to use an interrupt rutine wont work .
We need it on IDAC 4 pin on the ADuc7121 and in the datasheet i found on page 44 the folowing:
"The bandwidth limit is provided by a programmable internal resistor and an external capacitor. This is to filter high frequency noise. It is also used to generate a triangle wave from a square wave input for the IDAC4 only".
IDACxCON MMR have some modes of operations SFHMODE for this . can i have more information on this modes of oprerations and more details on all fiels in IDACxCON and Bit shuffling.
how is the internal counter or the input data for the Shuffle in this modes of oprations.
You need to set the IDAC BW MMR and with a 0.01µF cap you generate a square-wave output on the IDAC output from a 20 to 50kHz Timer interrupt.
The SFHMODEs can be used in addition to do a step by step interpolation of the output after the changes you have written to the data register. I.e. SFH mode 00. Best to play around and connect a scope to see the different effects.
the BW MMR create the triangle wave but how i control the frequency of the triangle.
on page 44 i found that there is square wave input to IDAC4 from which the triangle is created.
"It is used to generate a triangle wave from a square wave input for the IDAC4 only".
Can i control this square wave from an MMR to enable/disable it and change the frequency of the square wave?
I wrote it already - the only chance is "you generate a square-wave output on the IDAC output from a 20 to 50kHz Timer interrupt." Changing the IDAC output between 0- and full-scale.
on page 44 "a square wave input for the IDAC4 only". As it written there is an input for the IDAC4 only
so i dont have to generate it with the IDAC level in an interrupt rutine.
can you chech it? because if i have to do it on interrupt i can do it on all IDACS and not IDAC4 Only
Retrieving data ...