A question about offsetting clocks

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable

 I'm a student and I'm still trying to figure out what's going on here and how to use everything.

   

I'm trying to make a pulse oximeter, but I'm still in the preliminary steps. My goal at this point is to have 2 PWM's offset by 180degrees. In otherwords, I want one to turn on as the other's turning off and vice versa. 

   

I've tried messing with the clock settings (standard clocks) but VC3 is the only clock that actually has my PWM pulse.

   

So far, what I have is really simple, just 2 led's that I'm pulsing using PWM16 with reasonably long periods, and I can make 2 things happen, I can make them both pulse at the same time, by using VC3, and if I hook PWM16_2 up to say VC2 or VC1 for that matter, there's a delay, and then it just stays on and never shuts back off.

   

 

   

So my simplified question is this: is there a way I can assign VC* = VC3 + Period/2 ? 

   

Or am I going about this wrongly? 

   

I'd like to avoid ADC for this portion if I can, simply because I'm not familiar with it.

   

Thanks in advance,

   

Tyler

0 Likes
1 Solution
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the fascinating world of PSoC ?

   

You are probably in the wrong forum here, since your question is related to PSoC1 as I deduct from usting VC*.

   

You may connect two output pins to your PWM and invert with the LUT one of them.

   

 

   

Bob

View solution in original post

0 Likes
4 Replies
lock attach
Attachments are accessible only for community members.
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

Welcome in the fascinating world of PSoC ?

   

You are probably in the wrong forum here, since your question is related to PSoC1 as I deduct from usting VC*.

   

You may connect two output pins to your PWM and invert with the LUT one of them.

   

 

   

Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

To be more precise: You are not restricted to using VC1 to 3 as input to your PWM usermodule, you may use a counter as a prescaler and feed the PWM with the output from that.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

 Thanks Bob

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

You are always welcome!

   

 

   

Bob

0 Likes