Sunday, August 17, 2008

Mic Front end and Controller Prototype complete!

I'm a seriously happy bunny. This weekend, I spent some time expanding the switching ability of the processor from one to three switches.
This was done by expanding the interrupt service routine that runs for the single switch (on GPIO port P1.x) to look at another input on the GPIO port.

However, there weren't enough pins on P1.x - because some of those pins are used for the JTAG interface. So, I had to use some of the pins from P2.x - which cause me to have another Interrupt Service Routine being kicked off when I pressed the button on P2.x

A minor pain in the Ass, the major thing I learnt was how to convert the bits in the registers that control the GPIO ports into hexidecimal numbers. That is... if there are 8 pins on the port, and I only want to control the bottom four, then the binary setup would be: 0000 1111
In Hex, that would make 0x0F

So, the tough one for me was 0000 1100 - which I got confused on and wrote 0x09. I was hungover. that's my excuse and I'm sticking to it. Anyway, turns out, it should have been 0x0c.
Thats where another precious hour was lost. :(

Anyway, here's a basic video of things working. Next step - convert to PCB.

Tuesday, August 12, 2008

Toggle and Debounce!

A little bit of basic breadboarding, a little bit of code modified from the web and TI's free source code.

The buttons used are made by highly electric. (I think they are the PB613). They are simple push to make switches. There is no locking system, they don't toggle. Push push to make contact. They integrate a cool LED though. I got them from Rapid Electronics.,

The software code was originally written for the eZ430-F2013, which is a Spy-Bi_wire board. The output LED was set up to be on P1.0 and the input was P1.4. However, the header board from Sparkfun is set up for 4 wire JTAG. I'm not quite sure how to switch it to Spy-Bi-Wire.

Anyway, P1.4 on the F2131 shares a pin with one of the JTAG pins. So, when I did some basic debugging, as soon as I hit the switch, the JTAG Emulator would lose it's link. So, a little change in the code changed the input pin to one of the unused pins, and voila, the video below was made. :)

The code itself is simple. The ports are set up then the device goes into low power mode. Any change on an input pin wakes the device up from low power mode and then waits 20mS and checks if P1.3 is low. If it's still low, then obviously, the button is pressed. :) at which point.. TogGLE! :)

Check out my assistant below - and the short demo of my code working.



Upgrading to real MSP430 tools.

Well, last night I upgraded from the eZMSP430 to a proper JTAG and header board.

Earlier this week, I order a few bits and bobs to aid development of front panels for Expat Audio products.

Firstly, I ordered an MSP430 USB FET tool. This is simply a USB to Jtag adaptor. It allows me to connect to any MSP430 board that has a jtag header. It allows connection through both regular 4-pin jtag and "spy-bi-wire" - TI's proprietary two wire jtag-connection.

Installation was a breeze, seeing as I'd already installed the exMSP430, all the drivers were already in the system.

For my target system, I didn't see the point in developing new boards at the pcb-fab, so instead, I went to and ordered one of their MSP430 target boards... which is essentially an MSP430 processor, the basic passives and oscillator, all on one board, with regular through hole pin headers.

Doing this would be even simpler than using a through hole DIP MSP430, as the header board actually has the passives and the JTAG header ready to go. The link for the header I used was:

These steps may have seemed simple to a professional, but quite honestly, I was terrified of it "just not working". There's nothing worse than something just not working... I'm a terrible fault finder :(

So, I fired up the IAR tools, and opened the default project they have for the eZMSP430-F2013 board. I figured that I needed to change the options to show the new chip being used (the MSP430F2131 instead of the MSP430F2013, and also change the jtag interface from the ez430 to the standalone USB interface.)

Turned out easier than expected, I simply went to the PROJECT -> OPTIONS page and went from there. I selected the MSP430F2131 as my processor, and then selected TI USB FET as the JTAG.

From there, I hit compile - nothing bad happened, and then I hit "debug" and watched it download the code to the target board. It all worked, I was toggling pin P1.0 high and low, and watching the voltage change on my multimeter.

The next step is to build a protoboard with my chosen switches, and program multiple switches and LED's all together.

Until next time :)


Monday, August 11, 2008

a grand update

It's been quite a while since I last posted/blogged.

So - tendollaaudio has now been morphed into Expat Audio. A collaboration with another groupdiy member SSLTech.

Expat Audio's website can be found at It still needs a little work though :)

We currently have one main product that we sell. An addon board for the popular Gyraf GSSL DIY compressor that makes it work like the original compressor it was designed to mimic.

However, we have other things up our sleeve :)

I am currently rolling up my sleeves to develop control software on an MSP430F2013. Every product with any kind of digital control needs buttons, knobs etc. The MSP430 has shown to be an ideal platform to develop on.

Whilst it's nothing big to speak about, so far I've managed to write some code that detects a button press, waits for debounce to finish, then tests the pin again to see if it's still pressed. Based on that button press, the software then toggles an LED.

The next challenges are:
Develop the same thing accross multiple pins.
Develop a board that will spit out SPI data to a string of LED's and beyond.

thats all for now.