- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It should have an amplitude of 5V.
Im doing project on PSOC plz help me continue my work.humble request...
plz help me..
- Labels:
-
PSoC 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It is possible to generate square pulses using PWM or Counter/Timer component. This example project should help you do the same. Note that the amplitude of the square wvae is dependent on the voltage at which the I/O system is working. In PSoC3 the I/O system is divided into 4 quadrants and each quadrant has it's own supply pin. VDDIO0, VDDIO1,VDDIO2,VDDIO3. Hence to get an amplitude of 5Volt the VDDIO that corresponds this particular pin needs to be connected to 5V(any desirable voltage).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is it possible to produce 50 Hz with this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Is it possible to produce 50Hz using this work. What modifications are required.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it is possible to generate a 50 hz signal by modifying this project. The project as such has a 1Mhz clock connected to the PWM component. Change this clock to 100 Khz by double clicking the component. Now double click the PWM component, in the configuration GUI, set Period as 19 to give a time period of 20ms. This gives a square wave of frequency 50 hz. The dutycycle is determined by the compare value. To get 50 % duty cylcle set the "compare value 1" parameter to 9.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hai U2,
I need an out of phase square wave too,in order to drive the inverter circuit.
I have used Look Up Table (LUT) block to invert the present 50Hz square wave.
Actually the square wave is inverted but not having the same amplitude.
What shud I do to obtain same amplitude ,infact I can do using external circuit ; but I need to know that is it possible with PSOC itself.
Plz help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Deeps,
You can easily get the inverted square wave by connecting a NOT gate (from Logic category of component catalog).
You can connect the NOT gate in parallel with the PWM output and connect it with an output pin which is configured to 'Strong Drive' mode.
If the corresponding Vddio is connected to 5V, then the output will remain at 5V.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi dasq,
I have used the NOT block, but it was unsuccessful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There is another way of doing this, Double click the PWM component to configure its parameters. In the UDB implementation, the PWM component is capable of generating two PWM outputs, PWM1, PWM2. Set the PWM mode to generate two outputs. Set "compare Type1" to "Less than or Equal" and "Compare Type 2" to "Greater than or Equal" or the otherway round. This way the two PWM outputs are out of phase. Picture attached illustrates the same. Connect the two PWM outputs to Pins that have same VDDIO to ensure that they have same amplitude.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi deeps,
Are you not getting both the outputs. As per one of your previous comments u had successful in getting a 50Hz waveform. After changing the PWM configuration to get 2 outputs, did you map it to an appropriate pin, in the CYDWR file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi U2,
Yes I have done the same on CYDWR file, we are getting the same square wave not the inverted one.
Its a simple thing but we are not getting it. Yesterday we got the inverted but it suddenly dissappeared as we were about to connect it to the circuit .Can u plz do it from ther and send us the project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
How can we get a 5 volt pulse? You said we need to connect corresponding VDDIO to 5 volts. Can you open it up a little?
Best regards,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In case of PSoC3/PSoC5. The GPIOs are placed such that four quadrants are formed. Each quadrant can operate at a unique voltage. The operating voltage for each of these quadratns is determined by VDDIO supply voltage pins(VDDIO0, VDDIO1, VDDIO2, VDDIO3). By connecting VDDIO0 to 5V, all the GPIOs that come under its qudrant can generate a pulse of 5V amplitude.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to generate 125.1KHz with 50% duty cycle using PSoC3 ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Answer is basically yes, but question is accuracy you need for the 125.1 Khz.
Clock rate is dependent on your clock source, internal or external, and their
respective accuracies.
Also question is how accurate 50% duty cycle ? Exact, implies even divisors.
All can be effected by PWM, but clearly you need to do a goal/error analysis.
Regards, Dana.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Of couse it is:
you may use a PWM fed with 1251 kHz and a period of 10 and a compare-value of 5 or similar combinations like
2502/20/10
5004/40/20
1008/80/40
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Dana
As you see, I'm a very slow typist....
Bob
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Summarizing another way, examine the divisor needed to get from
33 Mhz, 48 Mhz, whatever frequency source to get 125.1, 1251, 12510 Khz.
Establish if it meets your accuracy needs.
Bob is correct, any PWM with an even divisor, period value, can yield a 50%
duty cycle with that divisor/2 for the compare value.
Regards, Dana.