Turn-key PCB assembly services in prototype quantities or low-volume to mid-volume production runs

Very first steps with AVR

More and more new hobbyists simply start with Arduino when learning microcontrollers. But problem is that most important things are hidden inside processes, libraries. All you get is a place to write some prepared code and click program button to get on microcontroller. I think if you start you journey to microcontrollers then you should learn how those things work and how to program “barebone”. As all new things you probable should start blinking LEDs with AVR using tools like AVRStudio with GCC compiler, programmer adapter and breadboard. Cl97 wrote very simple guide how to get it done. If you are Arduino fan, do same with Arduino digitalwrite() function and then compare binary size and blinking speed. Continue reading

Tiny microcontrollers can drive even more LEDs

Sometimes for simple applications you need to drive several LEDs. You would love to stick with tiny microcontroller that actually has few I/Os available. One solution could be using port expander that adds some complexity to overall project. Better solution is to use charlieplexing, when using special technique out can drive more LEDs than there are I/Os available. Charlieplexing method allows driving N*(N-1) LEDs with N pins, so with 5 I/O pins of tiny microcontroller it is possible to control 20 LEDs. And you even need as many current limiting resistors as there are pins used. If you drive 20 LEDs with 5 pins then you need 5 resistors instead 20 when driving them directly. Probably main disadvantage of this method is a bit more complex program as it requires some encoding. So next time you need more LEDs in your project simply avoid grabbing bigger MCU and use this compromise. Continue reading