Hi!
I'm trying to set prescaler on Arduino2009 by using Atmel Studio 6
After I realised that I can't change fuses without programming a bootloader, I choose to modify prescaler to test the MCU in other conditions of clock.
So, I wrote this
# define F_CPU 16000000UL #include#include int main(void) { CLKPR=_BV(CLKPCE); CLKPR=(CLKPR & (~_BV(CLKPS0) | ~_BV(CLKPS1) | ~_BV(CLKPS2) | _BV(CLKPS3))); DDRB=0x20; unsigned int i; while(1) { for(i=0; i<65000; i++); for(i=0; i<65000; i++); for(i=0; i<65000; i++); for(i=0; i<65000; i++); //_delay_ms(1000); it was for test if was a real 16Mhz PINB=0x20; } }
But after that, the for cycles seems to be the same. I mean, the toggling speed is the same. WHY?
Thank to all!