ISR(TIMER1_COMPA_vect)
{
digitalWrite(4,HIGH);
OCR1A+=100000;
digitalWrite(4,LOW);
}
void setup() {
pinMode(4, OUTPUT);
// put your setup code here, to run once:
TCCR1B=0;
TCCR1A=0;
TCCR1B|=B00000100;
OCR1A=62500;
TIMSK1|=B00000010;
// digitalWrite(4,HIGH);
//OCR1A+=62500;
TCCR1B=0;
TCCR1A=0;
TCCR1B|=B00000100;
OCR1A=62500;
TIMSK1|=B00000010;
}
void loop() {
// put your main code here, to run repeatedly:
}
// ISR(TIMER1_COMPA_vect)
// {
// digitalWrite(8, HIGH);
// OCR1A+=62500;
// digitalWrite(8, LOW);
// }
// void setup() {
// // put your setup code here, to run once:
// pinMode(8, OUTPUT);
// //pinMode(9,OUTPUT);
// TCCR1A=0;
// TCCR1B=0;
// TCCR1B|=B00000100;
// OCR1A=62500;
// OCR1B=6250;
// TIMSK1|=B00000110;
// }
// void loop() {
// // put your main code here, to run repeatedly:
// }