I need your help.
I want to know how to generate rectangular waveform (Vmin= -3 V;Vmax= +3 V ) using analog outputs.
frequency = 300 Mhz for example
Thank you ...
Recreated to original post by MMA - Community Manager
Attached a very basic Keil µVision4 project to generate a 300Hz output on P3.0 to P3.5 PWMs
P4.2 is no HW-PWM output.
Basically you may build a simple oscillator with a high frequency & high slew-rate Op-AMP like a ADA4817-1
frequency = 300 Hz not 300 Mhz. So i can use ADUC7026
I see what you mean. you thought the frequency is 300MHz this why you say ADA4817 will fit But i want to use ADUC7026 with no components extension.
I want to use DAC or PWM ( PWM0H and PWM0L) register to generate the signal.
Thanks and sorry again
With the PWM @ 41.78MHz this is not possible due to :
fPWM(min) = 41.78 × 10^6/(2 × 65,535) = 318.75 Hz
But if you can run the core only @ 20.89MHz you can correctly generate 300Hz.
Another idea is to use Timer 1 and one PLA-Element clocked from Timer 1 @ 600Hz and the output is the inverted input => divide/2 = 300Hz on a PLA-output for 50% duty-cycle very accurate.
But than you still need a OP-AMP with +/- 3V supply used as Comparator (threshold @ DVDD/2) to output +/- 3V.
the situation is even if i use a suitable or correct frequency ( for example 500Hz ) without having to change the core frequency i can't generate a square wave with Vmax = +V and Vmin = 0.
I use the pwm examples code . but i can't see signal generated in Logic Analyzer....( what i mean is if the Gpio is configured as pwm output ( P4.2 for example) The logic analyser doesn't accept P4.2 in his setup section.
Thank you for your help ... i see the result .... it give me pulses ... i want square wave
is it possible to transform this pulse to square wave using only C programming and outputs ( DAC or PWM)
is it possible to generate square wave using aduc7026 only without components extensions ?
I get on P3.0 and P3.1 i.e. the following inverted to each other square-wave
see attachment . This is what i get on oscilloscope.
Can you provide a picture of the chip or all what's written on it.
using an array with 64 values , i get this ( on attachement ) .... on logic analyser ....
This is a DAC output - this you can do much easier via a Timer Interrupt @ 600Hz and just toggle a GPIO or set the DAC to 0 or full-scale ...
right know i don't get what you mea ... But i'll try i have to read datasheet before to undersatand some timer specifications ....
Thank you ....
i 'm trying Fourier series for square wave :
for ( int i = 1 ; i < 1001 ; i ++)
A[i] = 4/pi * sin (( 2*i – 1) * pi * f * i * pas) / 2*i – 1) ;
Thank you it works ... oscilloscope impedance didn't match...
Retrieving data ...