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

Setting up AVR development platform

You can be encouraged to use various types of AVR development tools. Most of them cost money to get full functionality and support. Most common commercial packages are CodeVisionAVR, Imagecraft ICCV, IAR Workbench. All they are great tools out of the box with fast support that you have to pay. Of course, you can give a try with their limited versions to se capabilities as we mentioned before we are going to use free tools that great enough comparing to commercial. WinAVR or AVR-GCC tools WinAVR is a toolset for C programming the AVR microcontrollers. It is a bunch of small programs that make development as comfortable as possible. Main tools here are avr-gcc compiler, avrdude programmer, avr-gdb debugger and even more. These are command line tools, so you need to integrate them into some integrated development environment (IDE). There can be any IDE supporting external tools like Eclipse and of course AVRStudio that we will be using. Besides, WinAVR comes with great program writing tool – Programmers Notepad. Actually, with WinAVR you can write, compile, upload to chip and… Continue reading

Things needed before you learn AVR

There are several things you need to do before learning AVR. First of all, you need an AVR chip. Better chose megaAVR series, so you don’t need to worry about lack of peripherals when required. Atmega8, Atmega16 or further mega’s will do correctly. Probably chose in DIP package as it will easily fit in breadboard for fast prototyping.  Development boards are great to work with as they mostly are designed for learning and prototyping.  Any Arduino board can be used with no problem as it has all the necessary means to serve as a general purpose dev board. Anyway, I leave this up you for a while. Next thing is the programmer. This is where you can get a headache. Really! In a few words, a programmer is a cable/device used to upload firmware (compiled program) to chip. Programmers can be connected to the computer via various ports including parallel (LPT), serial (COM) and USB. Or there can be no programmer at all if the chip has a bootloader set up. But this will be discussed later. These were two… Continue reading

The Marvelous Atmel AVR Infrared Downloader

Honestly, how many of you here ever tried to develop an infrared downloader with the Atmel AVR before? Don’t underestimate this project, as you might think that it’s pretty easy to build it here, but the truth is you will have to need some concentration and determination to get this done! Basically, this project has two main parts, which as the host-side and target-side. The host-side is mainly consisting of host-program for Win32 PC using Libusb-Win32, where it’s a device that based on ATmega8 and using firmware-only USB driver by Objective Development and infrared hardware unit. In the mean time, the host program was compiled by using Lazarus Freepascal and the device firmware was compiled using WinAVR or ACR-GCC! The implementation for host-side is uses custom device class, which it only required simple inf file and libusb driver on PC without any further additional programming source code. Now, the second part – target-side consists of device minimum system that based on ATmega162 and infrared hardware unit. For your information, the device minimum system is consisting of ATmega162, external SRAM 8Kbyte… Continue reading

Scrolling text effect on a LED matrix display

This is cool project to pay attention to. It can be used for PC modding or elsewhere where scrolling text effects are needed. Display is built of 50×7 LEDs that is controlled by AVR AT90S2313 microcontroller (may be substituted by ATtiny2313). Text can be sent from computer via RS232 port or displayed from external EEPROM 2k memory where 768 characters can be stored. Fonts set of 256 different characters can also be programmed and mast be written to EEPROM before sending text to display. Hardware project with 3mm LEDs can be downloaded here. And latest firmware here. There might be minor changes are needed to adapt to newer WinAVR and ATtiny2313 microcontroller. Continue reading

Lithium ion battery charger for robotics

This is a universal charger of Lithium Ion batteries based on Atmega8 microcontroller. As you may know, LiIon batteries have many advantages comparing to regular NiMh or NiCd. Main of them are: high capacity by weigh and volume, no memory effect, fast charge and so on.   But these batteries require special charging algorithm. You cant plug to some voltage and expect them to charge. It needs non constant voltage and current during charging cycle. Charging generally follows these steps: Current control at the Max Charge Current is used until the battery voltage reaches the voltage threshold (normally 4.1 or 4.2 volts per series cell). The battery is about 70% charged at this point; The voltage is now controlled very accurately (this is very important) at the threshold voltage while the current drops off naturally. Once the current reaches the lower cutoff ( about 100 mA per parallel cell typically), charging is stopped after a top-off time delay. So this battery charger consists of control circuit based on atmega8, charge control circuitry and reference voltage circuit. AVR-GCC v3.2 project files… Continue reading

AVR programmer and debugger in one board

Martin Thomas has this nice tool called Evertool in his collection. It is a AVRISP/STK500 and Programmer/JTAG debugger on a single board. It is compatible with AVRStudio with firmware upgrade-ability. So always new devices are supported.   Evertool has following features: ISP Programmer compatible with Atmel AVRISP, with AVRStudio and avrdude accessibility; JTAG debugger compatible with Atmel JTAGICE, works with AVRStudio and AvaRice; All Atmel AVR devices supported with their AVRISP and JTAGICE.; Easy update of the programmer via RS232/serial port; Rescue clock generation to recover from wrong fuse-bit-settings; Simple hardware, standard parts; Evertool uses bootloader which is free for non-commercial use. Download latest version from here. Project is very well documented. There are also simplified versions of programmer available like JTAG only debugger, or even Evertool-USB version suggestion. Thomas Martin also has a nice collection of microcontroller programming examples including WinAVR and WinARM which is supported by him. Continue reading