NerdKits - electronics education for a digital generation

You are not logged in. [log in]

NEW: Learning electronics? Ask your questions on the new Electronics Questions & Answers site hosted by CircuitLab.

Support Forum » Why can't I run my microcontroller in Atmel Studios at a higher frequency?

August 09, 2014
by jmuthe
jmuthe's Avatar

I currently have an MKII and I use it to program Atmega 328 chips with the Atmel Studio 6.1. To program the chip, I select "Tools","Device Programming" and then "Apply". I then could set the ISP frequency of the device. Then I press the "Read" icon and then a box named "Device Signature" should display a value, if it reads the chip. I used to be able to set the ISP frequency up to 2 MHz but now the maximum I could set it to is 250kHz. If I set it any higher then I could not read the device. When I set the device to 250kHz I could still program the chip but it runs slower. If I make a program and I use the delay(ms) function to delay a chip for one second, the delay would actually be a lot longer.

Does anyone know why I can't set the chips to a higher frequency. I can tell you that the problem is not the Atmega 328 chip because I have a lot of new ones and none of them let me set a higher frequency. Do you think that the problem is the MKII programmer?

August 10, 2014
by Rick_S
Rick_S's Avatar

I'm not positive about the isp speed in avr studio, but new chips by default have their fuses set to a 1MHz clock speed using the internal crystal oscillator. Most likely that is what is causing your issues with the delays being off, and possibly your isp speed problems as well. If you still have one of your NK chips around, read the fuses from their chip and duplicate those settings in the new ones.

Rick

August 10, 2014
by esoderberg
esoderberg's Avatar

jmuthe,

I use studio 6.1 too. I'm a little rusty with the 328 as I've been working with XMegas lately, but I believe Rick has it right - it sounds like you're confusing the programming speed set via "interface setting" and the clock speed set via the fuses (don't forget to uncheck the DIV8 block). Once you reset the clock speed via fuse settings you can go back and bump up the ISP speed. You should be able to get 2Mhz ISP after you've changed from the default internal clock to a higher speed external clock.

Eric

August 11, 2014
by jmuthe
jmuthe's Avatar

Yes, this was the problem. I set a blank chip with the same fuse settings as the Nerdkit chip and I was then able to program it to a higher frequency. Thank you for your help.

August 11, 2014
by Rick_S
Rick_S's Avatar

No problem, glad to help

Post a Reply

Please log in to post a reply.

Did you know that microcontrollers have two different kinds of memory, program space (flash) and SRAM? Learn more...