Newbie question about timers

Hello

This is my first post here, so i apologize if i am posting in the wrong section. I am following this tutorial http://www.engblaze.com/microcontroller-tutorial-avr-and-arduino-timer-interrupts/, but I cannot get the frequency up to 16MHz (i am using a arduino uno).
With no prescaler i only get about 125Hz max.
I DO NOT have an external power supply connected (I am running off USB power), will that affect the timer?

Thansk

but I cannot get the frequency up to 16MHz (i am using a arduino uno).

You don't have a snowball's chance in hell of getting a 16MHz processor to do anything 16 million times a second.

Which is fine, what i really need is 2MHz anyways, but even that does not work, so i am wondering what i am doing wrong

well, i thought it would be obvious i was using the code on the link provided ON THE FIRST POST, but apparently obvious is not a very well understood word....
In any event, using the code on the link and just changing the pin number to pin 10, i can generate 121.8Hz.
If I use the code below, i can reach 363kHz.

// avr-libc library includes
#include <avr/io.h>

void setup()
{
DDRB |= (1 << 2); //pin 10

//cli(); // disable global interrupts
//TCCR1A = 0;
TCCR1B = 0;
TCCR1B |= (1 << CS11);
}

void loop() {
// put your main code here, to run repeatedly:

if (TCNT1L >= 0
)
{
PORTB ^= (1 << 2); // Toggle the LED
TCNT1L = 0; // Reset timer value
}
}

Where is?
// enable global interrupts:
sei();

On the link's code is right below the TCCR1B |= (1 << CS10) line. On the code I posted i have none, since, as far as i understood, I am not using any interrupts.

hpupo:
well, i thought it would be obvious i was using the code on the link provided ON THE FIRST POST

It is more work (and time) to click your link than to read code when you post it here. Make it as easy as possible for people to help you. There are 100 other questions also waiting for an answer.

...R

An instruction takes 62.5us for 16Mhz UNO
You want 2MHz which is 500ns which is 8 instructions, see any problems?

In any event, using the code on the link and just changing the pin number to pin 10, i can generate 121.8Hz.
If I use the code below, i can reach 363kHz.

If you:
void loop()
{
PINB |= _BV(PINB2); // Toggle digital pin D10
}

The best you can do is ~550KHZ

This will give you 2MHz with millis() interrupting throughout.
But, you wont have any time for other code!

void setup()
{
  pinMode(10,OUTPUT);
}
void loop()
{
  //Gives about 2MHz output
  while(true)
  {
    PINB = 0x04; //Toggle pin 10 on UNO
    asm("nop\n");
  }
}