Jump to content
Sign in to follow this  
VisSim Forum Archives

how to use PWM in msp430G2553??

Recommended Posts

Submitted by yogeshnand on Wed, 03/16/2016 - 15:56 

 

VisSim 9.0

i am learner of VisSim embedded. trying to use PWM , but when i connect square wave block to PWM , it shows error " type mismatch on input 0" how this error would be solved.i am using MSP430G2553 As a target. thanking you..

Share this post


Link to post
Share on other sites

Submitted by pete on Wed, 03/30/2016 - 07:28.

Since TA0 is the only timer on this chip, you need to share it with the PWM and control interrupt generation. To do that the periods must agree. The easiest way is to choose a control rate, generate code, and look at the value VisSim assigns to TA0CCR like so:

  TA0CCR0 = 0x3e80; // Timer Period

Then convert 0x3e80 to decimal (16000), and use that as the PWM period. See attached.

pwm2.vsm

Share this post


Link to post
Share on other sites

Submitted by yogeshnand on Wed, 03/30/2016 - 14:55.

thanks for your reply. but sorry to say it showing the same error. same way first i generate code , took values of TA0CCR , convert ed into decimal and used this value for PWM period. but it showing the same error. ""Warning!PWM causes timer TA0 period conflict".

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
You are posting as a guest. If you have an account, please sign in.
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...