Squeezing most out of Atmega328

AVR microcontrollers usually are meant to work under 20MHz. But there is a known secret that they can be overclocked. You’ve probably seen few project where slightly overclock AVR’s were used. Mainly this is needed when generating video signals or VGA. Marcelo Rodrigues also decided to push ATmega328 to the limits by adding 30MHz crystal instead of 16Mhz.

atmega overclock with 30MHz crystal

In order to test operation speed he wrote simple program that toggles port B pins. The signal then can be seen in oscilloscope screen. One interesting notice at the beginning of experiment is that by changing crystal from 16MHz to 29,491Mhz frequency on pins changed only from 4Mhz to almost 6MHz. So there is obviously a speed limit for I/O ports. Serial port test worked just fine. It was able to calculate correct baud and send correct data. Anyway using higher frequencies than recommended you have no guarantee that device will work as expected. This is fine for personal hacking but for projects to share it is better to choose faster MCU.

[..Source link..]

Bookmark the permalink.

Comments are closed.