Posts

Showing posts with the label MSP430

MSP430 Fading and other long running activities using TwoMsTimer instead of delay()

Image
This video shows a simple test TI Launchpad test bed with an RGB LED tied to three PWM pins and the red LED that comes standard. The color fading and red LED flashing are independently controlled  with the code described below. Source Code Some folks just can't wait to open the source.  Here is the TwoMsTimer source along with the demo program used in this blog. Overview Micro-controller projects often include a mix of parallel tasks.  Handling those tasks with the right priority or interleaving can be a challenge when some of the tasks happen over long  periods of time. Long is relative to the execution speed of the CPU in this case. The simplest way to handle long running activities in a micro-controller is through the use of a loop that contains some type of delay to limit the loop's speed. One of the main problems with this type of code is that the  main loop() or central routines are blocked from doing anything else while in the delay block. The...

Digital Thermometer with TI Lanchpad MSP430 and Sparkfun breakout board for Nokia 5110 LCD

Image
The TI Launchpad  comes with a demonstration program that reports the current temperature of the on chip die back to a connected computer over the Launchpad's Serial/USB bridge.  The code is written in Texas Instruments Code Composer Studio (CCS).  CCS is a nice development environment but assumes a certain level of technical expertise not required when getting started with other environments. The LaunchPad Experimenter's Guide provides a schematic for the board. The folks on the Energia project on github (  https://github.com/energia/Energia  ) project have created a Arduino like development environment for the MSP 430.  Their libraries hide the register manipulation details from the developer though knowing those details is important when tuning the power tuning and performance of the MSP 430 CPUs.  The Energia project has a sample thermometer program that displays the current temperature on an the Nokia 5110 LCD display. Source is located on thei...