Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Introduction to MSP430 Interrupts

In this tutorial, we will see a practical way of coding interrupts. Our task for today will be to learn interrupts for GPIO and Timers. In the initial part, we will first have a look at coding interrupts for the GPIO pins and in the other half, we will modify this code to add interrupts for timers. By the end of the tutorial you will have a code that will blink a led using timer interrupt, however, the blinking frequency will vary if you push a button. In the last tutorial on timers, we saw that we were continuously monitoring the timer flag to check when the timer has overflown. This process is called polling. The only problem with this method is it keeps the processor busy. What if we… Continue reading

Timers of MSP430

In the last tutorial, we had a look at configuring clocks or internal clocks of the MSP430. Since you are now at a stage where you can set clocks on your own, we can use them to access various functions of the MSP430. All of the major features such as the ADC, timers, e.t.c rely upon the clock or the clock speed at which the microcontroller is functioning. Timers of any microcontroller are special registers that increment or decrement their value automatically. They are an integral part of the microcontroller and are used in almost every project from basic to complicated one. A useful feature of the timers of the MSP430 you can use them to achieve real time clock i.e., a delay of precisely 1 sec, provided you use… Continue reading

Configuring the DCO of MSP430

Clocks are an essential part of any microcontroller. These are the first thing one should know while beginning to use any feature of the controller whether it’s a timer, interrupts, or ADC’s. All of them rely on the clock setting of the microcontroller and works accordingly. The MSP430 is not so different. However, it features a very easy to configure clock settings which might look a bit tough initially but once you get used to it, you will find it amazing to use. Unlike AVR, where you use super complicated fuse bits to change your clock source as well as the frequency, this is not the case with the MSP430. The clocks are easily configurable, and importantly if you are using internal clock, you can change its frequency at any… Continue reading

Connecting buttons to MSP430

In this new tutorial, we will see the easiest way to connect a push-button to the MSP430. I will be using msp430 Launchpad for the purpose of the tutorial, however you can use a bread-board too externally interface the push-button Before I begin, I want to tell you the advantage of Msp430 over other sets of microcontroller available in the market.  As you might have seen, msp430 is a pretty cheap microcontroller from the Texas family, and has a 16-bit wide data bus for processing the data but has very few number of pins. Only 2 ports of 8pins each are available for interfacing and that two without support for external crystal. If you want to connect an external crystal, you lose two more pins and that reduces the total… Continue reading

Blinking the LED with MSP430

This is the second tutorial on MSP430 and it will feature code on blinking the led’s and hence will tell you on how to configure the ports as input and output, and how to make the port low and high when it’s declared as output. For those having an MSP430 launchpad, it has two onboard led’s connected via two jumpers to pins p1.0 and p1.6. Our task for today is to blink these led’s alternatively or toggle them. To start with open code composer studio, go to FILE->NEW->CCS PROJECT. After doing this, you will get a window mentioned below Enter your project name, select family as MSP430, and now variant is msp430g2253. Remember, this is a critical step. To check your option, refer your chip on the Launchpad. It has… Continue reading

Getting Started With The Msp430

This tutorial is an introductory tutorial on getting started with the MSP430 series of controllers by Texas Instruments. There are millions and trillions of ways to start using microcontrollers. Hobbyist or people who find hard to code normally prefers Arduino as their coding environment, while engineers might prefer using AVR/PIC. The MSP430 microcontroller is an extremely versatile platform which supports many applications. With its ability to consume ultra-low power it enables the designing engineer to meet the goals of many projects. It has, of course, its limitations. It is inclined mostly towards low energy and less intensive applications that operate with batteries, so processing capabilities and memory, among other things, are limited. However it’s still called a mixed-signal processor and is capable of doing some sort of speech processing. Before… Continue reading