Jump to content
43oh

Search the Community

Showing results for tags 'timer'.

  • 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. Hi, i'm trying to start a pwm signal and stop it after 50 miliseconds. But i can't because i can't use timer interrupt vector properly. my count never increments. Here is my code #include <msp430.h> #include <msp430g2553.h> void startPWM(void); unsigned char counter=0; void stopPWM(void); int main(void) { WDTCTL = WDTPW | WDTHOLD; // Stop watchdog timer BCSCTL1 = CALBC1_1MHZ; // Set range DCOCTL = CALDCO_1MHZ; CCTL0 = CCIE; P2DIR |= BIT2; //IR transmitter P2SEL |= BIT2;// Select pwm pin (transmitter) P2OUT=0x00; while(1){ if((P1IN & BIT4)!=BIT4) //button
  2. I would like to trigger the sampling from a timer, but somehow cannot find the required information about the ADC12SHS bits in the ADC12CTL1 register. The family manual tells me to look in the specific device datasheet for that information, but I can't find it there (the MSP430F5529 datasheet). Also looked into the mspware C examples, but none uses timer triggered A/D. Where should I look for that info (which timers can be used, and how to set ADC12SHS bits to use them)?
  3. Hello Guys, Good Day for All. May I ask whether there any library or function for using Timer in energia as in arduino? For example if in arduino we can use Timer1.attachInterrupt() I appreciate your help. Best Regards, Lukman
  4. I need a one example of timer interrupt like timerone.h for arduino, yhank you, for help me!!!
  5. I am developing a timeout / soft timer library for the MSP43x and would like to share it with you. It's still in the initial version, but all the functions are working. I'm developing and testing on MSP430F6736, but it worked fine on launchpad EXP430F5529LP. The library uses a timer to periodically generate ticks. In the base version developed by Felipe Lavratti, the timer-tick occur every 1us through a 32-bit timer (ARM Cotex). To avoid overloading the CPU I modified the code to accept longer time intervals and also functions to automatically calculate the Capture / Compare value of
  6. I'm new to MSP430 and I'm trying to do a frequency/period measurement. I've read about timers and get the main concepts though I'm still learning. To get an idea of how they work, I'm using this code. It outputs a PWM on one pin which I connect to another pin for capturing period: http://coecsl.ece.illinois.edu/ge423/datasheets/MSP430Ref_Guides/Cexamples/MSP430G2xx3 Code Examples/C/msp430g2xx3_ta_21.c After making some modifications (removing unneeded code to light led and adding calculations for frequency) it works with the original pins. However, I want to change which input pin will t
  7. Hello folks, I recently wrote a library that performs an application requiring using 5 timer modules, leaving the 6th out. I looked through some of energia's source code afterwords in case there would be any conflicts, and I noticed that at least the analog write function utilizes a timer to generate its pwm. I might be able to bypass that since I leave 1 timer open for other usage. Does anyone know what timers energia needs to use in its libraries that would cause conflicts?
  8. 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
  9. Can someone provide a code for implementing a watchdog timer to autoreset in TIVA TM4C1294ncpdt using energia?
  10. Hello all together, I need a very accurate timer for a midi clock. For that reason I need a timer, that is giving me for every beat 24 beats back. At hte same time, I need a serial connection with 31250baud. My question is now, how do I get a very, very accurate timer. The timer quarz is normaly 32768, and this is maybe a little bit to slow, becaus I want my bpm with one digit after the point like 121,1bpm. I have a MSP430G2553. Can I connect a 1MHz or even a 4MHz cristal to the
  11. 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
  12. Hi all, I am facing problem while reading DHT values in timer ISR function. I am able to get the data if use i dht.readHumidity() (using dht library) in loop function but not able to get when i use in timer ISR function. Can anyone please help me out. Thanks in Advance.
  13. Hello all. I'm new to CC3200 and trying to develop an application for the launchpad using a Timer. Energia has the timer.h module, and I've found TI's documentation for the General Purpose Timer module, along with a few code snippets. My code dies when calling TimerConfigure(base, type). I think that this is because the timer peripherals need need to be enabled as a system peripheral before they can be manipulated. It looks like SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMERx) is what you'd call before calling the TimerXxx functions. However, the cc3200 driverlib doesn't have a s
  14. Hi everyone. I just got a cc3200 launchpad and am coding on a Mac with Energia. I'm impressed with what this setup can do. I'm trying to get a handle on how on how to how to use the timer functions to create one-shots or functions called at specific intervals. I can find references in Energia.h and driverlib/timer.h but no docs or samples. If anyone has any tips on getting started please pass them on, I'd appreciate it. Looking forward to coding... - eric
  15. All, Here is me again struggling with the timer. What I am trying to do is count to CCR0, passing through CCR1, generating interrupts when timer overflows and when it reaches CCR1 value as well. From TI examples I had understood I should set up something like this, adding code to the appropriate "switch" cases: #pragma vector=TIMERA1_VECTOR __interrupt void Timer_A(void) { switch( TAIV ) { case 2: break; // CCR1 not used case 4: break; // CCR2 not used case 10: P1OUT ^= 0x01; // overflow b
  16. 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
  17. Trying to use SysTick to set the sampling frequency of my ADC. Im a bit confused on the interaction of the two though. If my ADC is running at 125KSPS how do I need to set SysTick to 125KHz? 250Khz?? Or how does this work? my code: #include "Energia.h" #include "inc/lm4f120h5qr.h" #include <stdint.h> #include <stdbool.h> #include "driverlib/adc.h" #include "inc/hw_types.h" #include "driverlib/adc.h" #include "driverlib/gpio.h" #include "driverlib/sysctl.h" #include "inc/hw_ints.h" #include "driverlib/interrupt.h" #include "driverlib/sysctl.h" #include "driverlib/timer.h" #incl
  18. 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
  19. Hi all, I have made a couple of MSP430 Tutorials and thought I would share the links here: ADC tutorial and example code I did this one awhile ago and just covers the ADC with 3 example codes, multiple channels, multiple reads etc http://coder-tronics.com/msp430-adc-tutorial/ Timer tutorial and example code Only posted recently and covers both timers on the MSP430G2253, again with 3 examples PWM, interrupts etc. http://coder-tronics.com/msp430-timer-tutorial/ Programming tutorial covering the GPIO and peripheral registers I found this all a little confusing when I started
  20. Hey all, I've run into a peculiar problem where my main loop doesn't execute. I know my interrupt routine is executing because I can uncomment the led toggle and I can see it blink. From what I've researched thus far, I believe the issue might be that the ISR is starving the main loop from ever executing. If that is the case, I'm not sure what the solution would be. The reason I have my main loop set up this way is because I am going to need different functions executing at different intervals. I'm still fairly new to MSP430 development, so any help will be appreciated! #include &l
  21. Okay... yet another project from me. But this one is close to being real. Basically, it's a toothbrush timer for my nephew. The intent is that he can press a button when he's getting ready to brush his teeth, and the unit will do some LED dances that eventually turn into an LED blinking seconds, and 3 LED's light up based on how far along he is into the brushing ritual Blue LED is the 'second' indicator. Red LED indicates he's in the first minute of brushing. Yellow LED indicates he's in the second minute of brushing. Green LED indicates he's in the third, and final, minute of
  22. Dear all, I am an AVR atmega8 refugee, and msp's clocking scheme seems pretty feature rich (not to mention complex!). I am using MSP430G2 launchpad (g2553). This program uses TImerA, and hardware UART with interrupt. It runs at 1Mhz from DCO. And the peripherals take clock from SMCLK. The UART just echos whatever it receives. The timer generate 500ms delay, and toggles the red and green leds on board http://pastebin.com/yApLyFbu The problem is, I can only have one peripheral at a time using the SMCLK. If I have the above code running exactly as it is, the timer will correctly r
  23. Hello, I am trying to read in two PWM signals from an RC receiver. I have managed to read in one and have got the result I expected. However, I am unable to read in two channels. The interrupt handlers never get called. I have modified the startup.ccs.c file to call the appropriate handler. Here is the configuration code that I am using: //Enable PortB Interrupt SysCtlPeripheralEnable(SYSCTL_PERIPH_TIMER2); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); GPIOPinConfigure(GPIO_PB0_T2CCP0); GPIOPinConfigure(GPIO_PB1_T2CCP1); GPIOPinTypeTimer(GPIO_PORTB_BASE, GPIO_PIN_0)
  24. Hello everyone, I'm trying to add some sound to my robot. The Energia example sketch "toneMelody" compiles without error unless you also include the library Servo.h. I have read that Arduinos have the same problem, it is because both libraries call upon the same timer. Is it possible to change the code for one of the libraries so that it uses a different timer, if one exists, so that the libraries do not conflict? I'm still a novice at all of this so any help would be much appreciated, thank you. I am using the m430g2553 chip on the Ti Launchpad MSP430 rev.1.5 board. Energia v0101e0011
  25. Here's what has been keeping me busy (apart from my real job) since just after Christmas - a timed camera remote. It is mostly code complete, although could do with a few tweaks here and there. The hardware however isn't quite finished as I'm still waiting for a few parts to be delivered before I can finally finish it - the most critical of which is the 2.5mm stereo plug to go into the camera. Consequently it hasn't actually fired my camera yet, but I'm confident it will work correctly when the final parts arrive. Background Many moons ago, I created a serial port remote release for my S
×
×
  • Create New...