Jump to content
43oh

PWM frequency


Recommended Posts

I would like to know what is the frequency of the pwm when i use analogWrite() with launchpad msp430g2553 and with the stelarpad.

 

and how can i set the frequency?

 

in know issues it's listed that the analogWrite() output half the expected frequency and only adjusts pwm 0-50%. is this still true?

Link to post
Share on other sites

The frequency of the PWM signal is approximately 490 Hz as per Wiring / Arduino spec. For the msp430 you can use the API analogFrequency(uint32_t freq). This function is not yet implemented on the Stellarpad.

The analogWrite() issue you are refferin to has been fix in Energia 0101E0009.

Link to post
Share on other sites

The frequency of the PWM signal is approximately 490 Hz as per Wiring / Arduino spec. For the msp430 you can use the API analogFrequency(uint32_t freq). This function is not yet implemented on the Stellarpad.

The analogWrite() issue you are refferin to has been fix in Energia 0101E0009.

 

analogFrequency (); works in hz? like for 20khz it's analogFrequency (20000);?

it still isn't hadded in keywords (doesn't change color)

 

for the stelarpad i have the compiler edited to have this fuction:

PWMwrite(256,duty,freq)

frequency is in hertz

256 is the max value of duty, the resolution of duty.

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.

×
×
  • Create New...