Jump to content
Sign in to follow this  
SoWhat

Controlling two PWM channels

Recommended Posts

Hi there! I'm totally new in MCU programming) I have the g2553 microcontroller and I need some program to make two PWMs and to control shift of impulse fronts one from other by clicking buttons.

Try to explain:

 

___---___---___---___

___---___---___---___

 

<click!>

 

____---___---___---__

___---___---___---___

 

I think shift by adding __delay_cycles() to one of pwms is not too bad idea, but i totally have no thoughts how to get two PWMs.

 

Sorry about my english:)

Share this post


Link to post
Share on other sites

As far as I know 2553 has TIMERA_0 and TIMERA_1, you can use them to generate two separate PWM chanels. I dont really know about using delay option on PWM, dont see how could that work but I'm pretty sure I know very little about anything :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...