TI's example code is often confusing and over-engineered. It is much better to find advice on blogs and forums instead.
The community has some great individuals that will produce great examples and tutorials. Unfortunately, it is very far removed from places like GitHub. Almost all code is shared directly in the forums at 43oh.com.
There are a couple of big projects surrounding MSP430's. Energia is, from what I understand, an Arduino-like IDE which lets you program at a much higher level, but at the cost of some performance. When you only have 512 bytes of RAM, it may or may not be an issue. Another one is BSP430 which is a lower level set of libraries. It promises much higher level abstractions at the cost of small performance penalties. I found the tutorials to be rather terse, but I may need to give it more time.
Outside of those big projects, there is lots of duplication of effort. It is typical to see 3-5 different implementations of bit-banging UART drivers that are all slightly different. I am no exception, as I started writing my own little set of libraries for dealing with various peripherals.
Lastly, a lot of the tutorials out there either use the register names directly (P2IE, P1SEL, etc) or provide really poorly named abstractions (cal_adc_15t30). Most of my time working with it so far has been spent on naming functions something like gpio_get_val(), uart_puts(), etc.
P.S.: Physical hardware buttons are terrible devices. Debouncing them is a must and most implementations in the wild are incorrect. [1] is a good read.
#define LED_GREEN BIT6
would be an improvement. However, I'd be willing to pay a small cost in terms of RAM/performance for doing something like this: gpio_get_val(P1, 6);
which would return whether port 1, pin 6 is high or low. I think that can even be a macro so it would be compiled down to (P1OUT & BIT6).For more performance oomph, there are Cortex-M3 parts which exceed or meet the efficiency of the MSP430 line, such as the Energy Micro EFM32.
If you use a buck regulator, you could use starting voltages beyond the chip's max voltage limit and burn the power past a typical dead cell's voltage levels -- start with a 12V battery using 1.8V logic and burn the battery down to 2V -- probably around 98% used.
I think you'll find that most projects out there use a voltage regulator because you can use up "more" of the battery this way.
Two 0.9V alkaline cells can still power most microcontrollers, especially in sleep mode, and red LEDs will still light. If you really need higher voltage, than the boost is the way to go.
I previously worked off of an MSP430-turned-EFM32 product which had a MCU+radio lifetime of 5-7 years on 4-AA cells (two paralleled). Most switcher solutions we looked at wouldn't have netted a measurable increase in runtime due to the much higher sleep currents in those units compared to even the MCU.
You'll have a really bad time if you try to build a buck-boost switcher in a breadboard and won't have a clue why its not working. On the other hand you can throw an LDO into a breadboard with a couple caps and be pretty confident it'll just work.
It's powered by the metal. The fruit just acts as a salt bridge from the metal. The power source is the oxidation of metal.