Arduino UNO @ 20MHz

[quote author=Coding Badly link=topic=137902.msg1036581#msg1036581 date=1355820707]

Four things...

  1. I would add Preserve EEPROM memory through the Chip Erase cycle; [EESAVE=0] to the fuses...

atmega328_20MHz_isp: HFUSE = D6

2. You probably should bump the brown-out detector to 4.3V[/b][/color]
3. As long as I was rebuilding the bootloader, I would use a higher baud rate...
[u]http://zygomorphic.com/arduino-tiny/?page_id=249[/u]
4. Eyeballing, I can't find any problems with the makefile.
[/quote]
I agree with all of your suggestions except for the B.O.D. setting. I once tried the 4.3V setting and the board would not reliably power up (the USB supply was a touch below 5.0v). Setting the BOD to 2.7 worked 100% stable.
I especially had problems at 4.3V when trying to use my AVRISPMKII. The ISP doesn't normally supply VCC on the ISP port, so I hacked mine with a 1N4001 to send USB power to the ISP port. Of course, 5.0 - 0.7 of the diode = 4.3v! The board won't program with BOD set to 4.3.

interesting facts. i just can't wait to test them. maybe i will also try 24mhz for the 328 chip
can 2650 be overclocked to 20mhz, the data sheet says 16mhz max ?

Hello

I have great news, I've manage to test Duemilanove (moddet to a Uno) with the attached bootloaders at 20MHz and also at 24MHz
and is working FINE.
the results are presented below and i also attache the bootloaders, changes to boars.txt and the test sketch.

##############################################################

gvi24.name=GVI High Speed (5V-24MHz-500k Baud)
gvi24.upload.protocol=arduino
gvi24.upload.maximum_size=32256
gvi24.upload.speed=500000
gvi24.bootloader.low_fuses=0xf7
gvi24.bootloader.high_fuses=0xd6
gvi24.bootloader.extended_fuses=0x05
gvi24.bootloader.path=optiboot
gvi24.bootloader.file=optiboot_atmega328__24MHz.hex
gvi24.bootloader.unlock_bits=0x3F
gvi24.bootloader.lock_bits=0x0F
gvi24.build.mcu=atmega328p
gvi24.build.f_cpu=24000000L
gvi24.build.core=arduino
gvi24.build.variant=standard

##############################################################

gvi20.name=GVI High Speed (5V-20MHz-250k Baud)
gvi20.upload.protocol=arduino
gvi20.upload.maximum_size=32256
gvi20.upload.speed=250000
gvi20.bootloader.low_fuses=0xf7
gvi20.bootloader.high_fuses=0xd6
gvi20.bootloader.extended_fuses=0x05
gvi20.bootloader.path=optiboot
gvi20.bootloader.file=optiboot_atmega328__20MHz.hex
gvi20.bootloader.unlock_bits=0x3F
gvi20.bootloader.lock_bits=0x0F
gvi20.build.mcu=atmega328p
gvi20.build.f_cpu=20000000L
gvi20.build.core=arduino
gvi20.build.variant=standard

##############################################################

Now one more thing, do you think is possible to use the mega2650 at 20Mhz? any one try it?

optiboot.zip (52.5 KB)

ArduinoSpeedTest.zip (7.9 KB)

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.

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?

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.

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

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

Nick,
I get crystals from Tayda:
http://www.taydaelectronics.com/crystals-resonators-oscilliators/crystals.html
They have pretty low prices on everything they sell and their shipping is pretty
low as well.

--- bill

Thanks Bill.

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

"What, this, Dad?"

"It's a crystal, darling"

"Cool!"

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?

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?

From a previous post in this topic: Arduino UNO @ 20MHz - #15 by gvi70000 - Programming Questions - Arduino Forum

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

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

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?

devobtch

gvi70000:
Did you change the xtal to a 20MHz one?

Yes, 20MHz crystal bought from Tayda Electronics. I tried 2 just to be sure. I also tried putting the chip on a breadboard with 20MHz crystal, caps, ... but got the same error. I can upload sketches through my USBasp but can not make a serial connection.

I would like to revisit this thread(yes I know it is old) as it seems to have encountered the most untimely death,

So, because it is still completely unclear to me(noob), perhaps someone will be kind enough to comment on these....

  1. whether or not you can actually operate the ATmega328p on a breadboard with a 20Mhz crystal, while all the things requiring timing remain correct,
    2)If so, what is the general step by step procedure to do this. To clarify....I would assume most people capable of using this forum would be able to cut and paste something like a boards.txt file. However, I would less likely assume the same people looking for help on this forum to be able to correctly modify the contents inside. Same goes for Makefile, Optiboot, etc. files.

Many Thanks!