Surprise. There is NO GCC QTouch library for the ATTINY40!

Atmel does not have QTouch support for the GCC compiler when using the ATTINY40. Of course you can write your own library but that would defeat the purpose of using the Atmel’s patented closed source design. On the up side I can use the free 4K limited IAR compiler, which is supported. This choice is unfortunate since it forces me to install and learn a new tool chain. It also turns out that the IAR compiler only seems to support the STK600 for a programming platform and not the ATMEL MKII ISP.

Since my last post on capacitive sensors I have managed to program an ATMega32U4 to act like a MKII ISP clone. This design uses one of the projects from the LUFA USB library. Now without support for this device using the IAR compiler I need to compile in one tool and open ATMEL Studio 6 to program the ATTINY40. As you can imagine this leaves a very bad impression of the support tools. At least I have a solution; all be it cobbled together.

It seems that my simple test to design a capacitive switch has become a time sink of patchy tool support. The ATTINY40 still is a nice little processor but these tool issues make it very difficult part to use. I would have been better off using a well supported part that has a GCC compiler, ICE support, and was programmable using the AVR Dragon or MKII ICE.

I have received the touch sense PCBs and assembled them successfully. The QFN20 is 4mm on a side and looks small compared to the 0805 resistors beside it. I have even managed to download a simple key code test that works quite reliably. Now I am working on tuning the sensors so that I can place them behind 1/4″ acrylic. The tuning is actually more difficult than you would think and I see a lot of false readings when I add the plastic cover plate. The application notes suggest that the sensor area should be 4 times the thickness of the cover plate so I will try coupling all 4 sense pads into a single larger pad to see if the reliability improves.

The other thing I noticed about the current design is that it needs a better LED diffuser. The LED appears as a point source while I would prefer to illuminate the entire key. Interestingly by applying duct tape to the lower surface of the acrylic cover sheet I get an even back glow that might work well with a side lit LED.

Leave a Reply

Your email address will not be published. Required fields are marked *