1 2 Previous Next 15 Replies Latest reply on May 30, 2017 12:37 AM by JoMe_264151

# DAC, need a sin with the max frequency be shown

Hey, im not so good in this thing, so sorry for, maybe, such a stupid question..

i need to get sin signal with max possible frequency for DAC.

How can i know max possible for DAC?

if i correctly understand this - i need to have a function in couter to incrise x from time with high-high frequency and in main call DAC8_WriteStall(sin(x)); where x have really small step, so i can see on the Oscilloscope max possible frequency?

Thanks

• ###### 1. Re: DAC, need a sin with the max frequency be shown
What max frequency do you need?
• ###### 2. Re: DAC, need a sin with the max frequency be shown

Welcome in the forum.

Did you already have a look at the WaveDAC component?

Bob

• ###### 3. Re: DAC, need a sin with the max frequency be shown
I need to discover the max frequency of sin signal that can be normaly shown with DAC of psoc 3214 o_O
• ###### 4. Re: DAC, need a sin with the max frequency be shown
Using DDS and hardware lookup table, VDAC can produce ~1MHz sine. The output amplitude slowly declines above that frequency, to about 1/4 at 3MHz. Higher frequencies can be obtained using self-made R-2R DAC. Some reconstruction filter is recommended for smooth sine waveform.
• ###### 5. Re: DAC, need a sin with the max frequency be shown

Thank ou so much, if you let me ask one more question..
how can i get  ~1MHz sine?  if i set period for Counter = 1 (is it means 1 ms?) so i have a frequency a 1/1*10^3 - so like 1kHz for count is maximum, how can i get bigger fr?

• ###### 6. Re: DAC, need a sin with the max frequency be shown

itovpinets,

Attached an example project demo of 1 MHz fixed-frequency sine generator.

• ###### 7. Re: DAC, need a sin with the max frequency be shown

probly i have another version of program..
here's the screenshot ( http://prntscr.com/fcyotb ) i have that counter with 'clock' and 'period' attributes.. result frequency of counter will depends not only from 'period' value, but of  'clock' too?

• ###### 8. Re: DAC, need a sin with the max frequency be shown

"result frequency of counter will depends not only from 'period' value, but of  'clock' too?"

Yes, of course. Output of a counter is  Clock / Period. Keep in mind that there is a max clock value, see counter's datasheet.

Bob

• ###### 9. Re: DAC, need a sin with the max frequency be shown

itovpinets, This is PSoC5 forum. It appears that you using PSoC1.

• ###### 10. Re: DAC, need a sin with the max frequency be shown

hmm, thanks)
so may i give you an example and i'd be grateful if you tell me am i correctly understood or no..

lets say i have a Global resources settings like:

PowerSetting =  5.0v/24Mhz
CPU_Clock =  SysClk/8
VC1   =  6 (so when i put it in to my counter as a clock i'll get a 24MHz/6 = 4MHz for counter? (--1 question))

if i'm putting in counter as a Clock VC1 - then other VC (2/3) is not so important for me? ( -- 2 question)

in Counter i have:
Clock VC1
Period 4
compareValue 3

so my clock will work with final frequency as 4MHz /4 = 1MHz? (--3 question)

now i have 18 points for 1 period of sin signal to be paste to DAC, every new point is given with frequency of Counter
so 1 full period of sin signal will have a frequency of 1MHz/18 = like 55,5 kHz? (--4 question)

and finally to explore the max fr of signal with which DAC can work im increasing frequency of my Sin signal by editing Period and VC1 divider values  (--5 question)
and then look at the output signal on Oscilloscope when sin is not looks like sin anymore then i reached max fr of signal for DAC? (--6 question)

Thank you so much

• ###### 11. Re: DAC, need a sin with the max frequency be shown

Hi odissey1

Very interesting component but not compile working (customizer  error)

Thanks help

Kamil

• ###### 12. Re: DAC, need a sin with the max frequency be shown

Kamil,

The project is compiling ok using PSoC Creator 4.0 Update 1 (4.0.0.432) for KIT-059. Did you rename the sin8 component? Please give me more information (maybe compiling output or some screenshots). I am also attaching somewhat newer version of the sin8 development project, please check if this works and import sin8 component from it.

I found that the scope cable is loading VDAC, so signal drops to ~1/3, so some opamp is required to get to full swing amplitude (example below). From scope picture, the issue is low slew rate of the PSoC opamps and their saturation at zero rail, so some more analog tinkering necessary to get better sine shape.

• ###### 13. Re: DAC, need a sin with the max frequency be shown

Same configuration Creator and board KIT and same error.

• ###### 14. Re: DAC, need a sin with the max frequency be shown

Kamil, this is Windows security protection. Goto Tools->Options->Design entry->Component security->Add (component/project path).

1 2 Previous Next