4 Replies Latest reply on Nov 21, 2013 2:02 AM by JoMe_264151

    A question about offsetting clocks

       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,