You are here

PWM interrupt. | Cypress Semiconductor

PWM interrupt.

Summary: 8 Replies, Latest post by deeps on 27 Jun 2011 01:33 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
sakki's picture
User
9 posts
sakki's picture
User
9 posts

 hi,

Plz help me. 

In my PSoC project..I have to interupt PWM output.,under some voltage input to PSoC

The PWM output is 50hz square wave.So, if input is 4V, I wont the PWM to shrink.T to become smaller.

ANd if the input is 3V then the PWM output shud be OFF..

Is this possible .Can you just do the program and post it.

Plz help

U2
uday's picture
Cypress Employee
569 posts
sakki's picture
User
9 posts

 hi

      Its not working for us. Simply all that u have sugested did nt worked for us as we do by ourselves. 

 Can u plz help with this. We are getting close to it.

Plz help.

 

deeps's picture
User
26 posts

Hi

Ill elaberate it for u. There are two PWM components. One(PWM1) for generating the square wave pulse to the mosfet of inverter and the second (PWM2) to monitor the battery generating 40Khz pulse.

If the voltage from battery is 4V, then the PWM2 shud vary the pulse to a narrow pulse; and fedback to battery.

And if the voltage is 3V, then PWM1 shud turn off.

Plz can u do this. Our project submission dates are on June 1st. Plz do this favour. As before by ur instuctions we are not getting as u were very helpful.Plz help with this. 

deeps's picture
User
26 posts

hi

Plz help, tomorrow is the last day of project completion.

Sir, plz help...

dasg's picture
Cypress Employee
730 posts

Hi Deeps/ Sakki,

 

You can use two PWM components with suitable clocks and so that the required Frequency and Duty Cycle is obtained.

The following is to be done:

1) PWM_1 output is to be stopped when the input supply voltage goes below 3V. Hence, use a resistor divider bias (2 equal resistors in series) to divide the voltage by two. Use VDAC8_1 of 1.5V connected to the inverting input terminal of the comparator, Comp_1.

2) Use another comparator, Comp_2 to which VDAC8_2 is connected with voltage set to 2V.

3) When voltage goes below 2V, then isr_1 will be triggered. In the ISR, change the Compare value of PWM_2 such that the duty cycle reduces.

4) When the voltage reduces below 1.5V, PWM_1 output will reset and hence go low.

 

The snap-shot of the schematic is attached in the next post.

dasg's picture
Cypress Employee
730 posts

The snap-shot is as shown below:

 

deeps's picture
User
26 posts

hi dasq,

we did this . But we r not getting d output. Som problem is always der,as v do anything wth ur instuctions but as u send d same thing and run the pgm it works.Can u plz send the pgm plz..

We'll try from our side

 

Log in to post new comments.