Jump to content

Search the Community

Showing results for tags 'pwm'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • News
    • Announcements
    • Suggestions
    • New users say Hi!
  • Spotlight!
    • Sponsor Spotlight
    • Sponsor Giveaways
  • Energia
    • Energia - MSP
    • Energia - TivaC/CC3XXX
    • Energia - C2000
    • Energia Libraries
  • MSP Technical Forums
    • General
    • Compilers and IDEs
    • Development Kits
    • Programmers and Debuggers
    • Code vault
    • Projects
    • Booster Packs
    • Energia
  • Tiva-C, Hercules, CCXXXX ARM Technical Forums
    • General
    • SensorTag
    • Tiva-C, Hercules, CC3XXX Launchpad Booster Packs
    • Code Vault
    • Projects
    • Compilers and IDEs
    • Development Kits and Custom Boards
  • Beagle ARM Cortex A8 Technical Forums
    • General
    • Code Snippets and Scripts
    • Cases, Capes and Plugin Boards
    • Projects
  • General Electronics Forum
    • General Electronics
    • Other Microcontrollers
  • Connect
    • Embedded Systems/Test Equipment Deals
    • Buy, Trade and Sell
    • The 43oh Store
    • Community Projects
    • Fireside Chat
  • C2000 Technical Forums
    • General
    • Development Kits
    • Code Vault
    • Projects
    • BoosterPacks


There are no results to display.

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





  1. What is the preferred way to stop doing analogWrite (PWM) on a pin in Energia? For instance how should I change a pin to digitalWrite, or change it to input, or to just prepare to stop using the pin? In particular, how do you stop the timer (which is used to generate the PWM)? Studying the code for analogWrite, digitalWrite and pinMode I do not see where PWM timers are ever stopped once they are started. (I looked at the code on MSP430, Stellaris, and CC3200). To confirm my impression, I ran a little test on an MSP430. While I can change mode to output and/or do a digitalWrite
  2. I found out from this post that there are 14 PWM outputs possible on the MSP430F5529 microcontroller, and 10 PWM outputs possible on the MSP430F5529 Launchpad. How many are possible when using Energia? I think it is less, but I can't tell from the .h file. I will be using a custom BoosterPack so it doesn't have to stick to that standard. Thanks, Ben
  3. hi , i'm trying to create a PWM signal with period of 15 msec and pulse width the can vary between 1.1 msec and 1.9 msec. (I'm using the Msp430F5529 ) how can i do it? thx in advance.
  4. Hello, I'm planning for a project the use of 12 Channels PWM (Frequency must be above 60khZ, because of driving some VCA´s and not getting into the audio range). As I know, Energia uses "software" PWM with the use of timers (the hardware PWM´s of the new TIVA's is not implimented). So my question is, may I can get some overall performance boost using the driverlib hardware PWM rather than the energia software version? Thanks regards Matthias
  5. The usual way to generate PWM with the MSP430 is to set the timer to up mode, CCR0 to the PWM period, and then use CCR1 and up in reset/set mode to set the PWM pulse width. This provides a precise hardware driven PWM with minimal CPU overhead. The only ISR required is the CCR0 interrupt so new PWM values can be updated without creating glitches. It is possible to use CCR0 to do PWM in addition to CCR1 and up by using continuous mode and output compare toggle mode. This requires an ISR for each CCR used. It is glitch free and allows different PWM periods for each output if desired. The
  6. Hi, Playing around with AnalogWrite and my scope: This little script toggles between two duty cycles: const int analogOutPin = 9; void setup() { pinMode (analogOutPin,OUTPUT); } void loop() { analogWrite(analogOutPin, 100); delay(15); analogWrite(analogOutPin, 150); delay(15); } below is how this looks on the scope, blue direct, yellow with a simple R-C lowpass. every now and then, when changing duty cycle, I get an extra-long pulse. I am using the G2553 on the launchpad, with xtal. I have seen on this forum that calling AnalogWrite when NOT changing the duty c
  7. Hi, I am trying to use the analog write function on energia and am having trouble. When I use the function on the inbuilt LEDs everything is working fine but when I use it on external circuits, if I use analogWrite(255)(the maximum) the led is staying on with the maximum brightness as it supposed to but for any other values, its off. In the example codes there is one which increases and decreases the brightness of the led periodically. For the in-built LED its working fine but for others, when the brightness is supposed to be maximum, the LED is staying on and all other time its off. Any help
  8. How to change the output frequency of the analogWrite() function in Energia??
  9. L293D

    Auduino code

    I am sure everybody has seen the Auduino code (Grain synth for arduino). I don't really understand the way that the PWM is setup, so I have no idea how to make this work on the MSP430 (or if it even can). Could someone explain how the timers are setup in this code? and the interrupt vector as well? I am just curious how one would setup the timer on one of the MSP430's? // Auduino, the Lo-Fi granular synthesiser // // by Peter Knight, Tinker.it http://tinker.it // // Help: http://code.google.com/p/tinkerit/wiki/Auduino // More help: http://groups.google.com/group/auduino // // Analog
  10. Earlier this year I happened to be in Singapore in transit, and took the opportunity to visit Sim Lim Tower - a high-rise mall full of electronic components shops! Amazing place, and amongst other things (including super-cheap kits for the kids to build!) I picked up three 5x7 LED matrix panels for a dollar each (!!). They didn't have any part numbers that I could see, but after experimentation they turned out to be row-anode devices and once I figured out the pinout I decided to build a project out of them. As any of us who have children know, it's a daily battle to get kids to brush thei
  11. When programming recently, I found that I had some trouble controlling a motor at the same time as several servo. The servos would go all crazy, and the motor wouldn't work. I guessed that this was because the timers were interfering, or not enough timers, or similar. Digging into the servo library, and the analogWrite function, I found that they're both trying to use Timer A. Thus, I modified the analogWrite function. In file energia/hardware/msp430/cores/msp430/wiring_analog.c , I commented out lines 110 to 123 (inclusive). Below is the code commented out. case T0A1:
  12. cromiumlake

    PWM led

    HI there, I'm playing around PWM, for now just with leds. I checked the teory, but I need to get a simple example. I'm working with msp430-gcc, this code was the easier that I found. They seem to use a shorter syntax (P1OUT_bit.P1OUT_0) that I don't get. I also have few errors, mentioned below. ------------------------------- #include <msp430g2553.h> #include <intrinsics.h> // Intrinsic functions int main( void ) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer BCSCTL3 = LFXT1S_2; // Select ACLK from VLO (no crystal) // Initialize ports P1OUT = 0; // Preset L
  13. MSP430g2553 ALL DOCUMENTATION BELOW Playing with IR receiver (IR Library from Energia) and RGB led. I cant write analog values to my RGB led without breaking the program. I connected the three outputs to analogWrite capable pins. All works great when writing 0 or 255 but the library stop working well when i try to write other value to make the color less bright. Then i read about timers and PWM. I notice my library use Timer1_A so i need to connect leds to pins capable of analog writing but using Timer0_A. These pins were three, but one is RXD of Serial and messed things up. So I changed
  14. Ok, I am out of ideas on this. I am going to start by saying, this works on an arduino uno, no problems. Then follow that up by saying this works perfectly on a launchpad with a 2553 in it IF I DO NOT USE THE IR LIBRARY. So this is what happens: Simple motor control for a two motor robot. Using the IR Library to receive commands from a remote control. I upload the code, and I can make both motors go full throttle, forward, or backward. The moment that I try to spin right or left, I get a quick "jerk" from both motors, in opposite directions (as I would expect) and then no
  15. Thanks for taking the time to read this. would love to collaborate with some MSP430 beginners as myself in controlling stepper motors for our home projects. :thumbup:
  16. Hi all, After a little help with some PWM code, the code is below and the areas I believe to be the main issue are in bold. I basically have 2 LDR's linked up to P1.1 and P1.2, then I would like to have 2 PWM outputs on a further 2 pins say P1.4 and P1.5. The code below is working as far as the ADC and changes the brightness of an LED on P1.6, but I am struggling to have any output on another pin (currently trying P1.5). I have been looking at the TI PDF's slau144i and the MSP430G2231 datasheet, but still unsure how to approach this. There is another small question regarding the
  17. I don't have one of these yet, I am still waiting for mine to arrive. My question is this: How many "individual" pins on this board are capable of doing analogWrite? I say individual as on the MSP430G2553 while there are 6 pins available, certain pins share the same timer, so you can only use 1 pin out of a "pair" which share a timer. So, that said, does anyone have an answer to this? Thank you! Also, I read somewhere that the pins on this board are 5 volt tolerant, however while reading the datasheet, it looks like that isn't the case. Would be great if I could use th
  18. Hello everyone, I am using the launchpad with MSP430G2452 motherboard "sam board", unfortunately I cannot have the datasheet Chassis Pololu RRC04a with two wheels and two DC motors IAR Workbench The thing I need to do for my school project is to be able to run the "robot" in a straight line. But I can't figure how. I use CCRO as the period of the PWM signal, CCR1 for the duty cycle of the first PWM and CCR2 for the duty cycle of the second one. But the second PWM is acting weird therefore I think I didn't understand how to make it work. With this code, the second PWM is not running at the
  19. 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:)
  • Create New...