New domain and blog

New domain and blog
Please head over to my new domain to view my blog and current projects
Showing posts with label Texas Instruments. Show all posts
Showing posts with label Texas Instruments. Show all posts

Thursday, 28 February 2013

C2000 LaunchPad Piccolo serial comms

So after a few days and many frustrating hours of reading, hacking and playing around, I managed to get two way serial communications working. I am using the USB connection through the FTDI USB-UART converter.

Initially I tried to use the examples but for some reason they just didn't work as they were supposed to. I wanted to then put back the demo application that the C2000 LaunchPad ships with because I knew that that worked with Putty. It took me ages to find the source code which was very frustrating. If you are interested, it is located in TI Resource Explorer -> controlSUITE -> English -> Development Tools -> C2000 LaunchPad -> LAUNCHXL-F28027 -> C2000 LaunchPad Demo.

Once I programmed my LaunchPad with the demo program and confirmed that everything works, I worked my way through it making changes. After a few attempts and many changes, I got it working so that the program can print a string to the terminal, and can also echo back and characters that are sent to the LaunchPad from the terminal.


First impressions of the C2000 LaunchPad:
  • My first impression of using the Piccolo was one of frustration. The examples are not as clear as the MSP430 LaunchPad and the projects are much more tricky to create. I still have yet to create a project from scratch. So far I have just copied and pasted projects and then added my own code.
  • The LED's are also wired in such a way that you have to drive the cathode low to turn the LED on. Therefore in code, setting the pin high turns the LED off and setting the pin low turns the LED on. Not a big deal once you know about this, but took me a while to figure out why my LED's were not behaving themselves as I expected them to.
  • Battling to find the demo source code was also a challenge, but once I got it, it was very well commented and quite self explanatory.
Overall my first impressions are a bit mixed, but the more I explore, the more I am understanding how things are laid out. This is making it clearer.  

My next step for my project is to get the SPI working, which I will start tackling tomorrow. 

If you want to get a copy of my code, you can download it here.

I hope this helped clear the way for you.

Greg

Tuesday, 26 February 2013

TI C2000 LaunchPad unboxing

Yesterday I received my TI C2000 LaunchPad from Element14 for a road test. I have been working with the MSP430 LaunchPad for a few weeks now and am really enjoying what it can do. I am therefore really excited about getting into the C2000.


I plugged it in and got the default program up and running pretty quickly. With it connected to a terminal, you can see the temperature change and get logged. Next I wanted to get the standard flashing LED program running to get a basic feel for the development board.

I assumed that the two development boards, MSP430 and C2000, would be similar, but I was wrong. There is quite a difference in setting up the device and getting it running. I eventually got a simple flashing LED program running.

The example projects are also set up quite differently and it takes a bit of time to figure out how things are laid out.

To get going, I am going to go through the LaunchPad schematic and also the F28027 device datasheet. Once I know what is connected to which port and peripheral, then I can get going properly.

My plan is the following:
  • Get the flashing LED's working - DONE
  • Get serial communications working. LaunchPad to Putty
  • Get SPI working
  • Connect up CC1101 433MHz module to get RF communications working
  • Connect to RaspberryPi USB port and use as a port expander and RF master
For now that is what I plan to do. I will log my progress here as I manage to get each part working. For now I better get reading and start understanding the development board that I have in front of me.

Greg

Wednesday, 12 December 2012

Raspberry Pi meets TI LaunchPad MSP430

A few weeks ago I got a TI LaunchPad. With the help of a few tutorials I managed to get the basic input, output and UART working. As most of the examples that I could find are for CCS, I decided to go that route instead of IAR.

My next step was to get my LaunchPad working with my Raspberry Pi via the USB port. After a bit of playing around and installing a few programs, I managed to get it to work. Below is how I got a program  written, compiled and programmed onto the LaunchPad from the Raspberry Pi.

First you have to install a few programs with apt-get.
$sudo apt-get install binutils-msp430
$sudo apt-get install gcc-msp430

$sudo apt-get install msp430mcu

$sudo apt-get install mspdebug

$sudo apt-get install msp430-libc
You might have to run
$sudo apt-get update
before installing the modules.

Next run mspdebug to make sure that there are no errors. If there are no errors type exit to close the debugger.
$sudo mspdebug rf2500
Now that you have everything installed, we need to create the program. I use nano text editor to write my program.
$sudo nano button_ISR.c

This program uses the two LED's and one push button on the LaunchPad. When the button is pressed, an interrupt is generated and then the LED's are toggled.

Close nano saving the changes.

The program then needs to be compiled.
$sudo msp430-gcc -mmcu=msp430g2553 -g -o BUTTON_ISR button_ISR.c
The program should compile without any errors and now you are able to run the debugger.
$sudo mspdebug rf2500
Now program the device
prog BUTTON_ISR
and run the program
run
CTRL+c will stop the program running and exit will close the debugger.

In the next post I will show you how to communicate between the TI LaunchPad and Raspberry Pi via hardware UART and the USB connection.

Greg