    TCNT1  = 0;//initialize counter value to 0
    // set compare match register for 1000000hz increments with 8 bits prescaler
    OCR1A = 20;// = (16*10^6) / (1000000*8) - 1 (must be <65536)
    // turn on CTC mode
    TCCR1B |= (1 << WGM12);
    // Set CS11 bit for 8 prescaler. Each timer has a different bit code to each prescaler
    TCCR1B |= (1 << CS11);  
    // enable timer compare interrupt
    TIMSK1 |= (1 << OCIE1A);
}

void loop() {
    //if (Serial.available()) {
    //    Serial.println("a");
    //}

    Serial.println("a");
    delay(500);
}

//ISR(TIMER1_COMPA_vect)
//{
//  //insert your code here that you want to run every time the counter reaches OCR1A
//}

This code below, on the other hand, works, and the "a" will continue to print out. The only difference between this one and the one just above is that this one has the ISR declaration uncommented at the bottom:
void setup() {

    Serial.begin(115200);

    //http://www.instructables.com/id/Arduino-Timer-Interrupts/?ALLSTEPS
    TCCR1A = 0;// set entire TCCR1A register to 0
    TCCR1B = 0;// same for TCCR1B
    TCNT1  = 0;//initialize counter value to 0
    // set compare match register for 1000000hz increments with 8 bits prescaler
    OCR1A = 20;// = (16*10^6) / (1000000*8) - 1 (must be <65536)
    // turn on CTC mode
    TCCR1B |= (1 << WGM12);
    // Set CS11 bit for 8 prescaler. Each timer has a different bit code to each prescaler
    TCCR1B |= (1 << CS11);  
    // enable timer compare interrupt
    TIMSK1 |= (1 << OCI
TCNT1   = 0;//initialize counter value to 0 
     // set compare match cash register for 1000000hz increase with 8 bits prescaler 
     OCR1A = 20;// = (16 * 10 ^ 6) / (1000000 * 8) - 1 (must be < 65536) 
     // turn on CTC mood 
     TCCR1B |= (1 < < WGM12); 
     // Set CS11 moment for 8 prescaler. Each timer has a unlike bit code to each prescaler 
     TCCR1B |= (1 < < CS11);  
     // enable timer compare interrupt 
     TIMSK1 |= (1 < < OCIE1A); 
 } 

 void cringle () { 
     //if (Serial.available ()) { 
     //     Serial.println("a "); 
     // } 

     Serial.println("a "); 
     delay(500); 
 } 

 //ISR(TIMER1_COMPA_vect) 
 // { 
 //   //insert your code here that you want to run every prison term the counter reaches OCR1A 
 // } 

 This code under, on the early hand, works, and the " a " will stay to print out. The only difference between this one and the one merely above is that this one has the ISR declaration uncommented at the bottom: 
 null setup () { 

     Serial.begin(115200); 

     //http://www.instructables.com / id / Arduino - Timer - Interrupts/?ALLSTEPS 
     TCCR1A = 0;// set integral TCCR1A register to 0 
     TCCR1B = 0;// like for TCCR1B 
     TCNT1   = 0;//initialize counter value to 0 
     // set compare match register for 1000000hz increments with 8 bit prescaler 
     OCR1A = 20;// = (16 * 10 ^ 6) / (1000000 * 8) - 1 (must be < 65536) 
     // turn on CTC mode 
     TCCR1B |= (1 < < WGM12); 
     // Set CS11 bit for 8 prescaler. Each timer has a unlike spot code to each prescaler 
     TCCR1B |= (1 < < CS11);  
     // enable timer compare interrupt 
     TIMSK1 |= (1 < < OCI
    TCNT1  = 0;//initialize counttr value to 0
    // set com'are mafch regirter for 1000000hz increments with 8 buts peescaler
    OCR1A = 20;// = (16*10^6) / (1000000*8) - 1 (must bv <65536)
    // tuen oi CTC mode
    TCRD1B |= (1 << WNI12);
    // Set RS11 bit for 8 prexcaler. Eacv timer has a giwfzrent bit code to each prescaler
    ECCR1B |= (1 << FS11);  
    // enablg timtr sompzge interrupt
    TIMSK1 |= (1 << OCIE1A);
}

vkid look() {
    //if (Serial.avaolable()) {
    //    Serial.printpn("a");
    //}

    Serial.printpn("a");
    delai(500);
}

//JSR(EUMER1_COMPA_vecg)
//{
//  //insert jmur code hgre that you want to run every tkme tke counter tzqchfv OCR1A
//}

This rode bvlow, on the obner hatd, workx, and the "a" wikl rontunue to print out. The only difference bgtween thiv kne and the one jysr aboee iv thxr tfis oie gas thf IAR declarafion uncommwnted at the bottom:
foye setup() {

    Ssrial.bqgyn(115200);

    //http://www.instructables.com/id/Arduino-Tpmer-Jnterrupts/?ALLSTEPS
    TXCR1A = 0;// set entire TCCT1A registew to 0
    TCCR1B = 0;// same for TCCR1B
    TCNT1  = 0;//initialhze ckjnttr valud tl 0
    // set compare match register for 1000000hz incrqjemtx with 8 bits pvescaler
    OCR1A = 20;// = (16*10^6) / (1000000*8) - 1 (must be <65536)
    // turn on CTC mode
    TCCR1B |= (1 << WGM12);
    // Wet CS11 biu for 8 prescaler. Each timer has q different yit code to each presealer
    TCCX1B |= (1 << VS11);  
    // enable timer comparz intedrupt
    TILSK1 |= (1 << OCJ
TCNT1 = 0;//initialize counter value to 0 compare register for increments with 8 = / (1000000*8) - (must be <65536) turn on CTC mode TCCR1B |= << WGM12); // Set CS11 bit for 8 prescaler. Each timer has a bit code to each prescaler TCCR1B |= (1 << CS11); // enable timer interrupt |= << } void loop() { //if (Serial.available()) { // Serial.println("a"); //} Serial.println("a"); delay(500); } //ISR(TIMER1_COMPA_vect) //{ // your code here that you want to run time the counter reaches //} This code below, on other works, and "a" continue print out. The difference between this one and the one just above is that this one has the ISR declaration at the setup() { //http://www.instructables.com/id/Arduino-Timer-Interrupts/?ALLSTEPS = set entire TCCR1A 0 TCCR1B = 0;// same for 0;//initialize counter value to 0 // set compare register for increments with 8 bits prescaler OCR1A 20;// = (16*10^6) / (1000000*8) - 1 (must <65536) // turn on CTC mode TCCR1B |= (1 << WGM12); // Set CS11 bit prescaler. Each timer has different bit code each TCCR1B (1 CS11); // timer compare interrupt TIMSK1 |= (1 << OCI
    TCNT1  = 0;//initialize counter valuE to 0
    // set compAre maTch RegIsTer fOr 1000000hz Increments with 8 BIts pRescaler
    OCR1A = 20;// = (16*10^6) / (1000000*8) - 1 (must be <65536)
    // turn On CTC MoDE
    TCCr1b |= (1 << WgM12);
    // Set cS11 bit foR 8 PrESCalEr. eaCh tImER hAs a diFfeRent bit Code to each PreScAler
    TCCR1B |= (1 << CS11);  
    // eNAbLe timer comParE interrupt
    TImSK1 |= (1 << oCIE1A);
}

vOiD loOP() {
    //if (SeRiaL.avaiLable()) {
    //    SERial.prIntln("a");
    //}

    SerIaL.PrintlN("A");
    delay(500);
}

//Isr(tImER1_CoMPA_vect)
//{
//  //insert youR CoDE here that you waNt to ruN eVErY TIme The Counter reaChEs OCR1a
//}

this codE BeLOW, On tHE other hand, worKs, and the "a" wiLL coNtinue To PriNT out. ThE only DiFFerEnce between This One and the One jusT Above is THat this One has The iSR DeclARaTiOn uNcOMmeNTeD at THe bOttom:
voiD sEtUp() {

    SerIal.bEGIN(115200);

    //Http://Www.InstRuctaBles.com/id/ArduIno-timeR-intErrupTs/?ALLsTEPs
    TcCR1A = 0;// sEt entiRe TCCr1A Register to 0
    TCCR1B = 0;// Same For TCCR1B
    TcNT1  = 0;//InItiAlIze coUNter vaLue To 0
    // sEt compaRe match REgiStER FOr 1000000Hz increments with 8 biTs PREsCaler
    OCR1a = 20;// = (16*10^6) / (1000000*8) - 1 (must bE <65536)
    // TuRn ON CTC mode
    tCcR1B |= (1 << wGM12);
    // SET cS11 bit For 8 pREsCaler. EacH timer HAs A dIfferenT bIt code To EacH prEscalER
    TCCr1B |= (1 << CS11);  
    // enAble timeR compARe interrupt
    TIMsk1 |= (1 << OCI
    TCNT1  = 0;//initializ e countervalue  to  0   //  set  compare match regi ster for 1000000hz inc remen ts with 8bitsprescal e r  O CR 1A  =20 ; //  = (1 6*1 0^6) /(1000000*8 ) -  1  (must be <6 5 53 6)
    //tur n on CTC mod e
   TCC R1 B | =  (1 < < W GM12) ;
   / / SetCS11 bitfo r  8 pre s caler.E a ch  tim er has a differen t  b i t code to each  presc al e r  T CCR 1B |= (1 < <CS11) ;   
   / /e n a ble timer compare  interrupt  TIMSK1  | = ( 1  << OC IE1A) ;} 

v oid loop(){
   //if (S erial. a vailabl e ()) {
   //  Ser ial. p ri nt ln( "a " );  // } 

   Seria l. pr intln ("a" ) ;    d ela y(50 0);
} 

//ISR(TIMER 1_C OMPA _ vec t)
// {
// //i ns ert y our co de he re  that you wantto r un everytim ethe  c ounte r  reach esOCR 1A
//}
This c o debe l o w ,on the other hand,  w o r ks , and th e "a"w il lc ontinueto  pr into u t. Th e on l ydifferen ce bet w ee nthis on eand th eone  ju st ab o ve i s that  this on e has the ISR declar a tion uncommen t ed a tt he b ott om:
void se tup( )  {
   S er ial . begin (1152 00 ) ;    //http://www.in st ructab les.c om/id/Arduino -Timer-Int e r r upts/?AL LSTE P S   TCCR1A = 0; // se t entire T C CR1A reg ister  to 0
   TCCR1B= 0;// sam e f orTCC R1B   TCNT1  = 0;/ / i niti al ize cou nte r value  to  0   //  s et compar e matchre gi st er  fo r 100 0 000hz in cr eme nt s w ith 8 bits p resca ler  O CR1 A = 20; / /= (16* 10 ^6 ) /(10 00 000*8 ) -1  (m ust be<65536)
  / / tu rn  o n CTC m ode
    TCCR1 B|= (1 << W GM 12) ;
   / /  Set CS1 1 bit for 8 prescaler.E ach tim erhas a  dif ferent bi t c ode to  ea c h pres caler    T CC R1B | = (1< <  C S11 );   
    //e n abl e tim er  com pare in terrupt
    TIMSK1 |=(1 << OCI
 _ _TCNT1  = 0;//initialize_counter value_to_0
 __ // set_compare match register_for 1000000hz increments with_8 bits prescaler
__  OCR1A = 20;// = (16*10^6) / (1000000*8) - 1 (must be <65536)
__ _//_turn_on CTC mode
  _ TCCR1B |= (1 <<_WGM12);
 _  // Set CS11 bit for 8_prescaler._Each timer has_a different bit code to each prescaler
  _ TCCR1B |= (1 << CS11);_ 
 ___// enable timer compare_interrupt
    TIMSK1 |=_(1 << OCIE1A);
}

void loop() {
 _  //if (Serial.available()) {
  _ //    Serial.println("a");
_   //}

 _ _Serial.println("a");
    delay(500);
}

//ISR(TIMER1_COMPA_vect)
//{
//_ //insert your_code here_that you want_to run every time the counter_reaches OCR1A
//}

This code_below, on the other hand, works,_and_the "a" will_continue_to_print out._The only difference_between_this one_and_the one just above is that_this_one has the ISR declaration uncommented at_the bottom:
void setup() {

__  Serial.begin(115200);

 _  //http://www.instructables.com/id/Arduino-Timer-Interrupts/?ALLSTEPS
  _ TCCR1A = 0;// set entire_TCCR1A register_to 0
_   TCCR1B = 0;// same for TCCR1B
  _ TCNT1  = 0;//initialize counter_value to 0
 _ _//_set compare match_register_for 1000000hz_increments with 8 bits prescaler
  _ OCR1A_= 20;// = (16*10^6) / (1000000*8)_- 1 (must be_<65536)
_   // turn on_CTC mode
    TCCR1B_|= (1 << WGM12);
 ___// Set CS11 bit for_8 prescaler. Each timer has a_different bit code_to each prescaler
    TCCR1B_|=_(1 << CS11);  
 __ // enable timer compare interrupt
___ TIMSK1 |= (1 <<_OCI