Sketch running at half speed after importing to Atmel Studio

Hello!

After importing my arduino sketch to atmel studio 7, and flashing it to a Atmega328P with a 16mhz external resonator connected. I am finding that the program is running at 1/2 speed.

I have verified that F_CPU is set to 16,000,000. My fuses are set to what I can best determine works for the for the 16mhz resonator (Using same ones from arduino nano. Literally hot aired the resonator off of a nano and soldered it on to my PCB). Fuses are as follows.

Ex: FD
High: DA
Low : FF

CKSEL is set to "Ext. Crystal Osc. 8.0- MHz; Start-up time PWRDWN/RESET: 16K CK/14 CK + 65ms"

OScope reads 16MHz off of the resonator

Any help would be greatly appreciated!!

Just to rule out anything in your sketch, you get the same effect with the famous blink sketch (0.5Hz) ?

I have no LED's in my circut. I am not using an arduino board, just loading an arduino sketch onto a Atmel328P via ISCP header on a custom PCB

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.