Prev: Software PLL
Next: Hilbert Transform Phase
From: Codefragment on 15 Apr 2010 19:36 Can someone tell me the difference between these two? My guess is that T1CMPR initializes the compare value while CMPR1 allows you to change the value.
From: Tim Wescott on 15 Apr 2010 22:35 Codefragment wrote: > Can someone tell me the difference between these two? My guess is that > T1CMPR initializes the compare value while CMPR1 allows you to change the > value. The _only_ reason that I know that you're talking about some variation of the Texas Instruments event manager peripheral is because I happen to have worked with it -- and I could be wrong. _Always_ tell what processor you're using. It may be the only processor in the world to you, but it isn't the only processor in the world. Just because the processor says it's a "DSP" doesn't mean you're _doing_ DSP -- in this case you're not; you're doing plain ol' embedded code writing, and comp.arch.embedded would be a better place to post. _If_ you're talking about the TMS320F2812, or a substantially similar processor, then T1CMPR and CMPR1 control two entirely different sets of pins -- T1CMPR controls a simple PWM, while CMPR1 controls 1/3 of a three-phase motor control peripheral, which happens to drive not one, but _two_ pins, as well as doing a whole bunch of other interesting stuff. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com
From: Vladimir Vassilevsky on 16 Apr 2010 10:02 Codefragment wrote: > Can someone tell me the difference between these two? I can, but I won't tell you. > My guess is that > T1CMPR initializes the compare value while CMPR1 allows you to change the > value. My guess is that you should go and read the manual. Vladimir Vassilevsky DSP and Mixed Signal Design Consultant http://www.abvolt.com
From: Codefragment on 16 Apr 2010 11:40 >Codefragment wrote: >> Can someone tell me the difference between these two? My guess is that >> T1CMPR initializes the compare value while CMPR1 allows you to change the >> value. > >The _only_ reason that I know that you're talking about some variation >of the Texas Instruments event manager peripheral is because I happen to >have worked with it -- and I could be wrong. > >_Always_ tell what processor you're using. It may be the only processor >in the world to you, but it isn't the only processor in the world. > >Just because the processor says it's a "DSP" doesn't mean you're _doing_ >DSP -- in this case you're not; you're doing plain ol' embedded code >writing, and comp.arch.embedded would be a better place to post. > >_If_ you're talking about the TMS320F2812, or a substantially similar >processor, then T1CMPR and CMPR1 control two entirely different sets of >pins -- T1CMPR controls a simple PWM, while CMPR1 controls 1/3 of a >three-phase motor control peripheral, which happens to drive not one, >but _two_ pins, as well as doing a whole bunch of other interesting stuff. > >-- >Tim Wescott >Control system and signal processing consulting >www.wescottdesign.com > Sorry, you are correct I am using the TMS320F2812. I was provided code for a lab in school and they use the cmpr1 and T1CMPR. The board is connected to an H-Bridge to drive a small dc motor. If I understand you correctly, which I may not, the T1CMPR is the only thing I should be using for this application. Thank you for your help!!
From: Tim Wescott on 16 Apr 2010 13:19
Codefragment wrote: >> Codefragment wrote: >>> Can someone tell me the difference between these two? My guess is that >>> T1CMPR initializes the compare value while CMPR1 allows you to change > the >>> value. >> The _only_ reason that I know that you're talking about some variation >> of the Texas Instruments event manager peripheral is because I happen to >> have worked with it -- and I could be wrong. >> >> _Always_ tell what processor you're using. It may be the only processor >> in the world to you, but it isn't the only processor in the world. >> >> Just because the processor says it's a "DSP" doesn't mean you're _doing_ >> DSP -- in this case you're not; you're doing plain ol' embedded code >> writing, and comp.arch.embedded would be a better place to post. >> >> _If_ you're talking about the TMS320F2812, or a substantially similar >> processor, then T1CMPR and CMPR1 control two entirely different sets of >> pins -- T1CMPR controls a simple PWM, while CMPR1 controls 1/3 of a >> three-phase motor control peripheral, which happens to drive not one, >> but _two_ pins, as well as doing a whole bunch of other interesting > stuff. >> -- >> Tim Wescott >> Control system and signal processing consulting >> www.wescottdesign.com >> > > Sorry, you are correct I am using the TMS320F2812. I was provided code for > a lab in school and they use the cmpr1 and T1CMPR. The board is connected > to an H-Bridge to drive a small dc motor. If I understand you correctly, > which I may not, the T1CMPR is the only thing I should be using for this > application. Thank you for your help!! That depends on which pins connect -- read the pile of manuals, and chase down which segments of the Event Manager talk to the pins that drive the H bridge. You can probably limit yourself to the Event Manager manual and the processor's Data Manual (I think that's what they call the extended data sheet). The Event Manager will tell you the names of the pin(s) you need to look at, while the processor's data manual will tell you where those pins go on your particular chip. -- Tim Wescott Control system and signal processing consulting www.wescottdesign.com |