Monday, February 28, 2011

Tiki Gods appeased: Hello World



Last Time I attempted to please the Tiki Gods* and get hello world running,  it failed. That's due to the videos I was following were just generic instructions on how to use Code Composer Studio.

This time however I used the TI labs tutorials for students. The tutorials are really good and come in a PDF, PowerPoint and Word document. There are also videos which correlate to the previously mentioned documents.

The 2nd Lab (Lab 1 goes over installing Code Composer and plugging in the device) goes over running the code for the temperature program. It shows you how to create new projects and how to properly load the code onto the MPS430. With micro processors a flashing LED is the equivalent of a Hello World application since they don't usually come with LCD screens or any other form of output.

Analysis of code and videos to come soon.





*I have blatantly stolen the "Pleasing the Tiki Gods" reference from Beginning iPhone 4 Development: Exploring the iOS SDK which I've been using at work.

Wednesday, February 23, 2011

The persistence of microcontrollers


So lots of people have commented or asked "What is this / why bother with microprocessors? Whats the point of learning to write programs for them when you can get 8+ cores to work with?

It might surprise you to learn that roughly 55% of all CPU's on the market are 8bit micro controllers*. Yes 8bit micro controllers, not the latest Intel or AMD processor.

That's because micro controllers are in every part of our lives. Your DVD player? Micro controller. Your remote for the DVD player? Micro controller. Those lights that go off and on automatically? Controlled by a micro controller. Your cell phones? Yup More micro controllers. They keyboard I'm typing this with right now has a micro controller inside of it. Just about any piece of electronics you can think of have micro controllers.

So Micro controllers aren't going out of style anytime soon as they are everywhere. That's why learning how to program for them is still relevant, in fact that's where as a programmer you can make serious bank. Being good at micro controller programming.

*Sources:
http://www.eetimes.com/discussion/other/4024488/The-Two-Percent-Solution
http://web.archive.org/web/20070220134759/http://www.circuitcellar.com/library/designforum/silicon_update/3/index.asp

Tuesday, February 22, 2011

Hello World (Not quite)

So as all other programmers before me I need to appease the Tiki Gods and do a hello world. Not a simple task on the MSP430.  I followed all of the steps in this video yet I got some strange compiler errors. For now I will strategically retreat :(

Tomorrow though I'll be right on it!

Temperature Program

The MSP340 comes with a program on the board out of the box. It makes a red LED go brighter as the temperature gets hotter. I simply used my thumb to create some heat through friction. You can't really see it in the video since I couldn't get my camera into focus, but the LED gets brighter as I keep rubbing. Takes it a while to get warm enough to register though

Monday, February 21, 2011

Side Note: A day made of glass

Couldn't help but notice how cool this was and wanted to share with everyone.
Credit goes to JoeyPo whose blog I saw this on.

Unboxing and Installation in pictures and screenshots

Small environmentally friendly packaging


Another view


Opened Box




Ooooooh! Stickers and instructions


The only question now is where do I stick it?(Don't answer that)
The Device!


Other bits and pieces.

32.768Khz Micro Crystal

The board out of the package

The USB Cable isn't that long though, meaning I'll have to stick it on top of my computer.

You can see why I'm not too pleased about that.

Code Compser the IDE based on eclipse
Home Screen for Code Composer

Home Screen for IAR

For under $5.00 I'm pleased with what came in the box. You get a USB cable to connect to your PC with, and extra processor (in case you fry the one on the board) a Micro Crystal (which I'm not quite sure what that is as yet though) and two of what seem to be connectors, possibly to allow you to add extra external devices.

Strangely enough you need to register to download Code Composer for government purposes (I guess they don't want you making bombs out of it or something). Additionally Code Composer is only a 30 day evaluation unless you buy a license. I couldn't find pricing information for the license immediately on the TI website, but I'll hunt for it later. That is somewhat saddening that TI didn't make the software available for free, afterall it is based on the eclipse IDE with a bunch of other tools added on.

Additionally there is the IAR Embedded Workbench IDE. That was for free, but it doesn't seem to have as many features as Code Composer.

Now that my environment is setup time to figure out how to get code on this thing.

Sunday, February 20, 2011

Specifications

The power and storage you get for the MSP430 is indicative of the price. Here are the details from the documentation:

Two MSP430 flash devices
– MSP430G2231: Low-power 16-bit MSP430 microcontroller with an 8-channel 10-bit ADC, 2kB flash
memory, and 128 bytes of RAM (preloaded with a sample program)
– MSP430G2211: Low-power 16-bit MSP430 microcontroller with a comparator, 2kB flash memory,
and 128 bytes of SRAM
• 10-pin PCB connectors (two male and two female)
• 32.768-kHz clock crystal from Microcrystal (www.microcrystal.com)

As you can see there is only 2kB flash memory in addition to 128 bytes of SRAM and is clocked at 32.768kHz.

These are highly underpowered when compared to a typical Arduino board say for example the Arduino Uno which has 2KB SRAM, 1KB EEPROM, 32KB Flash Memory and clocked at 16MHz.

This will make for some interesting design choices when writing complex programs just on the board that comes in the packaging. Of course TI expects that you purchase more products to expand usability but for my first few projects I'm going to stick to just the board.

MSP430 LaunchPad

So today I got the launchpad MSP430 and I plan to come up with a range of fun projects to work on with it. I have some prior experience through a class using a Make board, but that was 2 years ago so I'm going to be starting fresh.

Currently I own 2 MSP430's which I got from ti for under $5.00US! Link here

Took about 2 months to get them since demand was high. I got them around September last year, but they've been sitting on my shelf ever since. Time to power them up though and put them to good use!