//USE TIMER1 AND BLINK RED LED EVERY 1 SECOND ,TIMER2 BLINK GREEN LED EVERY 2 SECOND
volatile char *outf;
void setup() {
// put your setup code here, to run once:
volatile char *dirf;
dirf=0x30;*dirf=0xff;
outf=0x31;*outf=0x02;
TCCR2A=0x02;
TCCR2B=0x07;
OCR2A=240;
}
void loop() {
volatile char i=0;
// put your main code here, to run repeatedly:
while(i<65){
while((TIFR2&0x04)==0){
//waiting for 1 second
}
TIFR2=0x04;
i++;
}
*outf=*outf^0x02;//xor operation
}