I selected pin 3 as output. And set pwm at 50% duty cycle. I dont need adc to set duty cycle. It was just for test purpose and it didnt work.
But i realize now that you was correct that 500 is too high. Timer 2 is 8 bit... And pin 3 should be under timer 2
Something really strange is going on. Yesterday i tried burn hex file without bootloader from arduino to atmega32 (with usbasp) and it works, so I though that my arduino is faulty. Today i bought arduino mega and it has same issue. I am thinking that arduino just screw up code.
Something really strange is going on. Yesterday i tried burn hex file without bootloader from arduino to atmega32 (with usbasp) and it works, so I though that my arduino is faulty. Today i bought arduino mega and it has same issue. I am thinking that arduino just screw up code.