birds like wires

Showing 'atmega' tagged articles.

Saving Power with your ATmega

http://www.flickr.com/photos/soujirou/4651611953/

As many projects using an MCU end up running from batteries, it’s nice to have those batteries last as long as possible. There are a numerous different ways of doing this, depending upon your circuit, but there are two that I’ve been reading up on recently: reducing the clock speed of the ATmega, and sending it to sleep. These techniques might even be essential if you’re planning a solar-powered project.

On an Ardunio board, chip timing comes from a 16MHz oscillator; it probably looks like a little rounded rectangular can just north of the ATmega. This makes sure you get good execution and serial programming speeds, but if your project is simple or doesn’t require that speed, it makes sense to reduce the rate at which the chip is running. Fewer cycles per second should mean fewer milliamps required in use.

In my earlier article I wrote about running an ATmega168 at 8MHz using its internal oscillator to reduce parts. But what about dropping down to 1MHz?

Keep reading...

Arduino Bootloader on ATmega168

http://www.flickr.com/photos/randomskk/3225169939/

I’ve recently had cause to build a very simple microcontroller-based project. I like the Arduino platform, so I wanted to burn the Arduino bootloader onto an ATmega168. To keep the circuit as simple as possible, I also wanted to have the ATmega168 use it’s own internal 8MHz oscillator, instead of having to provide a 16MHz one externally. One chip, some power, flashy LEDs; dead simple. Except, how to get that bootloader onto the chip?

The easiest way with the equipment I had around was to pop the Arduino ISP sketch onto a working Arduino and connect everything up as shown in the documentation. The image bottom-left shows the setup I was after. I then moved on to the Arduino to Breadboard documentation, which is lovely and clear, but does seem to have an important little thing missing.

Keep reading...