Pages: [1]   Go Down
Author Topic: Changing clock speed  (Read 334 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I am building a project whch does not need much speed or accurate. Then I decided to avoid the use of the crystal and program the atmega with 8Mhz internal oscilator.

In order to use the same program as with a normal arduino, I only programmed the fuses and bootloader as indicated in the arduino to breadboard tutorial, but added the board definition to the list of Arduino, in order to continue using the normal pin names.

My problem is that the compiler seems to asume the clock speed is 16Mhz because the times are double of the programmed. Un the data I added, I indicated "atmega328bb.build.f_cpu=8000000L".

¿Is there anything more that I need change or the libraries are made only for 16Mhz?



The section I added is this:

Code:
atmega328.name=Arduino ATmega328 8 MHz internal clock

atmega328.upload.protocol=arduino
atmega328.upload.maximum_size=30720
atmega328.upload.speed=57600

atmega328bb.bootloader.low_fuses=0xE2
atmega328bb.bootloader.high_fuses=0xDA
atmega328bb.bootloader.extended_fuses=0x05
atmega328bb.bootloader.lock_bits=0x0F
atmega328bb.bootloader.unlock_bits=0x3F

atmega328.bootloader.path=atmega
atmega328bb.bootloader.file=ATmegaBOOT_168_atmega328_pro_8MHz.hex

atmega328.build.mcu=atmega328p
atmega328bb.build.f_cpu=8000000L
atmega328.build.core=arduino
atmega328.build.variant=standard
Logged

0
Online Online
Shannon Member
****
Karma: 162
Posts: 10475
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Be aware that the internal oscillator might not be accurate enough for the bootloader's serial communications to work correctly (or so I've heard)

If you are programming using ICSP this isn't an issue (although its a little complicated (and slow) to upload sketches via ICSP).
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Jr. Member
**
Karma: 1
Posts: 67
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Be aware that the internal oscillator might not be accurate enough for the bootloader's serial communications to work correctly (or so I've heard)

If you are programming using ICSP this isn't an issue (although its a little complicated (and slow) to upload sketches via ICSP).

Up to now, the few uploads I made worked OK.
Logged

Pages: [1]   Go Up
Jump to: