Score from the MIT electronics swapfest

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
Hi there everyone!

This morning I walked over to MIT for their monthly electronics swapfest to see what gems I could find. They had a lot of nice equipment and components there, but I ended up buying only two items: A 6-foot DVI cable and a Texas Instruments MSP430 Launchpad, for a grand total of $8. I am kicking myself for not picking up a beautiful 6-digit frequency counter--the gentleman was selling it for $35, and I'm sure I could have talked him down to $25. I wish I'd bought it, it would have been a nice addition to my bench. I'm hoping it will be there next month (the last swapfest of the season), and I'll see about picking it up then.

Anyway, the point of this thread is to discuss the Launchpad. Does anyone here have experience with it, and have any suggestions? I've never used one before, so I've only just learned about some of the software that can be used with it, its specs, etc. Are there any limitations I should be aware of? My first impression is that it's nice, but won't serve as a replacement for the Arduino. As I said though, I only just got it and have not used one in the past.

Thanks everyone!
Regards,
Matt
 

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
@MrChips, if you're reading this--

Do you know if there's an existing delays header file for the M430G2553? I know there are cycle delays, but I'm looking for a delay_ms or something like that. I can write a simple one (though inaccurate) and was considering creating my own personal delays.h, but I was hoping there's already one sitting around somewhere.

Thanks,
Matt
 

MMcLaren

Joined Feb 14, 2010
861
Hi Matt,

Nice score. As for the Launchpad... the __delay_cycles() instrincic function in the CCS compiler is truly "cycle accurate" so it's pretty valuable. Why not just create 'clock', 'usecs', and 'msecs' constants and use them? (Note: one usec = one cycle per MHz of the clock)

Rich (BB code):
  #define clock 8             // 8-MHz DCO Clock
  #define usecs clock         // cycles per usec operand multiplier
  #define msecs clock*1000    // cycles per msec operand multiplier

  ~~~

    __delay_cycles(4*usecs)   // 4-usec delay
    __delay_cycles(22*msecs)  // 22-msec delay
If that looks too sloppy, you could always create a couple macros.

Good luck. Have fun.

Cheerful regards, Mike
 
Last edited:

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
Hi Matt,

Nice score. As for the Launchpad... the __delay_cycles() instrincic function in the CCS compiler is truly "cycle accurate" so it's pretty valuable. Why not just create 'clock', 'usecs', and 'msecs' constants and use them? (Note: one usec = one cycle per MHz of the clock)

Rich (BB code):
  #define clock 8             // 8-MHz DCO Clock
  #define usecs clock         // cycles per usec operand multiplier
  #define msecs clock*1000    // cycles per msec operand multiplier

  ~~~

    __delay_cycles(4*usecs)   // 4-usec delay
    __delay_cycles(22*msecs)  // 22-msec delay
If that looks too sloppy, you could always create a couple macros.

Good luck. Have fun.

Cheerful regards, Mike
Hey Mike. I've been using functions that work like that, but I wasn't sure they were that accurate. I didn't think 1 clock cycle was actually 1 uS. If it is, that simplifies things significantly.

Many thanks,
Matt
 

MMcLaren

Joined Feb 14, 2010
861
I didn't think 1 clock cycle was actually 1 uS. If it is, that simplifies things significantly.
Well, it's one cycle per MHz for each microsecond so it's one cycle per microsecond when using a one Megahertz clock, or two cycles per microsecond when using a two Megahertz clock, etc.
 

Thread Starter

DerStrom8

Joined Feb 20, 2011
2,390
If you prefer the Arduino style development environment, check out Energia.

Here's a video of the 5-pin Charlieplexed version... For some reason, I can't post the sketch but you can find it in this post.
Thanks Mike. I'd heard of Energia, and I have used Arduino before, but I find it too dumbed-down for my liking. I don't feel I have much control over what happens, so I got CodeComposer Studio for now. I'll probably try Energia at some point though.

Regards,
Matt
 
Top