Hello everyone,

This is more fun oriented project than something useful (or not) since ATmega328 was not designed for clock frequency above 20MHz (see datasheet). So, 30MHz is push it far from the limit. :)

Besides, I have not studied very much to make this, sorry!

In this "experiment", instead of the 16MHz crystal (as in Arduino), an 29.491MHz oscillator were used, connected to a 100nF capacitor to filter DC levels. The signal coming from the capacitor goes to the ATmega's XTAL1 pin. The XTAL2 pin was not connected.

The picture below shows the oscillator signal after the capacitor:

For checking the difference on the speed before and after the overclock, I have used the following code with the Arduino's IDE (UNO/Optiboot bootloader). Very simple, it just put the B register pins High and Low.

PS: To upload the program, the 16MHz crystal was used instead the 30MHz oscillator. I don't know yet why it is necessary, since the oscillator does not work during the upload. Probably, the AVRdude must be configured (using the IDE?), so the bootloader speed can be the same, since the uC is responding faster. Any help here will be appreciated.

void setup() {                

    DDRB = 0xFF;

}

void loop() {

  while(1){

    PORTB = 0x00;

    PORTB = 0xFF;

  }

}

Anyway, take a look at the results for both speeds:

16MHz CRYSTAL:

29.491MHz OSCILLATOR:

The frequency come from 4MHz to almost 6MHz. A very interesting increment. But is the uC working fine?

Probably not! Or it will probably show bad functioning sometime or in some situations. But, since this is more for fun than to manufacture any medical device, why don't we test the serial communication?

Serial Communication

Before we can use the serial communication, it is necessary to change the operation configuration, so the timing can match the new clock frequency: 29.491MHz (not 16MHz anymore).

Since the Arduino's IDE was used for coding and upload, the boards.txt file, in the Hardware folder had to be changed, defining the new clock frequency. In this "experiment", it was created a new board on the boards list, but changing the frequency of the UNO board would be enough (the ATmega328 was used with UNO's bootloader).

Take a look at the line 35.

Before uploading the code, the new board was selected, so the uC can "know" in which frequency it is running. This way, it can be possible to calculate the time correctly for the baud rate. In this case: 9600.

void setup() {                

    Serial.begin(9600);

}

void loop() {

 if (Serial.available()>0){

   Serial.write(Serial.read());

 }

}

The code is very simple, it just receive a character and repeat it.

It works! The characters are repeated using the Serial Monitor just fine!

How useful the overclock can be?

Probably most for learning and fun, but personally, I think it can improve this project: Arduino Generated VGA Color Signal, published here in GL:

With a higher frequency it will be possible to have more pixels on the generated image.

But this is for the next hacking! :)

Thanks everyone!!!

Views: 24104

Comment by Kathy Moseler on December 23, 2012 at 6:33pm

Hi, it would not surprise me that you could successfully clock the Arduino faster because most chip makers design over a specific temperature range (most likely 0-70 C).  You can clock it much faster at 25C than at 70C.  20MHz would be guaranteed at 70C.  The highest possible frequency at 25C would have to be characterized; it would be unpredictable chip to chip (i.e. what works for one person may not work for another). 

Another factor is differences in production lots.  Some chips work faster than others.  Chip makers often sort chips during testing and sell faster chips at higher prices.  I haven't seen that Arduino does this; perhaps they should consider it.

Comment by Marcelo Rodrigues on December 24, 2012 at 4:31am

Hi Kathy,

Indeed. Probably it is possible to go even faster, but near 25C, as you mentioned.

Would be nice to have a plot temperature x maximum clock frequency. I don't think the datasheet provide this info, but I will take a close look.

Thanks!

Comment by Kathy Moseler on December 24, 2012 at 8:17am

Good point, I am not sure if you will find it on the datasheet.  Such plots are always on the datasheets of small components, but on a microprocessor - I am not sure if they include it.  Cheers, Kathy

Comment

You need to be a member of GarageLab (arduino, electronics, robotics, hacking) to add comments!

Join GarageLab (arduino, electronics, robotics, hacking)

Latest Activity

Rob Lambert joined Marcelo Rodrigues's group
Thumbnail

Arduino

Group for the Arduino communitySee More
yesterday
Sardar Tamoor commented on Thulana Vimukthi's blog post GPS GUIDED AUTONOMOUS ROBOT
"can you plz help me on my project !!! its basically obstacle avoidance in dynamic environment and…"
Wednesday
Sardar Tamoor commented on Thulana Vimukthi's blog post GPS GUIDED AUTONOMOUS ROBOT
"can you plz help me on my project !!! its basically obstacle avoidance in dynamic environment and…"
Wednesday
Sardar Tamoor is now a member of GarageLab (arduino, electronics, robotics, hacking)
Tuesday
Peter Davies posted a discussion

Anyone got stock of Garagelabs automation board

HiI have a requirement for 11 automation boards and have been able to source 8,  does anyone have a…See More
Apr 25
Profile IconGuilherme Barros, Rob Lambert and kevin parr joined GarageLab (arduino, electronics, robotics, hacking)
Apr 22
Tino Pascuzzi left a comment for stephen smith
"Hello, my name is Tino Pascuzzi and I'm the owner of The Sanctuary Haunted Attraction.  I…"
Apr 14
Tino Pascuzzi left a comment for Aaron Thiedt
"Hello, my name is Tino Pascuzzi and I'm the owner of The Sanctuary Haunted Attraction.  I…"
Apr 14
Tino Pascuzzi left a comment for Paul Ellison
"Hello, my name is Tino Pascuzzi and I'm the owner of The Sanctuary Haunted Attraction.  I…"
Apr 14
Tino Pascuzzi left a comment for Gary
"Hello, my name is Tino Pascuzzi and I'm the owner of The Sanctuary Haunted Attraction.  I…"
Apr 14
Tino Pascuzzi left a comment for Amauri
"Hello, my name is Tino Pascuzzi and I'm the owner of The Sanctuary Haunted Attraction.  I…"
Apr 14
Mark Mendelsihn is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 14
Tino Pascuzzi updated their profile
Apr 13
ade ljathanna is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 12
Marcelo Rodrigues commented on Steve Brune's blog post Toaster Oven Computer Modification
"lol... Cool! Congrats, Steve."
Apr 11
Steve Brune posted a blog post

Toaster Oven Computer Modification

A while back I built a Mini-Itx computer in a toaster oven. I posted it on my website here:…See More
Apr 11
Profile Iconchris yang and Hendra joined GarageLab (arduino, electronics, robotics, hacking)
Apr 11
kulvir saini is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 8
GarageLab replied to GarageLab's discussion Serious claims against BeagleBone's manufacturer CircuitCo
"Believe or not, nothing yet! CircuitCo didn't delivered the boards and they refused to refund…"
Apr 5
ammar imad is now a member of GarageLab (arduino, electronics, robotics, hacking)
Apr 5

© 2016   Created by Marcelo Rodrigues.   Powered by

Badges  |  Report an Issue  |  Terms of Service