Jump to content
43oh

Search the Community

Showing results for tags 'pwm'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • 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

Calendars

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Location


Interests


Sparkfun


Github

  1. Hello, sorry for my bad english. i want produce PWM signal in 38khz. (my reciever is tsop1838 and transmitter is TSAL6200). Firstly, leds on the reciever side are blink. But a few seconds later, they turn off. What's the problem? My codes: //Transmitter #include <msp430.h> int main(void) { WDTCTL = WDTPW + WDTHOLD; // Stop the Watch dog timer while(1) { P1DIR |= 0x0C; // P1.2 and P1.3 output P1SEL |= 0x0C; // P1.2 and P1.3 TA1/2 options CCR0 = 12; // PWM Period/2 CCTL1 = OUTMOD_6; // CCR1 toggle/set CCR1 = 6; // CCR1 PWM duty cycle TACTL
  2. I cannot get this led to dim. It will flash on and off but no PWM as far as I can see. I copied the code right from the website here. http://energia.nu/Tutorial_Fading.html and wired everything the way it should be. Using a 220Ohm resistor instead of the 10k they had in there BOM. What am I doing wrong? I am using the MSP430G2231 chip and have all my settings in energia set accordingly I really don't know what I am doing wrong or if I have a faulty chip? Looking for someone to point me in the right direction.
  3. I need to have a very accurate PWM frequency generated with my MSP430G2553IRHB32R. I'm shooting for 25.1khz. However, when running on different boards, I can see variances of up to 3khz in the frequency. I understand this is due to the slight inaccuracy in the processor's internal clock. So, I would like to attach an external crystal or oscillator to it but don't know how. I've read a couple places that say that this chip doesn't support a crystal, but that I could use an oscillator. The questions I have is how does one connect the oscillator, and what code changes are necessary to t
  4. Hi, I have a EK-TM4C1294XL evaluation kit and a BOOSTXL-EDUMKII board connected to it. I cannot get the RGB_LED_RANDOM example to work. The LED's work as if i change the analogWrite(ledRed, random(255)) to analogWrite(ledRed, 255) the LED comes on. Any value other than 255 results in the LED staying OFF. I have jumper J5 in the top position (1-2) which i believe is correct. What do i need to do, to get the PWM running? thanks
  5. I am using Energia 17 environment with LAUNCHXL-F28069M board. I would like to implement PWM signal on two pins. One signal for example with 30% duty cycle and second inverted to the first one. It means when 1st pin is HIGH the 2nd should be LOW and conversely. In arduino language is only one function for PWM "analogWrite(80,100)". How to set inverted PWM signal in the same phase on second pin?
  6. I'm working on a project where I need to oscillate at 25khz. I've been using the PWM built into the MSP430G2553 and it doesn't seem to be accurate enough to give me exactly 25khz. I've been getting anywhere from 23khz to 27khz and cannot figure out why it's off by so much. I might be doing something wrong. Does anybody know what sort of accuracy I should expect from the on board PWM in the MSP430G2553. Is there a way to make it more accurate? I was looking at adding an external crystal, but would rather not add that complication if it isn't necessary.
  7. PWM is much easier on the new Launchpad using the PWM peripherals, here is a working example using the 3 onboard LEDs. #include <stdint.h> #include <stdbool.h> #include "inc/hw_gpio.h" #include "inc/hw_types.h" #include "inc/hw_memmap.h" #include "driverlib/sysctl.h" #include "driverlib/pin_map.h" #include "driverlib/gpio.h" #include "driverlib/pwm.h" int main(void) { unsigned long ulPeriod; //Set the clock SysCtlClockSet(SYSCTL_SYSDIV_1 | SYSCTL_USE_OSC | SYSCTL_OSC_MAIN | SYSCTL_XTAL_16MHZ); //Configure PWM Clock to match system SysCtlPWMClockSet(SYSCTL_PWM
  8. So, this is partly for me, and partly for others who need a refresher, or just do not know how. But I will be making several post here over time on how to write very simply code, to do one thing, or another. These, used in conjunction with a shell script could be very useful / flexible. After several long talks with many people, including some here on these very forums. I've decided that using C, to communicate with hardware, or hardware interfaces is best as can be for many situations. However, when you need to run several tools all at once, and have output formatted in some fashion, or easil
  9. Hello all !! I have a question about my TIVA board: What is the range of frequencies that we can get for the PWM, taking into account the possibilities of "clock division" and the "number of bits"? I ask you if in case we had to measure a resonator with the PWM as a generator (at 50% duty cycle). regards
  10. So I have my MSP430 launchpad with g2553 and g2452 lying around for year now and finally have a reason to use it. I'm a total noob (I mean I programmed some assembler and C in college and know some basic stuff about MCUs but never actually put it to use), but my for my first project I've picked a tough one. That way I'll be challenged and won't get bored. So I've just bought a motherboard that only has 2 fan connectors on it, but I need at least 4 of those, so I decided to make a fan controller. I could just use some 7805s but what's the fun in that? The idea is to use the inferior msp43
  11. I have a custom board that is driven with an MSP4302553 chip and can drive a Piezo Transducer which resonates at 25khz. I am limited to using a single rechargeable Lithium battery which is 3.3v. In order to get the 117dB that I want out of the Piezo Transducer, I need to generate a square wave with a 25khz frequency and 10volts across the 2 Piezo pins. I found a Push Pull library which allows me to get a -3.3v-3.3v range, or a total of 6.6v across the 2 pins on my Piezo. This gives me about 80dB. I need to boost that voltage by just a little bit after the PWM pins, without losing
  12. From the tm4c1294, I thought I remembered only seeing 8 PWM pins, yet the Energia picture (http://energia.nu/wordpress/wp-content/uploads/2014/06/LaunchPads-LM4F-TM4C-%E2%80%94-Pins-Maps-13-34.jpeg) shows quite a bit more than that. Can you really get PWM on every pin marked for PWM on the Energia diagram, or is it a case of all of the pins marked being PWM capable but only get PWM on 8 of them?
  13. Hello, I wrote a very simple PWM Code for my Brushless DC Motor (incl. ESC) and it works very good (I don't use any Potentiometers.): int motorPin = PF_1; void setup() { pinMode(motorPin, OUTPUT); } void loop() { analogWrite(motorPin, HIGH); delayMicroseconds(1000); analogWrite(motorPin, LOW); delayMicroseconds(19000); } I need 50Hz (1/50=20us). The Motor breaks when the first delay is "1000us" and the second is "19000us". The Motor arrives highspeed when the first delay is "2000us" and the second is "18000us" So my dutycycle should be between 5 - 10% What
  14. I am uploading the fade example of energia to the tiva t4mc1294 connected launchpad but the LED is not fading. It is just blinking. I have also connected the pwm output to motor drivers but the speed of the motors are not changing. When I check the voltage of the pin with my multimeter, I get 0.66v. I have tried the fade example on different pins like PF2, PF3(pins marked for analogWrite in launchpad reference) but the results are same. Here is the code for the fade example, given as reference. int brightness = 0; // how bright the LED is int fadeAmount = 5; // how many points to f
  15. Hi, Sorry for the repost, I save my preview topic in the wrong place I think (http://forum.43oh.com/topic/9286-msp432-servo-librairy-conflicting-with-pwm-analogwrite/, if someone can delete this one...). I am using an MSP432P401R launchpad Rev B with Energia 17 on Windows 10. I've recently got this issue: I can't control servomotors with the Servo.h librairy and at the same time send several PWM. As soon as I called the "attach" function from Servo, the others call to analogWrite in my code don't work anymore. I think it is due to some timer conflicts (both functions using A0 timer
  16. Hi , I have written my scheduler which uses the Timer0 subtimer A to generate interrupt for Multi-tasking. I have tested the waverforms generating accurately and arriving at the right time periods. Now the issue that I am facing is PWM waves are not arrived at the expected time. Is PWM interfere with the Timer functionality? What is the work around? Are there any free timers available which I can use it for my scheduler? Some insights to this would really help. Thanks, Peeyush
  17. Hey guys! I'm having some fun with my MSP430 and started to play with the Energia IDE so I can make some tests faster than by the standard library of the microcontroller. But I've searched on the reference and saw that the only function to use with PWM is analogWrite()... How could I change the frequency of the PWM instead of only its Duty cycle? Thank you guys!
  18. Hello! I am new to embedded programming and the forums. For my first task I am trying to generate a clean square wave with a configurable frequency and I figured PWM would be a good way to do this. Below is my code. This works to an extent, but during the off time there are regular spikes to 3.6V at about 10kHz as seen in my scope plot. The scope is a cheap Rigol DS1102. How can I eliminate these spikes? and is my approach the best approach or is there a better one that may not have the extra spikes? thanks in advance for the help! void setup() { // declare pin 14 to be an
  19. I've been looking for a while and can't find a good example showing how I can play any sort of music or speech files (mp3, au, wav, etc.). I've got a configuration setup that allows me to read files for things like LCD screens, I'm looking to read a music or speech file and play it through an amplified speaker. I'm not looking to make just tones, rather to play full music or speech files. I've found projects for Arduino such as (http://hlt.media.mit.edu/?p=1963), but nothing that works with MSP430 and Energia. Has anyone done something similar to this with Energia?
  20. I am using an MSP430fr5969. The board only has one hardware pwm available and it located on P1.2. For my application, I need to generate two different pwm signals to control two different motors. One of those is a servo, the other is a linear actuator but it is controlled through a motor speed controller that uses a pwm input (replicating that of an RC receiver). Can I use the servo library and attach a servo to any pin or does that pin have to have hardware pwm? I looked through the Servo.cpp file and it seems to be doing software serial. When i run servo examples, and hook the
  21. I am looking to run two motors via motor controllers that require pwm signals. I have learned how hardware and software pwm work. I also have learned what would be required to create a software pwm with a chip timer and clock in CCS. I am still however confused on whether this is required in energia and how I can tell what pins i am able to use. Using a MSP430fr5969: Can i simply use the analogwrite() function on a pin that allows for it to be used according to the pin map http://energia.nu/wordpress/wp-content/uploads/2014/10/LaunchPad-with-MSP430FR5969.jpg ? Does the analogw
  22. Hi, I need to generate 4 pwm signals at 50 HZ, they need to run with out interruption. I know the TM4C123G6PM has 2 pwm blocks, but is it possible to access them through Energia? can I use Analog.write(); ? Someone please help. Thank you.
  23. All, Can I output a PWM signal to P1.0 pin (G2231 chip) using timer A in up mode and setting CCR0 / CCR1 accordingly? In short, I was going to use the example code provided by TI (see slac163 and slaa428, example I'm using is the "C" code msp430x21x2_ta_1.c), where pin P1.2 is used for the PWM output. Well, I tried to modify the code to output the signal to P1.0 but can't get it to work. My conclusion is that P1.0 cannot be selected for such function, but I cannot find anythere in the user guide or datasheets a confirmation. In fact, by reading the datasheet (page 6) I had understo
  24. 3 channel, high power LED driver, built to fit 10W RGB LEDs (those things are blindingly bright!) Now on Tindie.
  25. Hello, im barely new in ARM programming. What i want to do is to run four independent PWM channels to manage my things. I wrote some code and as i supposed it didint work. In debug process i checked registers and it seems to be ok. Load and match values are corerct so i think error is somewhere in timers configuration. Can someone help me out ? Thanks in advance for reply. Here is my code that i ran on my launchpad. #define PART_LM4F120H5QR 1 #include <inc/hw_types.h> #include <inc/hw_memmap.h> #include <driverlib/sysctl.h> #include <driverlib/gpio.h> #include &l
×
×
  • Create New...