tag:blogger.com,1999:blog-2168992611451428662.post1879882401710687622..comments2023-05-24T09:37:45.708-04:00Comments on MSP430 LaunchPad: Timers and Clocks and PWM! Oh My!NJChttp://www.blogger.com/profile/05101156243681023963noreply@blogger.comBlogger84125tag:blogger.com,1999:blog-2168992611451428662.post-64132410395769180922016-05-04T20:12:22.926-04:002016-05-04T20:12:22.926-04:00Bansari, this is not a simple question to answer. ...Bansari, this is not a simple question to answer. I would recommend asking this question on the TI E2E forums, or on 43oh.com. Both are well suited for open ended questions. Good luck!NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-11508100858074866702016-05-01T22:29:52.037-04:002016-05-01T22:29:52.037-04:00what change i have to make in code for generate p...what change i have to make in code for generate pwm wave's duty cycle same as per analog signal's duty cycle?? Anonymoushttps://www.blogger.com/profile/11615605211595729200noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-62616272836838194282016-02-12T03:03:52.257-05:002016-02-12T03:03:52.257-05:00Wow man! thanks author. the article is amazing. no...Wow man! thanks author. the article is amazing. now I have a really good info about timersAnonymoushttps://www.blogger.com/profile/14525915976348660899noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-10122187833973021532015-08-30T11:50:58.149-04:002015-08-30T11:50:58.149-04:00Each MSP430 has a different set of definitions for...Each MSP430 has a different set of definitions for internal registers and peripherals. The best place to find these names is either in the definition header of the MSP430 Family User Guide. The Family User Guide is available for every MSP430 on the product page on TI's website. This is a great resource for understanding each peripheral and register.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-42396426062351611402015-08-27T07:19:19.894-04:002015-08-27T07:19:19.894-04:00Hi,
as i try to debug, codecomposer says that CCR0...Hi,<br />as i try to debug, codecomposer says that CCR0, CCTL1, CCR1 and TACTL is undefined (e.g. #20 identifier "CCR0" is undefined). I am using the tutorial code on an MSP430F5438A.<br />I am greatfull for any kind of help. Thanks in advance.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-51120667272684437842014-05-21T14:21:49.887-04:002014-05-21T14:21:49.887-04:00i want a msp430 program in which the output- on t...i want a msp430 program in which the output- on to off time should be double. means 1:2 ratioAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-36161994027638274832014-04-14T06:08:36.536-04:002014-04-14T06:08:36.536-04:00hey.
i want simple timer program for msp430g2553
t...hey.<br />i want simple timer program for msp430g2553<br />thank youAnonymoushttps://www.blogger.com/profile/09502267803007392176noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-77570446426459746882014-01-16T21:28:20.352-05:002014-01-16T21:28:20.352-05:00I would recommend calculating the clock frequency ...I would recommend calculating the clock frequency you need to achieve your desired output. From there, you can determine what clock it is possible to use on the MSP430, if it is possible at all. You can look at the family user guide and the device datasheet to see what is possible from a maximum frequency perspective.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-43878986070844933642014-01-16T15:20:46.184-05:002014-01-16T15:20:46.184-05:00Thanks for the fast answer. So I can change the SM...Thanks for the fast answer. So I can change the SMCLK speed in LM0? Because if I have SMCLK limited to 1MHz and need the pwm in 800KHz I will have only 2 available duty cycles. So my question is: If I want a high pwm signal(e.x.800kHz), I need to activate the CPU?<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-7761815148589612862014-01-16T09:20:33.441-05:002014-01-16T09:20:33.441-05:00MCLK is disabled in LM0, but SMCLK is not. If your...MCLK is disabled in LM0, but SMCLK is not. If your clock speed is set to the a reasonable value, I do not see why you could not produce the desired PWM.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-77616522215256365872014-01-15T19:35:29.259-05:002014-01-15T19:35:29.259-05:00Hello, nice article in here, I learn a lot informa...Hello, nice article in here, I learn a lot information. I have a question: can I run the MSP430 to Low Power Mode 0 where fsmclk = 1MHz and make a pwm pulse of 800kHz or 500kHz in 1.5% duty cycle. I could not understand how the precision is lost.. <br /><br />Thanks in advance.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-43893375007415975872013-10-20T10:31:49.745-04:002013-10-20T10:31:49.745-04:00You can a few options. If you only need a few micr...You can a few options. If you only need a few microsecond delay, you should think of increasing the clock speed if you plan on using the timer. Otherwise, you can use __delay_cycles(us), since each clock tick is one microsecond. To use a timer, you could set the value which throws an interrupt to be your number of microseconds, and then put the CPU to sleep. When the interrupt is thrown, you can then wake the CPU up, resuming operation after a delay.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-33588687113343402832013-10-18T12:54:04.769-04:002013-10-18T12:54:04.769-04:00Hey Nick, how would you generate a precise delay u...Hey Nick, how would you generate a precise delay using the timer?<br /><br />So far, if I was using a 1MHz clock and wanted to make a delay of us microseconds, I've been using <br /> while(us--) { __delay_cycles(1); } <br />but when measured against an oscilloscope, this approach is useless. How would you use timer and interrupt to make a more precise one?Anonymoushttps://www.blogger.com/profile/09393924219620702936noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-39275376489349975282013-10-09T06:36:27.943-04:002013-10-09T06:36:27.943-04:00Hi need to produce a PWM at pin P4.0 in msp430f550...Hi need to produce a PWM at pin P4.0 in msp430f5505. <br />Can I do so?<br />If I can't do so ,then can I generate PWM without the help of timers ?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-44990431384698324942013-09-22T19:04:37.568-04:002013-09-22T19:04:37.568-04:00The best way to measure this is to toggle a pin be...The best way to measure this is to toggle a pin beforehand and then once the timer initializes. This measurement could be done using a logic analyzer, such as this one:<br /><br />http://www.amazon.com/gp/product/B004G4ZKA6/ref=as_li_ss_tl?ie=UTF8&camp=1789&creative=390957&creativeASIN=B004G4ZKA6&linkCode=as2&tag=msp0d-20<br /><br />If you trust the datasheets, TI provides this information.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-89764775785274985302013-09-21T16:39:28.013-04:002013-09-21T16:39:28.013-04:00Hey,
I need to do some time critical analysis.
H...Hey,<br /><br />I need to do some time critical analysis.<br /><br />How can we measure the clock initialization time?<br /><br />Thanks in advance,<br />PeterJupiterhttps://www.blogger.com/profile/14767047137876548243noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-75231438467339327342013-08-28T21:07:51.576-04:002013-08-28T21:07:51.576-04:00How to generate two PWM with different duty cycle ...How to generate two PWM with different duty cycle on two ports....Anonymoushttps://www.blogger.com/profile/16590370913868299584noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-8733979624627299702013-08-08T11:21:13.512-04:002013-08-08T11:21:13.512-04:00CCR0 set's the period of the PWM, not the duty...CCR0 set's the period of the PWM, not the duty cycle. If you are trying to use a baseline frequency of 250kHz, you must use the following equation: Source_CLK/250kHz = CCR0.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-23788527863446109712013-08-06T15:59:55.576-04:002013-08-06T15:59:55.576-04:00I'm using your code, trying to understand PWM ...I'm using your code, trying to understand PWM on MSP430. If I want to set max PWM frequency output to 250kHz, CCR0 = 25-1;?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-69271658828762487422013-06-26T11:15:57.364-04:002013-06-26T11:15:57.364-04:00Great question. TA0.0 is tied to CCR0 and TA0.1 is...Great question. TA0.0 is tied to CCR0 and TA0.1 is tied to CCR1. The PWM output at the physical pin is determined by the settings in the timer registers.<br /><br />http://www.ti.com/lit/ug/slau144i/slau144i.pdf<br /><br />Check out the user guide, section 12.2.5 for a more detailed description. Hope that answers your question!NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-78586458667302233492013-06-25T22:58:18.474-04:002013-06-25T22:58:18.474-04:00Hi all!
What is diffence between TA0.0 and TA0.1 p...Hi all!<br />What is diffence between TA0.0 and TA0.1 pin ? Please help<br />Thanks!Phongnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-22095828530487545732013-06-08T16:34:26.927-04:002013-06-08T16:34:26.927-04:00The short answer is yes. For devices with a hardwa...The short answer is yes. For devices with a hardware UART, it is quite simple. Take a look at TI examples for more information. When using a software UART, things can get a bit more complicated, but you can manually toggle pins for PWM in the timer interrupt routine. I hope that answers your question. Look for example projects, this is one of the best ways to learn.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-79873250764778564392013-05-31T01:28:53.087-04:002013-05-31T01:28:53.087-04:00is it possible to use pwm and uart simultaneously?...is it possible to use pwm and uart simultaneously? if so can you please explain me. i am new to MSP430. kindly help ASAPAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-58018129978969924142013-05-06T10:44:18.596-04:002013-05-06T10:44:18.596-04:00Please see this post:
http://www.msp430launchpad....Please see this post:<br /><br />http://www.msp430launchpad.com/2010/07/using-buttons-and-creating-new-project.html<br /><br />Follow all of my posts from the beginning, and I believe that it will help you out. For questions not relating to my posts, please check out forum.43oh.com.NJChttps://www.blogger.com/profile/05101156243681023963noreply@blogger.comtag:blogger.com,1999:blog-2168992611451428662.post-45512944411437706922013-05-06T07:35:15.288-04:002013-05-06T07:35:15.288-04:00hi
i want to use PWM as input in msp430. but its...hi<br /> i want to use PWM as input in msp430. but its not read the given input as digital(PWM). why?? how to read digital input directly rajhttps://www.blogger.com/profile/04921955173300937132noreply@blogger.com