Jump to content


  • Content Count

  • Joined

  • Last visited

About clay_shooter

  • Rank

Profile Information

  • Gender
    Not Telling
  • Location
    Near DC
  • Sparkfun
  1. I worked (hacked) on the MSP430 TwoMSecTimer library until it became the AnyMSecTimer library that can be used on MSP430 or on the Stellaris / Tiva. It uses one of the timers when running on an MSP430 and a Systick handler on the bigger boards. Register your function from your ino file with the timer along with an interval in msec. The registered function will be invoked at that interval. A sample app is on github. https://github.com/freemansoft/build-monitor-devices/tree/master/ti_launchpad_rgb_2 -- setup -- AnyMsTimer::set(STATE_STEP_INTERVAL, my_function); AnyMsTimer::start(
  2. Thanks for the help. That was easy. My MSP430 timer callback now works on the stellaris.
  3. Thanks for the reply. I wasn't sure if it was 1ms or 1us. There are other posts floating around about delaymillis() vs delaymicros() and how they are implemented. I'm still not sure how micros are calculated if they aren't using SystTick, some other timer (5?) perhaps. So in theory, I should be able to register a handler with registerSysTickCb() and get a callback every 1ms?
  4. I'd like to run interrupt handlers on timer functions. With the MSP430 I had to write a library for it. It looks like I should be able to use SystTicks functions like registerSysTickCb(). How often would I get called? 80Mhz/???
  5. I really like the low profile "no wires" aspect of this boosterpack. I have a couple of DX Extreme and Sparfun breakout boards sitting on the shelf. Do you think it would be possible to solder those boards to the top of this one to use yours as a pass-through to the MSP430? I guess I could remove the LCDs from the DX Extreme boards and move them to yours if the pass-through won't work. Thanks!
  6. I used the code on this page http://mspsci.blogspot.com/2010_06_01_archive.html It sets up the timer that can be driven from the crystal. It requires CCS but you should get the general idea.
  7. You're not going to want to pause/delay inside an interrupt handler. They really need to process and exit as quickly as possible to re-enable other interrupts. For button debounce (I/O interrupt), you could accept the button and do the work on the first interrupt and then record millis() in a variable. Then any interrupt after that checks the recorded millis() to see if enough time has passed for this interrupt to be a new button press. Otherwise you would ignore the state if enough time hasn't passed. You can do the same thing if you are polling the button in a timer interrupt. You
  8. I've ported a version of MsTimer2 to the Energia / MSP430 environment. Its called TwoMsTimer and it provides a way to get a method called on regular intervals, as fast as once very two msec. You just create a TwoMsTimer object passing in the (void) method that you want called and TwoMsTimer will take care of the rest. The timer relies on Timer 1 in a way that is compatible with PWM letting you use the Timer 1 PWM pins and get timed function invocation. It is named TwoMsTimer because the PWM CCR0 interrupt rate is about 500Hz giving us 2 msec resolution. You can find the sample code an
  9. The problem is in the way path names get truncated and referenced. A directory with c:\dev\energia-0101E0006 and c:\dev\energia-0101E0008 has alternative names c:\dev\Energi~1 and c:\dev\Energi~2 (I think the second one is ~2). They are assigned the shortened names in the order they were created in the parent folder, c:\dev in this case. When I compile with 0101E0008 it actually runs the following which actually runs the code in 0101E0006. C:\DEV\ENERGI~1\HARDWARE\TOOLS\MSP430\BIN\msp430-g++ -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=msp430g2553 -DF_CPU=16000000L -DARDUINO
  10. I have weird problems with 0101E0008. It is installed in c:\dev\0101E0008 and 0101E0006 installed in c:\dev\0101E0006. version 0101E0008 works great until I delete 0101E0006. Then 0101E0008 can't find the compiler. It starts working fine if I restore version 0101E0006 to its previous location. Also copy HTML doesn't work in 0101E0008 but does work for 0101E0006.
  11. Has anyone ported MsTimer2 to the MSP430? The MSTimer2 Arduino library provides a simple interrupt driven mechanism for getting timed function invocation. I've used it to control fader and polling intervals without having to sit in delay() loops. It looks like TimerSerial and Servo make use of intterupt vectors. TimerSerial uses both Timer0_A0 and Timer0_A1 while servo uses Timer0_A0. It seems like an MSTimer2 port could use Timer0_A1 so that both servos and the timer could be used at the same time. I have a couple questions. Does TimerSerial or Servo usage mess with the PWM pins t
  • Create New...