2015-09-06

Using TI Launchpad in linux

Texas Instruments made a good effort in having free and community tool chain for their family of MSP430 low power microcontrollers. Before the tool chain had to be build by the user and that had the usual problems (dependencies, headers, etc).

You will need to register with TI in order to download the installer (apparently you can download the source without registering, current version (for this post) is 3.04.05.01. You need to change the permissions on that file (chmod 777), then run it.
The launchpad is TI low cost entry point development tool, for 10USD you get two processors, a PCB with embedded programmer and debugger and you can also get plenty of add on modules. The new launchpad has a different interface to the first ones (one row of connectors to two rows on each side), in order to support processors with more IO.

Once the tool is installed you can go to the examples directory and search one for your launchpad. There are still some issues, but they can be alternatives.
I didn't manage to connect the gdb_agent_console to gdb and without this connection debugging and programming are impossible. The previous tool chain needed another agent to interface to gdb (mspdebug), this one still works reasonably well.
You still need to program the processor with mspdebug, then enter gdb mode. In another terminal start gdb, connect to target remote on the correct port and then continue.

2014-05-24

Current increase for MAX6957

This will be a mostly Analog Electronics post...

In a project I made with friends we had a Raspberry Pi driving a MAX6957 for driving some LEDs. The MAX6957 was connected to the SPI bus of the RPI and the driving functions were developed in python (if you're interested in this you can post a question in the comments but if google it it's faster).

We were driving a few piranha RGB LED but then we bought a bigger LED (something like this one). In order to keep the software simple and unchanged I wanted to use the MAX to drive the bigger LED. If the MAX drives the LEDs with a current source that can be stepped (in 16 equal current steps), so I would have measure the current of the MAX and amplify it for the new LED.
This is what I've done:



First I have a current mirror, as the MAX sinks current I used PNP transistors, on the other side I have a small resistor to convert current into voltage.
This voltage drives a voltage to current converter with a protection for over current (in case the MAX is removed, goes crazy or it's output is miss configured). Then repeat for each of the 3 channels.

2014-03-19

We're back..

I've been busy (very), but I'm still here...
Starting the first post of the year on the end of March is not the best indication of a success blog (which I don't have)... but I'll try to post some old stuff that I did meanwhile.
I've lost a bit of touch with the Arduino and last time I check things have gone mainstream and big (check this one out, an ARM Arduino). I have an old project done two years ago to post.
Meanwhile I've started with the RaspberryPi and how to connect it to some hardware. Although I don't really like Python (the strict indenting drives me mad), you can also use C to program it.
Well all the people of posted questions I've published them, for those with questions just shoot.

2013-08-25

AVRStudio 6.1 and Code Composer Studio 5.4

A new second hand laptop and a new windows XP re-install and all the tools for micro-controller development... If you are looking for a comparison between the above tools stop reading. **** This is a public bashing of both tools, they are s##t ****
I recently bought some MSP430 development tools from Texas Instruments (ez430 chronos) and went on to install the "Offical and supported Development tool" Code Composer Studio 5.4...


It has the following problems:
- very large program, based on Eclipse (that also suffers from some of the Emacs problems of growing ad nausea in features that only a few people use).
- incredible tools for managing projects from the IDE, fantastic.. except this is a micro-controller development platform. If you program has more that 32 code files (.c or .asm) you probably should rethink you program... and if RCS or CVS cannot manage your multiple projects... you should not be developing for micro-controllers.
- After many tries (I am not very patient, nor skillful with point and click interfaces) I managed to compile my program and debug...
- the main window has so many subwindows that it is impossible to use on a laptop, you need a 32 inch TV to use the interface... it is nuts!

I thought that was horrible, but then I installed AVR Studio 6.1, if the former program (CCS 5.4) is large the latter is huge...

Has the following problems:
- during install, further "support modules" are downloaded, including one of 1.2Gb!!! Microsoft Visual Studio something - HORRIBLE!
- combining AVR and ARM tools is a bad idea, why do I have two toolchains when I only want one of them!
- same problem with the windows as CCS but in some way we have less subwindows.. maybe its a bit better..
- to update you need to register! why ? did't I already had to register to download... leave me alone! And then it fails with a crash! 
- I tried to install AVR Studio 5.1 first... but doesn't work, fails during install....
- I'm going to try to install 4.19... I need to update my AVR Dragon and AVR ISP2... that's why!

Ahhhhhhh! were did all go so wrong! Give us an editor, a simple project manager, an assembler, a c-compiler,  a simulator and a debugger, that's it how difficult can it be! give us some icons in the interface and nothing else!

TODO:
Uninstall both horrible tools, install AVRSTudio 4.19 (because I need the simulator a bit), avrsimul in linux is getting better so maybe in the future there will be no need even for this.
Developing with MSP430 appears simple in linux (although the install is a bit more complicated), the tools for AVR install quite easily with a special one-click install for OpenSUSE (installing arduino tools).