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.
:)

video

No comments: