Go Down

Topic: Arduino UNO @ 20MHz (Read 6 times) previous topic - next topic


Thank you!  This will come in very useful. 

I'm interfacing to a 128x64 GLCD and I could use more speed to display multiple spectrum bar graphs faster.


If you want, you will find that most of them will run at 32Mhz @ 5v.

Pretty amazing.

Nick Gammon

Hmm. Time to revisit my VGA output sketch. If I can get it to run that fast I could get somewhat higher resolution.

Does it get hot?

Nick Gammon

Well that idea will have to wait. Don't have any 24 MHz crystals. Nor does my function generator output above 20 MHz.

Oh wait, found 5 x 24 MHz crystals on eBay for $1.41 + free postage. Kind of unbelievable but whatever. Worst I will do is lose $1.41.


Hi Nick,

No it doesn't get hot at all. I test it now for 4 hours in a row and i found out that serial, adc conversion and eeprom read/write works well.
No trouble so far. I've change one other board and put it to the test.

I will see in the morning if it goes well.

Nick Gammon

I ordered 100 x 20 MHz crystals for $5.69 as well.

We'll see what happens with that one. :)


I get crystals from Tayda:
They have pretty low prices on everything they sell and their shipping is pretty
low as well.

--- bill

Nick Gammon

Thanks Bill.

If the worst comes to the worst, they can become stocking-fillers next year.

"What, this, Dad?"

"It's a crystal, darling"



Today I tried getting an ATmega328P-PU to work at 20MHz. I downloaded the optiboot.zip file and copied the contents to my optiboot folder (I'm using Arduino-1.0.3 on linux). I made the necessary changes to boards.txt. I then started the Arduino ide and selected the "GVI High Speed (5V-20MHz-250k Baud)" board. Burned the bootloader with an USBasp, uploaded without errors. I then hooked up my ftdi usb/serial converter to the board and tried uploading the blink sketch. But no luck, it can't get serial communication. I tried another ftdi usb/serial converter but I got the same error:
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

Just to be sure I plugged the chip in another board with a 16MHz crystal. Bootloaded the Uno bootloader and uploaded a couple of sketches, no problems there, so the chip is fine.

When I try uploading a sketch the led on pin 13 blinks a couple of times. So can I assume that the bootloader is working?

Nick Gammon

What is the entry for boards.txt for the board you selected? In particular, the upload baud rate?

Where did you get the bootloader which expects to run at 20 MHz?


Feb 03, 2013, 10:51 pm Last Edit: Feb 03, 2013, 10:54 pm by Bajdi Reason: 1
From a previous post in this topic: http://arduino.cc/forum/index.php/topic,137902.msg1041577.html#msg1041577

I copied the code from that post to my boards.txt file, baud rate is set to 250000.

Nick Gammon

Hmm. Well I was getting strange error messages if I had a non-standard baud rate:

Code: [Select]

avrdude: ser_setspeed(): tcsetattr() failed
avrdude: ser_open(): can't set attributes for device "/dev/cu.usbserial-A900gcHm": Invalid argument
ioctl("TIOCMGET"): Bad file descriptor
avrdude: ser_close(): can't reset attributes for device: Bad file descriptor


I get this:
Using Port                    : /dev/ttyUSB0
         Using Programmer              : arduino
         Overriding Baud Rate          : 250000
avrdude: serial_baud_lookup(): Using non-standard baud rate: 250000
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: Send: 0 [30]   [20]
avrdude: ser_recv(): programmer is not responding
avrdude: stk500_recv(): programmer is not responding

Uploading sketches with the USBasp works.


Did you change the xtal to a 20MHz one?


would you not just change the crystal to a faster one?
do you really need to change the code?


Go Up

Quick Reply

With Quick-Reply you can write a post when viewing a topic without loading a new page. You can still use bulletin board code and smileys as you would in a normal post.

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it's been approved by a moderator.

shortcuts: alt+s submit/post or alt+p preview