void setup() {
pinMode(3, OUTPUT);
pinMode(11,OUTPUT);
TCCR2A=0;//reset the register
TCCR2B=0;//reset the register
TCNT2=0;
TCCR2A=0b01010010;//COM2A1, COM2B1 are 0, COM2A0, COM2B0 are 1
//also WGM21 is 1
TCCR2B=0b00000111;//WGM22 is 0 with 1024 prescaler
OCR2A=156;// compare match value OCR2A=( fclk/2*N* fOC2A)-1
}
void loop() {
// put your main code here, to run repeatedly
}