Using two outputs

Do you really want to treat the register OCRA2 as a signed 8 bit integer?

if (OCR2A<0)