Speed vs Consumption.

Just a really quick n’ dirty test of the running frequency of an Atmel ATmega8 AVR mcu versus the power consumption. I used a really simple program for this. No sleeping modes whatsoever. Every time I compiled the code for the specified frequency (-D F_CPU=) and used an external crystal as a clock source. The maximum frequency for an ATmega8 is 16 MHz, but we can slightly over clock it (18-somethign MHz) if the voltage is kept at 5 volt.

Xtals

#include <avr/io.h>
#include <util/delay.h>


int main(void){

    DDRB |= (1<<PB1);
    uint16_t i;

    while(1){
     
      PORTB ^= (1<<PB1);
      
      i++;
      
      _delay_ms(1);
    };

    return 0;
}

We can see that the power consumption increases almost linearly. The voltage is kept constant at 5.02 volts.

table

Diagram

Advertisements
This entry was posted in AVR, Electronics and tagged , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s