I bought a Gertboard a while ago, and one of the features it has on-board is an ATMega328 (DIP). However, since the Gertboard is designed for use with the Raspberry Pi, it only operates at 3.3v, so the clock speed is limited to ~12MHz.

Programming it via the Raspberry Pi is quite cumbersome though. Instead, I'd like to transfer the chip to an Arduino Uno board so I can upload sketches from my desktop PC. I would then transfer it back to the Gertboard for normal operation.

The problem is that my Uno operates at the more typical 5v / 16MHz.

Is it safe to attempt this? Do I need to make any configuration changes in the IDE to tell it to account for a different clock speed?

  • avrdude over SSH not working out for you? Commented Mar 17, 2014 at 11:30
  • @IgnacioVazquez-Abrams I'm just exploring options really. I don't mind working on the command line if I have to, but I much prefer a GUI for code entry. Commented Mar 17, 2014 at 11:46
  • 2
    Samba to share the directory, and make to invoke ino to build. Messy, but it should do. Commented Mar 17, 2014 at 11:47
  • I've not seen a single ATmega328 not work at 16MHz at 3.3V before. Commented Mar 17, 2014 at 12:10
  • Sure, but that's not the question here. Commented Mar 17, 2014 at 12:14

1 Answer 1


The clock speed selected will affect both delay*() and millis()/micros() as well as the functions in <util/delay.h>, therefore you must use the target system's correct clock speed if you are using any of these functions. This can be easily done by editing boards.txt and copying an existing entry for the Uno and changing the value of the f_cpu parameter to match the target system (in this case, 12000000).

The difference in voltage does not matter, since the chip can run at either voltage and no connection is being made between the 5V system and the 3.3V system.

  • Unfortunately, the bootloader probably assumes 12 MHz. In theory, the firmware of the 8u2/16u2 could be modified with a similar "mismatch" and likely result in the ability to utilize the bootloader with whatever odd baud rate results. But it might be easier to improve the pi-based programming process, especially as this would avoid the constant chip transplanting. Commented Oct 27, 2014 at 18:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.