Pages: [1]   Go Down
Author Topic: ATmega168  ... Arduino at 20 MHz  (Read 644 times)
0 Members and 1 Guest are viewing this topic.
Underhill Center, Vermont, USA
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
Arduino rocks
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I am looking to "Arduino-ize" an ATMEGA168 board with a 20 MHz resonator on  it. I know about the define in the bootloader for CPU frequency. Can anyone give me a headstart on tracking down  the CPU freq stuff in the core? What place(s) need I look?

thanks ... cheers ... BBR.
Logged

Forum Administrator
Cambridge, MA
Offline Offline
Faraday Member
*****
Karma: 12
Posts: 3538
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

The boards.txt file in the hardware/ sub-directory of the Arduino application directory specifies the CPU speed for each board.  You can always create your own board definition with the CPU set to 20 MHz.  As for the core itself, you'll probably need to change the delayMicroseconds() function.  The rest might work, although the PWM frequency will be different.  You also might need to change the pre-scale on the analog inputs.  

In any case, let us know what changes you have to make to get it working and I can try to incorporate them into the code base.
« Last Edit: November 22, 2007, 01:50:50 am by mellis » Logged

Pages: [1]   Go Up
Jump to: