MSP430 Scheduler

Multitasking On The MSP430F5529 LaunchPad

What exactly is multitasking, scheduling, and context switching? This is a great question for those interested in understanding how operating systems work, even small real-time operating systems (RTOS). [Jeffrey] had the same question, so he built a multitasking scheduler for the MSP430F5529 LaunchPad.

These topics are some of the most difficult to wrap your head around in the embedded world. Choosing a project that helps you understand tough topics is a great way to learn, plus it can be very rewarding. In his post, [Jeffrey] goes over the basics of how all of these things work, and how they can be implemented on the MSP430. Overall, it is a great read and very informative. For more information on RTOS, check out a few sections in the FreeRTOS book. Be sure to see his code in action after the break.

[Jeffery] was nice enough to release all of his code as open source, so be sure to check out his repository on GitHub. “Feel free to use it and learn more. I have made the code self explanatory. Enjoy!”

via [43oh.com]

Continue reading “Multitasking On The MSP430F5529 LaunchPad”

Huge RGB Ring Light Clock

After several months of work, [Greg] has completed one of the most polished LED clocks we’ve ever seen. It’s based on the WS2812 RGB LEDs, with an interesting PCB that allowed [Greg] to make a huge board without spending a lot of money.

The board is made of five interlocking segments, held together with the connections for power and data. Four of these boards contain only LEDs, but the fifth controller board is loaded up with an MSP430 microcontroller, a few capsense pads for a 1-D touch controller, and programming headers.

Finishing up the soldering, [Greg] had a beautiful LED ring light capable of being programmed as a clock, but no enclosure. A normal plastic case simply wouldn’t do, so [Greg] decided to try something he’d never done before: casting the PCB inside a block of resin.

A circular mold was made out of a piece of MDF and a router, and after some problems with clear resin that just wouldn’t cure, his ring light was embedded in a hard, transparent enclosure.  Conveniently stuck in the mold, of course. The MDF had absorbed a little bit of the resin, forcing [Greg] to mill the resin ring free from the wood, with a lot of finish sanding to make the clock pretty.

It’s a clock that demonstrates [Greg]’s copious manufacturing skills, and also his ability to troubleshoot the problems that arose. While he probably won’t be casting things inside an MDF mold anymore, with the right tools [Greg] could easily scale this up for some small-scale manufacturing.

 

Low-Power Orientation Tracker And An Optimized Math Library For The MSP430

MSP430 Orientation Tracker

Orientation trackers can be used for a ton of different applications: tracking mishandled packages, theft notification of valuables, and navigation are just a few examples! A recent blog post from Texas Instruments discusses how to build a low-cost and low-power orientation tracker with the MSP430.

Based on the MSP430 LaunchPad and CircuitCo’s Educational BoosterPack, the orientation tracker is very simple to put together. It can also be made wireless using any of the wireless BoosterPacks with a Fuel Tank BoosterPack, or by using the BLE Booster Pack with a built in Lithium Battery circuitry. TI provides all the necessary code and design files in their reference application for getting your orientation tracker up and running. Be sure to see the device in action after the break! This project not only involves building a low-power orientation tracker, but also showcases IQmathLib, a library of optimized fixed point math functions on the MSP430. One of the more challenging aspects of using small MCUs such as the MSP430 or Arduino is how inefficient built in math libraries are. Check out the IQmathLib, it greatly improves upon the built in math functions for the MSP430.

It would be interesting to see this project modified to be a DIY pedometer or be used on a self-balancing robot. It would also be interesting to see the IQmathLib ported to other micros, such as the Arduino. Take a look and see how you can use this reference design in your own projects!

Continue reading “Low-Power Orientation Tracker And An Optimized Math Library For The MSP430”

Web Interface For The FRAM LaunchPad

webUILaunchpad The Internet of Things is here in full force. The first step when adding to the Internet of Things is obvious, adding a web interface to your project. [Jaspreet] wrote in to tell us about his project that adds a web interface to his MSP430 based project, making it easy to add any project to the internet of things.

Creating a web interface can be a bit overwhelming if you have never done it before. This project makes it easy by using a dedicated computer running Linux to handle all of the web related tasks. The LaunchPad simply interfaces with the computer using USB and Python, and the computer hosts the webpage and updates it in real time using Node.js. The result is a very professional looking interface with an impressively responsive display that can control the on-board LEDs, read analog values from the integrated ADC, and stream accelerometer data. Be sure to see it in action after the break!

We could see this project being expanded to run on the Raspberry Pi with a multitude of sensors. What will you add a web interface to next? Home automation? A weather station? Let us know!

Continue reading “Web Interface For The FRAM LaunchPad”

MSP430-Based CTF Hardware Hacking Challenge

Hardware 'Flag'

Hacking conferences often feature a Capture the Flag, or CTF event. Typically, this is a software hacking challenge that involves breaking into targets which have been set up for the event, and capturing them. It’s good, legal, hacking fun.

However, some people are starting to build CTFs that involve hardware hacking as well. [Balda]’s most recent hardware hacking challenge was built for the Insomni’hack 2014 CTF. It uses an MSP430 as the target device, and users are allowed to enter commands to the device over UART via a Bus Pirate. Pull off the exploit, and the wheel rotates to display a flag.

For the first challenge, contestants had to decompile the firmware and find an obfuscated password. The second challenge was a bit more complicated. The password check function used memcpy, which made it vulnerable to a buffer overflow attack. By overwriting the program counter, it was possible to take over control of the program and make the flag turn.

The risk of memcpy reminds us of this set of posters. Only abstaining from memcpy can 100% protect you from overflows and memory disclosures!

 

New Version Of Energia Supports Wolverine And Connected

Energia UpdateThere is something to be said about how easy it is to write Arduino code. For those of who you are big fans of the MSP430 and Texas Instrument’s LaunchPad series, an upcoming release of Energia brings Arduino style coding to the two newest member of the LaunchPad family: the TivaC Connected LaunchPad EK-TM4C1294XL and Wolverine FRAM LaunchPad MSP-EXP430FR5969LP.

“Energia is an open-source electronics prototyping platform … with the goal to bring the Wiring and Arduino framework to the Texas Instruments MSP430 based LaunchPad.” The newest release of Energia is exciting for the sole reason that the new TivaC Connected LaunchPad and Wolverine FRAM LaunchPad are supported. The TivaC Connected LaunchPad is a $20 development board for TI’s low-power ARM processors that has Ethernet connectivity. The MSP430 at the heart of the Wolverine FRAM LaunchPad uses up to 250x less power than flash based MCUs at low speeds in addition to many other cool benefits.

Be sure to keep an eye out for the new version of Energia, it should be arriving sometime next week. Now is a better time than ever to try out the Tiva C or the MSP430 MCUs!

Java Grinder Spits Out DsPIC And MSP430 Assembly Code

java-code-grinder

[Michael Kohn] sent in a link to the set of projects he’s been working on lately. The Java Grinder is a project that converts Java code for use on microcontrollers. This actually started back in 2009, when he mentioned that the project was worthless because there were already a ton of Java virtual machines out there. But if he had really thought that he’d never learn anything. We’re glad [Michael] picked this back up and made something out of it.

The image above shows the proof of concept. It’s a box bouncing around the Nokia 6100 screen. He wrote the animation in Java, and used his grinder to turn the code into dsPIC assembly, which was then compiled and flashed onto the microcontroller. That’s not all, he’s also coded a Mandelbrot set generator or the same hardware. As it stands he can also produce assembly code for use on MSP430 chips.

This kind of exploration is great for the brain. We see it as a natural extension of the learning you acquire from Nand2Tetris which walks through the essential text The Elements of Computing Systems. If you’re not familiar, that’s a trip from building your first logic gate, which you plunk together with others to build an ALU, then start coding all the way up to a virtual machine to run on your simulated hardware.

Video of the bouncing box and Mandelbrot set is below.

Continue reading “Java Grinder Spits Out DsPIC And MSP430 Assembly Code”