Wednesday, January 20, 2010

Code complete

I finished the code for the sensor board.  I plan to use an ATtiny44 with 4K Flash program memory.  The code compiles to 3720 bytes, so it seems there is room. 

Actually, it doesn't compile.  The Chibi uses an SPI interface.  The ATtiny series doesn't support SPI in the way that ATmega and above do.  An ATmega SPI works like a USART: you write a byte into a register and it gets sent.  In the ATtiny, you write a byte into a register, and then have to manually toggle the SCL line to shift the data out.  A silly "defeature" Atmel did so they could offer devices in different price tiers. 

But, I have just two days left to complete my contest entry.  So I am putting the code aside and working on costing the BOM, a quick power analysis, and writeup.  The writeup will have my known todo items in it.  I think full disclosure will be better than sending in code that won't compile and letting them discover it.

I'm off to Digikey to get prices now.

No comments: